-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathopenshift-template.yml
114 lines (114 loc) · 2.56 KB
/
openshift-template.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
apiVersion: template.openshift.io/v1
kind: Template
objects:
- apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
metadata:
labels:
app: ${NAME}
app.kubernetes.io/component: hello-java
app.kubernetes.io/instance: ${NAME}
name: ${NAME}
spec:
replicas: 1
selector:
deploymentconfig: ${NAME}
template:
metadata:
labels:
deploymentconfig: ${NAME}
spec:
containers:
- image: ${NAME}
imagePullPolicy: Always
livenessProbe:
httpGet:
path: /
port: 8080
initialDelaySeconds: 180
name: hello-java
readinessProbe:
httpGet:
path: /
port: 8080
initialDelaySeconds: 10
triggers:
- type: ConfigChange
- type: ImageChange
imageChangeParams:
automatic: true
containerNames:
- hello-java
from:
kind: ImageStreamTag
name: ${NAME}:latest
- apiVersion: v1
kind: Service
metadata:
labels:
app: ${NAME}
app.kubernetes.io/component: hello-java
app.kubernetes.io/instance: ${NAME}
name: ${NAME}
spec:
ports:
- port: 8080
protocol: TCP
targetPort: 8080
selector:
deploymentconfig: ${NAME}
type: ClusterIP
- apiVersion: route.openshift.io/v1
kind: Route
metadata:
labels:
app: ${NAME}
app.kubernetes.io/component: hello-java
app.kubernetes.io/instance: ${NAME}
name: ${NAME}
spec:
port:
targetPort: 8080
to:
kind: Service
name: ${NAME}
weight: 100
wildcardPolicy: None
tls:
termination: Edge
- apiVersion: image.openshift.io/v1
kind: ImageStream
metadata:
labels:
app: ${NAME}
app.kubernetes.io/component: hello-java
app.kubernetes.io/instance: ${NAME}
name: ${NAME}
spec:
lookupPolicy:
local: false
tags:
- name: ${IMAGE_TAG}
from:
kind: DockerImage
name: ${IMAGE}:${IMAGE_TAG}
importPolicy:
scheduled: true
referencePolicy:
type: Source
parameters:
- description: The name assigned to all of the frontend objects defined in this template.
displayName: Name
name: NAME
required: true
value: hello-java
- description: The image to deploy, including the full registry URI
displayName: Image
name: IMAGE
required: true
value: quay.io/tdonohue/hello-java
- description: The tag of the image to deploy
displayName: Image Tag
name: IMAGE_TAG
required: true
value: latest