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.

141 lines
3.7 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}:latest
  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. status:
  117. loadBalancer: {}
  118. - apiVersion: image.openshift.io/v1
  119. kind: ImageStream
  120. metadata:
  121. labels:
  122. app: ${APPLICATION_NAME}
  123. template: ${TEMPLATE_NAME}
  124. name: ${APPLICATION_NAME}
  125. spec:
  126. lookupPolicy:
  127. local: false
  128. parameters:
  129. - description: The name for the application.
  130. displayName: Application Name
  131. name: APPLICATION_NAME
  132. required: true
  133. value: rabbitmq
  134. - description: The OpenShift project name that is hosting the image registry.
  135. displayName: Image Registry Project Name
  136. name: IMAGE_REGISTRY_PROJECT_NAME
  137. required: true
  138. - description: The template name.
  139. displayName: Template Name
  140. name: TEMPLATE_NAME
  141. required: true
  142. value: rabbitmq-image-deploy-template