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.

115 lines
3.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: PATH_BASE
  30. value: /webmarketingapigw
  31. image: docker-registry.default.svc:5000/${IMAGE_REGISTRY_PROJECT_NAME}/${APPLICATION_NAME}:latest
  32. imagePullPolicy: Always
  33. name: ${APPLICATION_NAME}
  34. ports:
  35. - containerPort: 8080
  36. protocol: TCP
  37. - containerPort: 8001
  38. protocol: TCP
  39. resources: {}
  40. terminationMessagePath: /dev/termination-log
  41. terminationMessagePolicy: File
  42. dnsPolicy: ClusterFirst
  43. restartPolicy: Always
  44. schedulerName: default-scheduler
  45. securityContext: {}
  46. terminationGracePeriodSeconds: 30
  47. triggers:
  48. - type: ConfigChange
  49. - imageChangeParams:
  50. automatic: true
  51. containerNames:
  52. - ${APPLICATION_NAME}
  53. from:
  54. kind: ImageStreamTag
  55. name: ${APPLICATION_NAME}:latest
  56. namespace: ${IMAGE_REGISTRY_PROJECT_NAME}
  57. type: ImageChange
  58. - apiVersion: v1
  59. kind: Service
  60. metadata:
  61. labels:
  62. app: ${APPLICATION_NAME}
  63. template: ${TEMPLATE_NAME}
  64. name: ${APPLICATION_NAME}
  65. spec:
  66. ports:
  67. - name: 8080-tcp
  68. port: 8080
  69. protocol: TCP
  70. targetPort: 8080
  71. - name: 8001-tcp
  72. port: 8001
  73. protocol: TCP
  74. targetPort: 8001
  75. selector:
  76. app: ${APPLICATION_NAME}
  77. deploymentconfig: ${APPLICATION_NAME}
  78. sessionAffinity: None
  79. type: ClusterIP
  80. status:
  81. loadBalancer: {}
  82. - apiVersion: image.openshift.io/v1
  83. kind: ImageStream
  84. metadata:
  85. labels:
  86. app: ${APPLICATION_NAME}
  87. template: ${TEMPLATE_NAME}
  88. name: ${APPLICATION_NAME}
  89. spec:
  90. lookupPolicy:
  91. local: false
  92. tags:
  93. - annotations:
  94. openshift.io/imported-from: 'envoyproxy/envoy:v1.11.1'
  95. from:
  96. kind: DockerImage
  97. name: 'envoyproxy/envoy:v1.11.1'
  98. importPolicy: {}
  99. name: latest
  100. referencePolicy:
  101. type: Source
  102. parameters:
  103. - description: The name for the application.
  104. displayName: Application Name
  105. name: APPLICATION_NAME
  106. required: true
  107. value: webmarketingapigw
  108. - description: The OpenShift project name that is hosting the image registry.
  109. displayName: Image Registry Project Name
  110. name: IMAGE_REGISTRY_PROJECT_NAME
  111. required: true
  112. - description: The template name.
  113. displayName: Template Name
  114. name: TEMPLATE_NAME
  115. required: true
  116. value: webmarketingapigw-deploy-template