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.

177 lines
5.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: urls__basket
  30. value: ${BASKET_API_URL}
  31. - name: urls__catalog
  32. value: ${CATALOG_API_URL}
  33. - name: urls__orders
  34. value: ${ORDERING_API_URL}
  35. - name: urls__identity
  36. value: ${IDENTITY_API_URL}
  37. - name: urls__grpcBasket
  38. value: ${BASKET_API_GRPC_URL}
  39. - name: urls__grpcCatalog
  40. value: ${CATALOG_API_GRPC_URL}
  41. - name: urls__grpcOrdering
  42. value: ${ORDERING_API_GRPC_URL}
  43. - name: CatalogUrlHC
  44. value: ${CATALOG_API_HC_URL}
  45. - name: OrderingUrlHC
  46. value: ${ORDERING_API_HC_URL}
  47. - name: IdentityUrlHC
  48. value: ${IDENTITY_API_HC_URL}
  49. - name: BasketUrlHC
  50. value: ${BASKET_API_HC_URL}
  51. - name: MarketingUrlHC
  52. value: ${MARKETING_API_HC_URL}
  53. - name: PaymentUrlHC
  54. value: ${PAYMENT_API_HC_URL}
  55. - name: LocationUrlHC
  56. value: ${LOCATION_API_HC_URL}
  57. - name: IdentityUrlExternal
  58. value: ${IDENTITY_URL_EXTERNAL}
  59. image: docker-registry.default.svc:5000/${IMAGE_REGISTRY_PROJECT_NAME}/${APPLICATION_NAME}:latest
  60. imagePullPolicy: Always
  61. name: ${APPLICATION_NAME}
  62. ports:
  63. - containerPort: 8080
  64. protocol: TCP
  65. resources: {}
  66. terminationMessagePath: /dev/termination-log
  67. terminationMessagePolicy: File
  68. dnsPolicy: ClusterFirst
  69. restartPolicy: Always
  70. schedulerName: default-scheduler
  71. securityContext: {}
  72. terminationGracePeriodSeconds: 30
  73. triggers:
  74. - type: ConfigChange
  75. - imageChangeParams:
  76. automatic: true
  77. containerNames:
  78. - ${APPLICATION_NAME}
  79. from:
  80. kind: ImageStreamTag
  81. name: ${APPLICATION_NAME}:latest
  82. namespace: ${IMAGE_REGISTRY_PROJECT_NAME}
  83. type: ImageChange
  84. - apiVersion: v1
  85. kind: Service
  86. metadata:
  87. labels:
  88. app: ${APPLICATION_NAME}
  89. template: ${TEMPLATE_NAME}
  90. name: ${APPLICATION_NAME}
  91. spec:
  92. ports:
  93. - name: 8080-tcp
  94. port: 8080
  95. protocol: TCP
  96. targetPort: 8080
  97. selector:
  98. app: ${APPLICATION_NAME}
  99. deploymentconfig: ${APPLICATION_NAME}
  100. sessionAffinity: None
  101. type: ClusterIP
  102. status:
  103. loadBalancer: {}
  104. parameters:
  105. - description: The name for the application.
  106. displayName: Application Name
  107. name: APPLICATION_NAME
  108. required: true
  109. value: webshoppingagg
  110. - description: The OpenShift project name that is hosting the image registry.
  111. displayName: Image Registry Project Name
  112. name: IMAGE_REGISTRY_PROJECT_NAME
  113. required: true
  114. - description: The template name.
  115. displayName: Template Name
  116. name: TEMPLATE_NAME
  117. required: true
  118. value: webshoppingagg-deploy-template
  119. - description: The cluster internal URL of the Basket API endpoint
  120. displayName: Basket API URL
  121. name: BASKET_API_URL
  122. required: true
  123. - description: The cluster internal URL of the Catalog API endpoint
  124. displayName: Catalog API URL
  125. name: CATALOG_API_URL
  126. required: true
  127. - description: The cluster internal URL of the Ordering API endpoint
  128. displayName: Ordering API URL
  129. name: ORDERING_API_URL
  130. required: true
  131. - description: The cluster internal URL of the Identity API endpoint
  132. displayName: Identity API URL
  133. name: IDENTITY_API_URL
  134. required: true
  135. - description: The cluster internal URL of the GRPC Basket API endpoint
  136. displayName: Basket API GROC URL
  137. name: BASKET_API_GRPC_URL
  138. required: true
  139. - description: The cluster internal URL of the GRPC Catalog API endpoint
  140. displayName: Catalog API GRPC URL
  141. name: CATALOG_API_GRPC_URL
  142. required: true
  143. - description: The cluster internal URL of the GRPC Ordering API endpoint
  144. displayName: Ordering API GRPC URL
  145. name: ORDERING_API_GRPC_URL
  146. required: true
  147. - description: The cluster internal URL of the Catalog API Health Check endpoint
  148. displayName: Catalog API Health Check URL
  149. name: CATALOG_API_HC_URL
  150. required: true
  151. - description: The cluster internal URL of the Ordering API Health Check endpoint
  152. displayName: Ordering API Health Check URL
  153. name: ORDERING_API_HC_URL
  154. required: true
  155. - description: The cluster internal URL of the Identity API Health Check endpoint
  156. displayName: Identity API Health Check URL
  157. name: IDENTITY_API_HC_URL
  158. required: true
  159. - description: The cluster internal URL of the Basket API Health Check endpoint
  160. displayName: Basket API Health Check URL
  161. name: BASKET_API_HC_URL
  162. required: true
  163. - description: The cluster internal URL of the Marketing API Health Check endpoint
  164. displayName: Marketing API Health Check URL
  165. name: MARKETING_API_HC_URL
  166. required: true
  167. - description: The cluster internal URL of the Payment API Health Check endpoint
  168. displayName: Payment API Health Check URL
  169. name: PAYMENT_API_HC_URL
  170. required: true
  171. - description: The cluster internal URL of the Location API Health Check endpoint
  172. displayName: Location API Health Check URL
  173. name: LOCATION_API_HC_URL
  174. required: true
  175. - description: The external URL of the Identity endpoint
  176. displayName: Identity URL External
  177. name: IDENTITY_URL_EXTERNAL
  178. required: true