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.

119 lines
3.6 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: IdentityUrl
  30. value: ${IDENTITY_URL_EXTERNAL}
  31. - name: CallbackUrl
  32. value: ${WEB_MVC_URL}
  33. - name: PurchaseUrl
  34. value: ${WEB_SHOPPING_API_GATEWAY_URL}
  35. - name: MarketingUrl
  36. value: ${MARKETING_API_URL}
  37. - name: IdentityUrlHC
  38. value: ${IDENTITY_API_HC_URL}
  39. - name: SignalrHubUrl
  40. value: ${ORDERING_SIGNALR_HUB_URL}
  41. image: docker-registry.default.svc:5000/${IMAGE_REGISTRY_PROJECT_NAME}/${APPLICATION_NAME}:latest
  42. imagePullPolicy: Always
  43. name: ${APPLICATION_NAME}
  44. ports:
  45. - containerPort: 8080
  46. protocol: TCP
  47. resources: {}
  48. terminationMessagePath: /dev/termination-log
  49. terminationMessagePolicy: File
  50. dnsPolicy: ClusterFirst
  51. restartPolicy: Always
  52. schedulerName: default-scheduler
  53. securityContext: {}
  54. terminationGracePeriodSeconds: 30
  55. triggers:
  56. - type: ConfigChange
  57. - imageChangeParams:
  58. automatic: true
  59. containerNames:
  60. - ${APPLICATION_NAME}
  61. from:
  62. kind: ImageStreamTag
  63. name: ${APPLICATION_NAME}:latest
  64. namespace: ${IMAGE_REGISTRY_PROJECT_NAME}
  65. type: ImageChange
  66. - apiVersion: v1
  67. kind: Service
  68. metadata:
  69. labels:
  70. app: ${APPLICATION_NAME}
  71. template: ${TEMPLATE_NAME}
  72. name: ${APPLICATION_NAME}
  73. spec:
  74. ports:
  75. - name: 8080-tcp
  76. port: 8080
  77. protocol: TCP
  78. targetPort: 8080
  79. selector:
  80. app: ${APPLICATION_NAME}
  81. deploymentconfig: ${APPLICATION_NAME}
  82. sessionAffinity: None
  83. type: ClusterIP
  84. status:
  85. loadBalancer: {}
  86. parameters:
  87. - description: The name for the application.
  88. displayName: Application Name
  89. name: APPLICATION_NAME
  90. required: true
  91. value: webmvc
  92. - description: The OpenShift project name that is hosting the image registry.
  93. displayName: Image Registry Project Name
  94. name: IMAGE_REGISTRY_PROJECT_NAME
  95. required: true
  96. - description: The template name.
  97. displayName: Template Name
  98. name: TEMPLATE_NAME
  99. required: true
  100. value: webmvc-deploy-template
  101. - description: The external URL of the Identity endpoint
  102. displayName: Identity URL External
  103. name: IDENTITY_URL_EXTERNAL
  104. required: true
  105. - description: The URL of the Web Shopping API Gateway endpoint
  106. displayName: Web Shopping API Gateway URL
  107. name: WEB_SHOPPING_API_GATEWAY_URL
  108. required: true
  109. - description: The cluster internal URL of the Marketing API endpoint
  110. displayName: Marketing API URL
  111. name: MARKETING_API_URL
  112. required: true
  113. - description: The health check URL of the Identity API service
  114. displayName: Identity API Health Check URL
  115. name: IDENTITY_API_HC_URL
  116. required: true
  117. - description: The cluster internal URL of the Ordering SignalR Hub endpoint
  118. displayName: Ordering SignalR Hub URL
  119. name: ORDERING_SIGNALR_HUB_URL
  120. required: true