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.

99 lines
2.8 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: EventBusConnection
  30. value: ${RABBITMQ_HOSTNAME}
  31. - name: IdentityUrl
  32. value: ${IDENTITY_URL}
  33. image: docker-registry.default.svc:5000/${IMAGE_REGISTRY_PROJECT_NAME}/${APPLICATION_NAME}:latest
  34. imagePullPolicy: Always
  35. name: ${APPLICATION_NAME}
  36. ports:
  37. - containerPort: 8080
  38. protocol: TCP
  39. resources: {}
  40. terminationMessagePath: /dev/termination-log
  41. terminationMessagePolicy: File
  42. dnsPolicy: ClusterFirst
  43. restartPolicy: Always
  44. schedulerName: default-scheduler
  45. securityContext: {}
  46. terminationGracePeriodSeconds: 30
  47. triggers:
  48. - type: ConfigChange
  49. - imageChangeParams:
  50. automatic: true
  51. containerNames:
  52. - ${APPLICATION_NAME}
  53. from:
  54. kind: ImageStreamTag
  55. name: ${APPLICATION_NAME}:latest
  56. namespace: ${IMAGE_REGISTRY_PROJECT_NAME}
  57. type: ImageChange
  58. - apiVersion: v1
  59. kind: Service
  60. metadata:
  61. labels:
  62. app: ${APPLICATION_NAME}
  63. template: ${TEMPLATE_NAME}
  64. name: ${APPLICATION_NAME}
  65. spec:
  66. ports:
  67. - name: 8080-tcp
  68. port: 8080
  69. protocol: TCP
  70. targetPort: 8080
  71. selector:
  72. app: ${APPLICATION_NAME}
  73. deploymentconfig: ${APPLICATION_NAME}
  74. sessionAffinity: None
  75. type: ClusterIP
  76. status:
  77. loadBalancer: {}
  78. parameters:
  79. - description: The name for the application.
  80. displayName: Application Name
  81. name: APPLICATION_NAME
  82. required: true
  83. value: orderingsignalrhub
  84. - description: The OpenShift project name that is hosting the image registry.
  85. displayName: Image Registry Project Name
  86. name: IMAGE_REGISTRY_PROJECT_NAME
  87. required: true
  88. - description: The template name.
  89. displayName: Template Name
  90. name: TEMPLATE_NAME
  91. required: true
  92. value: ordering-signalrhub-deploy-template
  93. - description: The hostname of the RabbitMQ service
  94. displayName: RabbitMQ Hostname
  95. name: RABBITMQ_HOSTNAME
  96. required: true
  97. - description: The cluster internal URL of the Identity endpoint
  98. displayName: Identity URL
  99. name: IDENTITY_URL
  100. required: true