apicast-gateway-template.yml 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. apiVersion: v1
  2. kind: Template
  3. metadata:
  4. creationTimestamp: null
  5. name: 3scale-gateway
  6. annotations:
  7. description: "3scale API Gateway"
  8. iconClass: "icon-load-balancer"
  9. tags: "api,gateway,3scale"
  10. objects:
  11. - apiVersion: v1
  12. kind: DeploymentConfig
  13. metadata:
  14. name: ${THREESCALE_GATEWAY_NAME}
  15. spec:
  16. replicas: 2
  17. selector:
  18. deploymentconfig: ${THREESCALE_GATEWAY_NAME}
  19. strategy:
  20. resources: {}
  21. rollingParams:
  22. intervalSeconds: 1
  23. maxSurge: 25%
  24. maxUnavailable: 25%
  25. timeoutSeconds: 600
  26. updatePeriodSeconds: 1
  27. type: Rolling
  28. template:
  29. metadata:
  30. labels:
  31. deploymentconfig: ${THREESCALE_GATEWAY_NAME}
  32. spec:
  33. containers:
  34. - env:
  35. - name: THREESCALE_PORTAL_ENDPOINT
  36. valueFrom:
  37. secretKeyRef:
  38. name: ${THREESCALE_PORTAL_ENDPOINT_SECRET}
  39. key: password
  40. - name: THREESCALE_CONFIG_FILE
  41. value: ${THREESCALE_CONFIG_FILE}
  42. - name: RESOLVER
  43. value: ${RESOLVER}
  44. - name: APICAST_SERVICES
  45. value: ${APICAST_SERVICES}
  46. - name: APICAST_MISSING_CONFIGURATION
  47. value: ${MISSING_CONFIGURATION}
  48. - name: APICAST_LOG_LEVEL
  49. value: ${APICAST_LOG_LEVEL}
  50. - name: APICAST_PATH_ROUTING_ENABLED
  51. value: ${PATH_ROUTING}
  52. - name: APICAST_RESPONSE_CODES
  53. value: ${RESPONSE_CODES}
  54. - name: APICAST_REQUEST_LOGS
  55. value: ${REQUEST_LOGS}
  56. - name: APICAST_RELOAD_CONFIG
  57. value: ${APICAST_RELOAD_CONFIG}
  58. image: ${THREESCALE_GATEWAY_IMAGE}
  59. imagePullPolicy: Always
  60. name: ${THREESCALE_GATEWAY_NAME}
  61. livenessProbe:
  62. httpGet:
  63. path: /status/live
  64. port: 8090
  65. initialDelaySeconds: 10
  66. timeoutSeconds: 1
  67. readinessProbe:
  68. httpGet:
  69. path: /status/ready
  70. port: 8090
  71. initialDelaySeconds: 15
  72. timeoutSeconds: 1
  73. ports:
  74. - containerPort: 8080
  75. protocol: TCP
  76. resources: {}
  77. terminationMessagePath: /dev/termination-log
  78. dnsPolicy: ClusterFirst
  79. restartPolicy: Always
  80. securityContext: {}
  81. terminationGracePeriodSeconds: 30
  82. triggers:
  83. - type: ConfigChange
  84. status: {}
  85. - apiVersion: v1
  86. kind: Service
  87. metadata:
  88. creationTimestamp: null
  89. name: ${THREESCALE_GATEWAY_NAME}
  90. spec:
  91. ports:
  92. - name: 8080-tcp
  93. port: 8080
  94. protocol: TCP
  95. targetPort: 8080
  96. selector:
  97. deploymentconfig: ${THREESCALE_GATEWAY_NAME}
  98. sessionAffinity: None
  99. type: ClusterIP
  100. status:
  101. loadBalancer: {}
  102. parameters:
  103. - description: "Name of the secret containing the THREESCALE_PORTAL_ENDPOINT with the access-token or provider key"
  104. value: threescale-portal-endpoint-secret
  105. name: THREESCALE_PORTAL_ENDPOINT_SECRET
  106. required: true
  107. - description: "Path to saved JSON file with configuration for the gateway. Has to be injected to the docker image as read only volume."
  108. value:
  109. name: THREESCALE_CONFIG_FILE
  110. required: false
  111. - description: "Name for the 3scale API Gateway"
  112. value: threescalegw
  113. name: THREESCALE_GATEWAY_NAME
  114. required: true
  115. - description: "Docker image to use."
  116. value: 'rhamp10/apicast-gateway:1.0.0-4'
  117. name: THREESCALE_GATEWAY_IMAGE
  118. required: true
  119. - description: "DNS Resolver for openresty, if empty it will be autodiscovered"
  120. value:
  121. name: RESOLVER
  122. required: false
  123. - description: "Subset of services to run. Use comma separated list of service ids (eg. 42,1337)"
  124. value:
  125. name: APICAST_SERVICES
  126. required: false
  127. - description: "What to do on missing or invalid configuration. Allowed values are: log, exit."
  128. value: exit
  129. required: false
  130. name: MISSING_CONFIGURATION
  131. - description: "Log level. One of the following: debug, info, notice, warn, error, crit, alert, or emerg."
  132. name: APICAST_LOG_LEVEL
  133. required: false
  134. - description: "Enable path routing. Experimental feature."
  135. name: PATH_ROUTING
  136. required: false
  137. value: "false"
  138. - description: "Enable traffic logging to 3scale. Includes whole request and response."
  139. value: "false"
  140. name: REQUEST_LOGS
  141. required: false
  142. - description: "Enable logging response codes to 3scale."
  143. value: "false"
  144. name: RESPONSE_CODES
  145. required: false
  146. - description: "Reload config on every request"
  147. value: "false"
  148. name: APICAST_RELOAD_CONFIG
  149. required: false