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.

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