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.

149 lines
3.9 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. generation: 2
  10. labels:
  11. app: ${APPLICATION_NAME}
  12. template: ${TEMPLATE_NAME}
  13. name: ${APPLICATION_NAME}
  14. spec:
  15. replicas: 1
  16. revisionHistoryLimit: 10
  17. selector:
  18. app: ${APPLICATION_NAME}
  19. deploymentconfig: ${APPLICATION_NAME}
  20. strategy:
  21. activeDeadlineSeconds: 21600
  22. resources: {}
  23. rollingParams:
  24. intervalSeconds: 1
  25. maxSurge: 25%
  26. maxUnavailable: 25%
  27. timeoutSeconds: 600
  28. updatePeriodSeconds: 1
  29. type: Rolling
  30. template:
  31. metadata:
  32. labels:
  33. app: ${APPLICATION_NAME}
  34. deploymentconfig: ${APPLICATION_NAME}
  35. spec:
  36. containers:
  37. - image: ${APPLICATION_NAME}:3-management-alpine
  38. imagePullPolicy: IfNotPresent
  39. name: ${APPLICATION_NAME}
  40. ports:
  41. - containerPort: 5672
  42. protocol: TCP
  43. - containerPort: 15671
  44. protocol: TCP
  45. - containerPort: 15672
  46. protocol: TCP
  47. - containerPort: 25672
  48. protocol: TCP
  49. - containerPort: 4369
  50. protocol: TCP
  51. - containerPort: 5671
  52. protocol: TCP
  53. resources: {}
  54. terminationMessagePath: /dev/termination-log
  55. terminationMessagePolicy: File
  56. volumeMounts:
  57. - mountPath: /var/lib/rabbitmq
  58. name: ${APPLICATION_NAME}-volume-1
  59. dnsPolicy: ClusterFirst
  60. restartPolicy: Always
  61. schedulerName: default-scheduler
  62. securityContext: {}
  63. terminationGracePeriodSeconds: 30
  64. volumes:
  65. - emptyDir: {}
  66. name: ${APPLICATION_NAME}-volume-1
  67. triggers:
  68. - type: ConfigChange
  69. - imageChangeParams:
  70. automatic: true
  71. containerNames:
  72. - ${APPLICATION_NAME}
  73. from:
  74. kind: ImageStreamTag
  75. name: '${APPLICATION_NAME}:3-management-alpine'
  76. namespace: ${IMAGE_REGISTRY_PROJECT_NAME}
  77. type: ImageChange
  78. - apiVersion: v1
  79. kind: Service
  80. metadata:
  81. labels:
  82. app: ${APPLICATION_NAME}
  83. template: ${TEMPLATE_NAME}
  84. name: ${APPLICATION_NAME}
  85. spec:
  86. ports:
  87. - name: 4369-tcp
  88. port: 4369
  89. protocol: TCP
  90. targetPort: 4369
  91. - name: 5671-tcp
  92. port: 5671
  93. protocol: TCP
  94. targetPort: 5671
  95. - name: 5672-tcp
  96. port: 5672
  97. protocol: TCP
  98. targetPort: 5672
  99. - name: 15671-tcp
  100. port: 15671
  101. protocol: TCP
  102. targetPort: 15671
  103. - name: 15672-tcp
  104. port: 15672
  105. protocol: TCP
  106. targetPort: 15672
  107. - name: 25672-tcp
  108. port: 25672
  109. protocol: TCP
  110. targetPort: 25672
  111. selector:
  112. app: ${APPLICATION_NAME}
  113. deploymentconfig: ${APPLICATION_NAME}
  114. sessionAffinity: None
  115. type: ClusterIP
  116. - apiVersion: image.openshift.io/v1
  117. kind: ImageStream
  118. metadata:
  119. labels:
  120. app: ${APPLICATION_NAME}
  121. template: ${TEMPLATE_NAME}
  122. name: ${APPLICATION_NAME}
  123. spec:
  124. lookupPolicy:
  125. local: false
  126. tags:
  127. - annotations:
  128. openshift.io/imported-from: 'rabbitmq:3-management-alpine'
  129. from:
  130. kind: DockerImage
  131. name: 'rabbitmq:3-management-alpine'
  132. importPolicy: {}
  133. name: 3-management-alpine
  134. referencePolicy:
  135. type: Source
  136. parameters:
  137. - description: The name for the application.
  138. displayName: Application Name
  139. name: APPLICATION_NAME
  140. required: true
  141. value: rabbitmq
  142. - description: The OpenShift project name that is hosting the image registry.
  143. displayName: Image Registry Project Name
  144. name: IMAGE_REGISTRY_PROJECT_NAME
  145. required: true
  146. - description: The template name.
  147. displayName: Template Name
  148. name: TEMPLATE_NAME
  149. required: true
  150. value: rabbitmq-deploy-template