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.

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