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.

132 lines
4.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: MongoConnectionString
  30. value: ${MONGO_DB_CONNECTION_STRING}
  31. - name: MongoDatabase
  32. value: ${MARKETING_DB_NAME}
  33. - name: EventBusConnection
  34. value: ${RABBITMQ_HOSTNAME}
  35. - name: IdentityUrl
  36. value: ${IDENTITY_URL}
  37. - name: IdentityUrlExternal
  38. value: ${IDENTITY_URL_EXTERNAL}
  39. - name: CampaignDetailFunctionUri
  40. value:
  41. - name: PicBaseUrl
  42. value: ${PIC_BASE_URL}
  43. - name: PATH_BASE
  44. value: /marketing-api
  45. - name: ConnectionString
  46. valueFrom:
  47. secretKeyRef:
  48. key: ConnectionString
  49. name: marketing-db-connection-secret
  50. image: docker-registry.default.svc:5000/${IMAGE_REGISTRY_PROJECT_NAME}/${APPLICATION_NAME}:latest
  51. imagePullPolicy: Always
  52. name: ${APPLICATION_NAME}
  53. ports:
  54. - containerPort: 8080
  55. protocol: TCP
  56. resources: {}
  57. terminationMessagePath: /dev/termination-log
  58. terminationMessagePolicy: File
  59. dnsPolicy: ClusterFirst
  60. restartPolicy: Always
  61. schedulerName: default-scheduler
  62. securityContext: {}
  63. terminationGracePeriodSeconds: 30
  64. triggers:
  65. - type: ConfigChange
  66. - imageChangeParams:
  67. automatic: true
  68. containerNames:
  69. - ${APPLICATION_NAME}
  70. from:
  71. kind: ImageStreamTag
  72. name: ${APPLICATION_NAME}:latest
  73. namespace: ${IMAGE_REGISTRY_PROJECT_NAME}
  74. type: ImageChange
  75. - apiVersion: v1
  76. kind: Service
  77. metadata:
  78. labels:
  79. app: ${APPLICATION_NAME}
  80. template: ${TEMPLATE_NAME}
  81. name: ${APPLICATION_NAME}
  82. spec:
  83. ports:
  84. - name: 8080-tcp
  85. port: 8080
  86. protocol: TCP
  87. targetPort: 8080
  88. selector:
  89. app: ${APPLICATION_NAME}
  90. deploymentconfig: ${APPLICATION_NAME}
  91. sessionAffinity: None
  92. type: ClusterIP
  93. status:
  94. loadBalancer: {}
  95. parameters:
  96. - description: The name for the application.
  97. displayName: Application Name
  98. name: APPLICATION_NAME
  99. required: true
  100. value: marketingapi
  101. - description: The OpenShift project name that is hosting the image registry.
  102. displayName: Image Registry Project Name
  103. name: IMAGE_REGISTRY_PROJECT_NAME
  104. required: true
  105. - description: The template name.
  106. displayName: Template Name
  107. name: TEMPLATE_NAME
  108. required: true
  109. value: marketingapi-deploy-template
  110. - description: The connection string to the MongoDB Marketing database
  111. displayName: MongoDB Connection String
  112. name: MONGO_DB_CONNECTION_STRING
  113. required: true
  114. - description: The Marketing database name
  115. displayName: Marketing Database Name
  116. name: MARKETING_DB_NAME
  117. required: true
  118. - description: The hostname of the RabbitMQ service
  119. displayName: RabbitMQ Hostname
  120. name: RABBITMQ_HOSTNAME
  121. required: true
  122. - description: The cluster internal URL of the Identity endpoint
  123. displayName: Identity URL
  124. name: IDENTITY_URL
  125. required: true
  126. - description: The external URL of the Identity endpoint
  127. displayName: Identity URL External
  128. name: IDENTITY_URL_EXTERNAL
  129. required: true
  130. - description: The public base URL for the catalog pictures
  131. displayName: Pictures Base URL
  132. name: PIC_BASE_URL
  133. required: true