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.

154 lines
4.9 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: SpaClient
  30. value: ${WEB_SPA_URL}
  31. - name: XamarinCallback
  32. value:
  33. - name: MvcClient
  34. value: ${WEB_MVC_URL}
  35. - name: LocationApiClient
  36. value: ${LOCATION_API_URL}
  37. - name: MarketingApiClient
  38. value: ${MARKETING_API_URL}
  39. - name: BasketApiClient
  40. value: ${BASKET_API_URL}
  41. - name: OrderingApiClient
  42. value: ${ORDERING_API_URL}
  43. - name: MobileShoppingAggClient
  44. value: ${MOBILE_SHOPPING_AGGREGATOR_URL}
  45. - name: WebShoppingAggClient
  46. value: ${WEB_SHOPPING_AGGREGATOR_URL}
  47. - name: WebhooksApiClient
  48. value: ${WEBHOOKS_API_URL}
  49. - name: WebhooksWebClient
  50. value: ${WEBHOOKS_WEB_CLIENT_URL}
  51. - name: ConnectionString
  52. valueFrom:
  53. secretKeyRef:
  54. key: ConnectionString
  55. name: identity-db-connection-secret
  56. image: docker-registry.default.svc:5000/${IMAGE_REGISTRY_PROJECT_NAME}/${APPLICATION_NAME}:latest
  57. imagePullPolicy: Always
  58. name: ${APPLICATION_NAME}
  59. ports:
  60. - containerPort: 8080
  61. protocol: TCP
  62. resources: {}
  63. terminationMessagePath: /dev/termination-log
  64. terminationMessagePolicy: File
  65. dnsPolicy: ClusterFirst
  66. restartPolicy: Always
  67. schedulerName: default-scheduler
  68. securityContext: {}
  69. terminationGracePeriodSeconds: 30
  70. triggers:
  71. - type: ConfigChange
  72. - imageChangeParams:
  73. automatic: true
  74. containerNames:
  75. - ${APPLICATION_NAME}
  76. from:
  77. kind: ImageStreamTag
  78. name: ${APPLICATION_NAME}:latest
  79. namespace: ${IMAGE_REGISTRY_PROJECT_NAME}
  80. type: ImageChange
  81. - apiVersion: v1
  82. kind: Service
  83. metadata:
  84. labels:
  85. app: ${APPLICATION_NAME}
  86. template: ${TEMPLATE_NAME}
  87. name: ${APPLICATION_NAME}
  88. spec:
  89. ports:
  90. - name: 8080-tcp
  91. port: 8080
  92. protocol: TCP
  93. targetPort: 8080
  94. selector:
  95. app: ${APPLICATION_NAME}
  96. deploymentconfig: ${APPLICATION_NAME}
  97. sessionAffinity: None
  98. type: ClusterIP
  99. status:
  100. loadBalancer: {}
  101. parameters:
  102. - description: The name for the application.
  103. displayName: Application Name
  104. name: APPLICATION_NAME
  105. required: true
  106. value: identityapi
  107. - description: The OpenShift project name that is hosting the image registry.
  108. displayName: Image Registry Project Name
  109. name: IMAGE_REGISTRY_PROJECT_NAME
  110. required: true
  111. - description: The template name.
  112. displayName: Template Name
  113. name: TEMPLATE_NAME
  114. required: true
  115. value: identityapi-deploy-template
  116. - description: The cluster internal URL of the Web SPA endpoint
  117. displayName: Web SPA URL
  118. name: WEB_SPA_URL
  119. required: true
  120. - description: The cluster internal URL of the Web MVC endpoint
  121. displayName: Web MVC URL
  122. name: WEB_MVC_URL
  123. required: true
  124. - description: The cluster internal URL of the Location API endpoint
  125. displayName: Location API URL
  126. name: LOCATION_API_URL
  127. required: true
  128. - description: The cluster internal URL of the Marketing API endpoint
  129. displayName: Marketing API URL
  130. name: MARKETING_API_URL
  131. required: true
  132. - description: The cluster internal URL of the Basket API endpoint
  133. displayName: Basket API URL
  134. name: BASKET_API_URL
  135. required: true
  136. - description: The cluster internal URL of the Ordering API endpoint
  137. displayName: Ordering API URL
  138. name: ORDERING_API_URL
  139. required: true
  140. - description: The cluster internal URL of the Mobile Shopping Aggregator endpoint
  141. displayName: Mobile Shopping Aggregator URL
  142. name: MOBILE_SHOPPING_AGGREGATOR_URL
  143. required: true
  144. - description: The cluster internal URL of the Web Shopping Aggregator endpoint
  145. displayName: Web Shopping Aggregator URL
  146. name: WEB_SHOPPING_AGGREGATOR_URL
  147. required: true
  148. - description: The cluster internal URL of the Webhooks API endpoint
  149. displayName: Webhooks API URL
  150. name: WEBHOOKS_API_URL
  151. required: true
  152. - description: The cluster internal URL of the Webhooks Client endpoint
  153. displayName: Webhooks Client URL
  154. name: WEBHOOKS_WEB_CLIENT_URL
  155. required: true