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.

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