apicast.yml 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. apiVersion: v1
  2. kind: Template
  3. metadata:
  4. name: 3scale-gateway
  5. annotations:
  6. description: "3scale API Gateway"
  7. iconClass: "icon-load-balancer"
  8. tags: "api,gateway,3scale"
  9. objects:
  10. - apiVersion: v1
  11. kind: DeploymentConfig
  12. metadata:
  13. name: "${APICAST_NAME}"
  14. spec:
  15. replicas: 2
  16. selector:
  17. deploymentconfig: "${APICAST_NAME}"
  18. strategy:
  19. type: Rolling
  20. template:
  21. metadata:
  22. labels:
  23. deploymentconfig: "${APICAST_NAME}"
  24. spec:
  25. containers:
  26. - env:
  27. - name: THREESCALE_PORTAL_ENDPOINT
  28. valueFrom:
  29. secretKeyRef:
  30. name: "${CONFIGURATION_URL_SECRET}"
  31. key: password
  32. - name: THREESCALE_CONFIG_FILE
  33. value: "${CONFIGURATION_FILE_PATH}"
  34. - name: THREESCALE_DEPLOYMENT_ENV
  35. value: "${DEPLOYMENT_ENVIRONMENT}"
  36. - name: RESOLVER
  37. value: "${RESOLVER}"
  38. - name: APICAST_SERVICES
  39. value: "${SERVICES_LIST}"
  40. - name: APICAST_CONFIGURATION_LOADER
  41. value: "${CONFIGURATION_LOADER}"
  42. - name: APICAST_LOG_LEVEL
  43. value: "${LOG_LEVEL}"
  44. - name: APICAST_PATH_ROUTING_ENABLED
  45. value: "${PATH_ROUTING}"
  46. - name: APICAST_RESPONSE_CODES
  47. value: "${RESPONSE_CODES}"
  48. - name: APICAST_CONFIGURATION_CACHE
  49. value: "${CONFIGURATION_CACHE}"
  50. - name: REDIS_URL
  51. value: "${REDIS_URL}"
  52. - name: APICAST_MANAGEMENT_API
  53. value: "${MANAGEMENT_API}"
  54. - name: OPENSSL_VERIFY
  55. value: "${OPENSSL_VERIFY}"
  56. image: 3scale-amp20/apicast-gateway:1.0-3
  57. imagePullPolicy: IfNotPresent
  58. name: "${APICAST_NAME}"
  59. livenessProbe:
  60. httpGet:
  61. path: /status/live
  62. port: management
  63. initialDelaySeconds: 10
  64. timeoutSeconds: 1
  65. readinessProbe:
  66. httpGet:
  67. path: /status/ready
  68. port: management
  69. initialDelaySeconds: 15
  70. timeoutSeconds: 1
  71. ports:
  72. - name: proxy
  73. containerPort: 8080
  74. protocol: TCP
  75. - name: management
  76. containerPort: 8090
  77. protocol: TCP
  78. triggers:
  79. - type: ConfigChange
  80. - apiVersion: v1
  81. kind: Service
  82. metadata:
  83. name: "${APICAST_NAME}"
  84. spec:
  85. ports:
  86. - name: proxy
  87. port: 8080
  88. protocol: TCP
  89. targetPort: 8080
  90. - name: management
  91. port: 8090
  92. protocol: TCP
  93. targetPort: 8090
  94. selector:
  95. deploymentconfig: "${APICAST_NAME}"
  96. parameters:
  97. - name: AMP_RELEASE
  98. description: "AMP release tag."
  99. value: 2.0.0-CR2-redhat-1
  100. required: true
  101. - description: "Name of the secret containing the THREESCALE_PORTAL_ENDPOINT with the access-token or provider key"
  102. value: apicast-configuration-url-secret
  103. name: CONFIGURATION_URL_SECRET
  104. required: true
  105. - description: "Path to saved JSON file with configuration for the gateway. Has to be injected to the docker image as read only volume."
  106. value:
  107. name: CONFIGURATION_FILE_PATH
  108. required: false
  109. - description: "Deployment environment. Can be sandbox or production."
  110. value: production
  111. name: DEPLOYMENT_ENVIRONMENT
  112. required: true
  113. - description: "Name for the 3scale API Gateway"
  114. value: apicast
  115. name: APICAST_NAME
  116. required: true
  117. - description: "DNS Resolver for openresty, if empty it will be autodiscovered"
  118. value:
  119. name: RESOLVER
  120. required: false
  121. - description: "Subset of services to run. Use comma separated list of service ids (eg. 42,1337)"
  122. value:
  123. name: SERVICES_LIST
  124. required: false
  125. - name: CONFIGURATION_LOADER
  126. description: "When to load configuration. If on gateway start or incoming request. Allowed values are: lazy, boot."
  127. value: boot
  128. required: false
  129. - description: "Log level. One of the following: debug, info, notice, warn, error, crit, alert, or emerg."
  130. name: LOG_LEVEL
  131. required: false
  132. - description: "Enable path routing. Experimental feature."
  133. name: PATH_ROUTING
  134. required: false
  135. value: "false"
  136. - description: "Enable logging response codes to 3scale."
  137. value: "false"
  138. name: RESPONSE_CODES
  139. required: false
  140. - name: CONFIGURATION_CACHE
  141. description: "For how long to cache the downloaded configuration in seconds. Can be left empty, 0 or greater than 60."
  142. value: ""
  143. required: false
  144. - description: "Redis URL. Required for OAuth2 integration. ex: redis://PASSWORD@127.0.0.1:6379/0"
  145. name: REDIS_URL
  146. required: false
  147. - name: MANAGEMENT_API
  148. description: "Scope of the Management API. Can be disabled, status or debug. At least status required for health checks."
  149. required: false
  150. value: "status"
  151. - name: OPENSSL_VERIFY
  152. description: "Turn on/off the OpenSSL peer verification. Can be set to true/false."
  153. required: true
  154. value: "false"