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.

122 lines
3.2 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. revisionHistoryLimit: 10
  16. selector:
  17. app: ${APPLICATION_NAME}
  18. deploymentconfig: ${APPLICATION_NAME}
  19. strategy:
  20. activeDeadlineSeconds: 21600
  21. resources: {}
  22. rollingParams:
  23. intervalSeconds: 1
  24. maxSurge: 25%
  25. maxUnavailable: 25%
  26. timeoutSeconds: 600
  27. updatePeriodSeconds: 1
  28. type: Rolling
  29. template:
  30. metadata:
  31. labels:
  32. app: ${APPLICATION_NAME}
  33. deploymentconfig: ${APPLICATION_NAME}
  34. spec:
  35. containers:
  36. - env:
  37. - name: ACCEPT_EULA
  38. value: 'Y'
  39. image: datalust/${APPLICATION_NAME}:latest
  40. imagePullPolicy: Always
  41. name: ${APPLICATION_NAME}
  42. ports:
  43. - containerPort: 80
  44. protocol: TCP
  45. - containerPort: 5341
  46. protocol: TCP
  47. resources: {}
  48. terminationMessagePath: /dev/termination-log
  49. terminationMessagePolicy: File
  50. dnsPolicy: ClusterFirst
  51. restartPolicy: Always
  52. schedulerName: default-scheduler
  53. securityContext: {}
  54. terminationGracePeriodSeconds: 30
  55. triggers:
  56. - type: ConfigChange
  57. - imageChangeParams:
  58. automatic: true
  59. containerNames:
  60. - ${APPLICATION_NAME}
  61. from:
  62. kind: ImageStreamTag
  63. name: '${APPLICATION_NAME}:latest'
  64. namespace: ${IMAGE_REGISTRY_PROJECT_NAME}
  65. lastTriggeredImage: datalust/${APPLICATION_NAME}:latest
  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: 80-tcp
  77. port: 80
  78. protocol: TCP
  79. targetPort: 80
  80. - name: 5341-tcp
  81. port: 5341
  82. protocol: TCP
  83. targetPort: 5341
  84. selector:
  85. app: ${APPLICATION_NAME}
  86. deploymentconfig: ${APPLICATION_NAME}
  87. sessionAffinity: None
  88. type: ClusterIP
  89. - apiVersion: image.openshift.io/v1
  90. kind: ImageStream
  91. metadata:
  92. labels:
  93. app: ${APPLICATION_NAME}
  94. template: ${TEMPLATE_NAME}
  95. name: ${APPLICATION_NAME}
  96. spec:
  97. lookupPolicy:
  98. local: false
  99. tags:
  100. - annotations:
  101. openshift.io/imported-from: 'datalust/${APPLICATION_NAME}:latest'
  102. from:
  103. kind: DockerImage
  104. name: 'datalust/${APPLICATION_NAME}:latest'
  105. importPolicy: {}
  106. name: latest
  107. referencePolicy:
  108. type: Source
  109. parameters:
  110. - description: The name for the application.
  111. displayName: Application Name
  112. name: APPLICATION_NAME
  113. required: true
  114. value: seq
  115. - description: The OpenShift project name that is hosting the image registry.
  116. displayName: Image Registry Project Name
  117. name: IMAGE_REGISTRY_PROJECT_NAME
  118. required: true
  119. - description: The template name.
  120. displayName: Template Name
  121. name: TEMPLATE_NAME
  122. required: true
  123. value: seq-deploy-template