You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

191 lines
7.1 KiB

  1. apiVersion: template.openshift.io/v1
  2. kind: Template
  3. metadata:
  4. name: ${TEMPLATE_NAME}
  5. objects:
  6. - apiVersion: apps.openshift.io/v1
  7. kind: DeploymentConfig
  8. metadata:
  9. labels:
  10. app: ${APPLICATION_NAME}
  11. template: ${TEMPLATE_NAME}
  12. name: ${APPLICATION_NAME}
  13. spec:
  14. replicas: 1
  15. selector:
  16. app: ${APPLICATION_NAME}
  17. deploymentconfig: ${APPLICATION_NAME}
  18. strategy:
  19. type: Rolling
  20. revisionHistoryLimit: 2
  21. template:
  22. metadata:
  23. labels:
  24. app: ${APPLICATION_NAME}
  25. deploymentconfig: ${APPLICATION_NAME}
  26. spec:
  27. containers:
  28. - env:
  29. - name: HealthChecksUI__HealthChecks__0__Name
  30. value: WebMVC HTTP Check
  31. - name: HealthChecksUI__HealthChecks__0__Uri
  32. value: ${WEB_MVC_HC_URL}
  33. - name: HealthChecksUI__HealthChecks__1__Name
  34. value: WebSPA HTTP Check
  35. - name: HealthChecksUI__HealthChecks__1__Uri
  36. value: ${WEB_SPA_HC_URL}
  37. - name: HealthChecksUI__HealthChecks__2__Name
  38. value: Web Shopping Aggregator GW HTTP Check
  39. - name: HealthChecksUI__HealthChecks__2__Uri
  40. value: ${WEB_SHOPPING_AGGREGATOR_HC_URL}
  41. - name: HealthChecksUI__HealthChecks__3__Name
  42. value: Mobile Shopping Aggregator HTTP Check
  43. - name: HealthChecksUI__HealthChecks__3__Uri
  44. value: ${MOBILE_SHOPPING_AGGREGATOR_HC_URL}
  45. - name: HealthChecksUI__HealthChecks__4__Name
  46. value: Ordering HTTP Check
  47. - name: HealthChecksUI__HealthChecks__4__Uri
  48. value: ${ORDERING_API_HC_URL}
  49. - name: HealthChecksUI__HealthChecks__5__Name
  50. value: Basket HTTP Check
  51. - name: HealthChecksUI__HealthChecks__5__Uri
  52. value: ${BASKET_API_HC_URL}
  53. - name: HealthChecksUI__HealthChecks__6__Name
  54. value: Catalog HTTP Check
  55. - name: HealthChecksUI__HealthChecks__6__Uri
  56. value: ${CATALOG_API_HC_URL}
  57. - name: HealthChecksUI__HealthChecks__7__Name
  58. value: Identity HTTP Check
  59. - name: HealthChecksUI__HealthChecks__7__Uri
  60. value: ${IDENTITY_API_HC_URL}
  61. - name: HealthChecksUI__HealthChecks__8__Name
  62. value: Marketing HTTP Check
  63. - name: HealthChecksUI__HealthChecks__8__Uri
  64. value: ${MARKETING_API_HC_URL}
  65. - name: HealthChecksUI__HealthChecks__9__Name
  66. value: Locations HTTP Check
  67. - name: HealthChecksUI__HealthChecks__9__Uri
  68. value: ${LOCATIONS_API_HC_URL}
  69. - name: HealthChecksUI__HealthChecks__10__Name
  70. value: Payments HTTP Check
  71. - name: HealthChecksUI__HealthChecks__10__Uri
  72. value: ${PAYMENT_API_HC_URL}
  73. - name: HealthChecksUI__HealthChecks__11__Name
  74. value: Ordering SignalRHub HTTP Check
  75. - name: HealthChecksUI__HealthChecks__11__Uri
  76. value: ${ORDERING_SIGNALR_HUB_HC_URL}
  77. - name: HealthChecksUI__HealthChecks__12__Name
  78. value: Ordering HTTP Background Check
  79. - name: HealthChecksUI__HealthChecks__12__Uri
  80. value: ${ORDERING_BACKGROUND_TASKS_HC_URL}
  81. image: docker-registry.default.svc:5000/${IMAGE_REGISTRY_PROJECT_NAME}/${APPLICATION_NAME}:latest
  82. imagePullPolicy: Always
  83. name: ${APPLICATION_NAME}
  84. ports:
  85. - containerPort: 8080
  86. protocol: TCP
  87. resources: {}
  88. terminationMessagePath: /dev/termination-log
  89. terminationMessagePolicy: File
  90. dnsPolicy: ClusterFirst
  91. restartPolicy: Always
  92. schedulerName: default-scheduler
  93. securityContext: {}
  94. terminationGracePeriodSeconds: 30
  95. triggers:
  96. - type: ConfigChange
  97. - imageChangeParams:
  98. automatic: true
  99. containerNames:
  100. - ${APPLICATION_NAME}
  101. from:
  102. kind: ImageStreamTag
  103. name: ${APPLICATION_NAME}:latest
  104. namespace: ${IMAGE_REGISTRY_PROJECT_NAME}
  105. type: ImageChange
  106. - apiVersion: v1
  107. kind: Service
  108. metadata:
  109. labels:
  110. app: ${APPLICATION_NAME}
  111. template: ${TEMPLATE_NAME}
  112. name: ${APPLICATION_NAME}
  113. spec:
  114. ports:
  115. - name: 8080-tcp
  116. port: 8080
  117. protocol: TCP
  118. targetPort: 8080
  119. selector:
  120. app: ${APPLICATION_NAME}
  121. deploymentconfig: ${APPLICATION_NAME}
  122. sessionAffinity: None
  123. type: ClusterIP
  124. status:
  125. loadBalancer: {}
  126. parameters:
  127. - description: The name for the application.
  128. displayName: Application Name
  129. name: APPLICATION_NAME
  130. required: true
  131. value: webstatus
  132. - description: The OpenShift project name that is hosting the image registry.
  133. displayName: Image Registry Project Name
  134. name: IMAGE_REGISTRY_PROJECT_NAME
  135. required: true
  136. - description: The template name.
  137. displayName: Template Name
  138. name: TEMPLATE_NAME
  139. required: true
  140. value: webstatus-deploy-template
  141. - description: The health check URL of the Web MVC service
  142. displayName: Web MVC Health Check URL
  143. name: WEB_MVC_HC_URL
  144. required: true
  145. - description: The health check URL of the Web SPA service
  146. displayName: Web SPA Health Check URL
  147. name: WEB_SPA_HC_URL
  148. required: true
  149. - description: The health check URL of the Web Shopping Aggregator service
  150. displayName: Web Shopping Aggregator Health Check URL
  151. name: WEB_SHOPPING_AGGREGATOR_HC_URL
  152. required: true
  153. - description: The health check URL of the Mobile Shopping Aggregator service
  154. displayName: Mobile Shopping Aggregator Health Check URL
  155. name: MOBILE_SHOPPING_AGGREGATOR_HC_URL
  156. required: true
  157. - description: The health check URL of the Ordering API service
  158. displayName: Ordering API Health Check URL
  159. name: ORDERING_API_HC_URL
  160. required: true
  161. - description: The health check URL of the Basket API service
  162. displayName: Basket API Health Check URL
  163. name: BASKET_API_HC_URL
  164. required: true
  165. - description: The health check URL of the Catalog API service
  166. displayName: Catalog API Health Check URL
  167. name: CATALOG_API_HC_URL
  168. required: true
  169. - description: The health check URL of the Identity API service
  170. displayName: Identity API Health Check URL
  171. name: IDENTITY_API_HC_URL
  172. required: true
  173. - description: The health check URL of the Marketing API service
  174. displayName: Marketing API Health Check URL
  175. name: MARKETING_API_HC_URL
  176. required: true
  177. - description: The health check URL of the Locations API service
  178. displayName: Locations API Health Check URL
  179. name: LOCATIONS_API_HC_URL
  180. required: true
  181. - description: The health check URL of the Payment API service
  182. displayName: Payment API Health Check URL
  183. name: PAYMENT_API_HC_URL
  184. required: true
  185. - description: The health check URL of the Ordering SignalR Hub service
  186. displayName: Ordering SignalR Hub Health Check URL
  187. name: ORDERING_SIGNALR_HUB_HC_URL
  188. required: true
  189. - description: The health check URL of the Ordering Background Tasks service
  190. displayName: Ordering Background Tasks Health Check URL
  191. name: ORDERING_BACKGROUND_TASKS_HC_URL
  192. required: true