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.

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