1
1
apiVersion : v1
2
2
kind : Template
3
+ labels :
4
+ template : openshift-tasks
3
5
metadata :
4
6
name : openshift-tasks
5
7
objects :
6
8
- apiVersion : v1
7
9
kind : ImageStream
8
10
metadata :
11
+ labels :
12
+ application : ${APPLICATION_NAME}
13
+ name : ${APPLICATION_NAME}
14
+ - apiVersion : v1
15
+ kind : Service
16
+ metadata :
17
+ annotations :
18
+ description : The web server's http port.
19
+ labels :
20
+ application : ${APPLICATION_NAME}
21
+ name : ${APPLICATION_NAME}
22
+ spec :
23
+ ports :
24
+ - port : 8080
25
+ targetPort : 8080
26
+ selector :
27
+ deploymentConfig : ${APPLICATION_NAME}
28
+ - apiVersion : v1
29
+ id : ${APPLICATION_NAME}-http
30
+ kind : Route
31
+ metadata :
32
+ annotations :
33
+ description : Route for application's http service.
34
+ labels :
35
+ application : ${APPLICATION_NAME}
9
36
name : ${APPLICATION_NAME}
37
+ spec :
38
+ to :
39
+ name : ${APPLICATION_NAME}
10
40
- apiVersion : v1
11
41
kind : BuildConfig
12
42
metadata :
13
43
labels :
14
- app : ${APPLICATION_NAME}
44
+ application : ${APPLICATION_NAME}
15
45
name : ${APPLICATION_NAME}
16
46
spec :
17
47
output :
18
48
to :
19
49
kind : ImageStreamTag
20
50
name : ${APPLICATION_NAME}:latest
21
- postCommit : {}
22
- resources : {}
23
51
source :
24
52
git :
25
- ref : ${SOURCE_REFERENCE }
53
+ ref : ${SOURCE_REF }
26
54
uri : ${SOURCE_URL}
27
- secrets : null
28
55
type : Git
29
56
strategy :
30
57
sourceStrategy :
58
+ forcePull : true
31
59
from :
32
60
kind : ImageStreamTag
33
61
name : jboss-eap64-openshift:1.3
34
62
namespace : openshift
35
- incremental : false
36
63
type : Source
37
64
triggers :
38
- - generic :
39
- secret : ${GENERIC_WEBHOOK_SECRET}
40
- type : Generic
41
65
- github :
42
- secret : ${GITHUB_WEBHOOK_SECRET}
66
+ secret : kJZLvfQr3hZg
43
67
type : GitHub
68
+ - generic :
69
+ secret : kJZLvfQr3hZg
70
+ type : Generic
44
71
- imageChange : {}
45
72
type : ImageChange
46
73
- type : ConfigChange
47
- status :
48
- lastVersion : 0
49
74
- apiVersion : v1
50
75
kind : DeploymentConfig
51
76
metadata :
52
77
labels :
53
- app : ${APPLICATION_NAME}
78
+ application : ${APPLICATION_NAME}
54
79
name : ${APPLICATION_NAME}
55
80
spec :
56
81
replicas : 1
57
82
selector :
58
- deploymentconfig : tasks
83
+ deploymentConfig : ${APPLICATION_NAME}
59
84
strategy :
60
- resources : {}
61
- rollingParams :
62
- intervalSeconds : 1
63
- maxSurge : 25%
64
- maxUnavailable : 25%
65
- timeoutSeconds : 600
66
- updatePeriodSeconds : 1
67
- type : Rolling
85
+ type : Recreate
68
86
template :
69
87
metadata :
70
88
labels :
71
- app : ${APPLICATION_NAME}
72
- deploymentconfig : ${APPLICATION_NAME}
89
+ application : ${APPLICATION_NAME}
90
+ deploymentConfig : ${APPLICATION_NAME}
91
+ name : ${APPLICATION_NAME}
73
92
spec :
74
93
containers :
75
- - name : ${APPLICATION_NAME}
76
- env :
94
+ - env :
77
95
- name : MY_POD_IP
78
96
valueFrom :
79
97
fieldRef :
80
98
apiVersion : v1
81
99
fieldPath : status.podIP
82
- image : " "
100
+ - name : OPENSHIFT_KUBE_PING_LABELS
101
+ value : application=${APPLICATION_NAME}
102
+ - name : OPENSHIFT_KUBE_PING_NAMESPACE
103
+ valueFrom :
104
+ fieldRef :
105
+ fieldPath : metadata.namespace
106
+ - name : HORNETQ_CLUSTER_PASSWORD
107
+ value : kJZLvfQr3hZg
108
+ - name : JGROUPS_CLUSTER_PASSWORD
109
+ value : kJZLvfQr3hZg
110
+ image : ${APPLICATION_NAME}
83
111
imagePullPolicy : Always
84
112
livenessProbe :
85
113
failureThreshold : 3
@@ -91,102 +119,43 @@ objects:
91
119
periodSeconds : 45
92
120
successThreshold : 1
93
121
timeoutSeconds : 1
94
- name : tasks
122
+ name : ${APPLICATION_NAME}
95
123
ports :
96
- - containerPort : 8080
124
+ - containerPort : 8778
125
+ name : jolokia
97
126
protocol : TCP
98
- - containerPort : 8443
127
+ - containerPort : 8080
128
+ name : http
99
129
protocol : TCP
100
- - containerPort : 8778
130
+ - containerPort : 8888
131
+ name : ping
101
132
protocol : TCP
102
133
readinessProbe :
103
134
failureThreshold : 3
104
135
httpGet :
105
136
path : /ws/demo/healthcheck
106
137
port : 8080
107
138
scheme : HTTP
108
- initialDelaySeconds : 20
109
- periodSeconds : 5
110
- successThreshold : 1
111
- timeoutSeconds : 1
112
- resources : {}
113
- terminationMessagePath : /dev/termination-log
114
- dnsPolicy : ClusterFirst
115
- restartPolicy : Always
116
- securityContext : {}
117
- terminationGracePeriodSeconds : 30
118
- test : false
139
+ terminationGracePeriodSeconds : 60
119
140
triggers :
120
141
- imageChangeParams :
121
142
automatic : true
122
143
containerNames :
123
144
- ${APPLICATION_NAME}
124
145
from :
125
- kind : ImageStreamTag
126
- name : ${APPLICATION_NAME}:latest
146
+ kind : ImageStream
147
+ name : ${APPLICATION_NAME}
127
148
type : ImageChange
128
149
- type : ConfigChange
129
- status : {}
130
- - apiVersion : v1
131
- kind : Service
132
- metadata :
133
- labels :
134
- app : ${APPLICATION_NAME}
135
- name : ${APPLICATION_NAME}
136
- spec :
137
- ports :
138
- - name : 8080-tcp
139
- port : 8080
140
- protocol : TCP
141
- targetPort : 8080
142
- - name : 8443-tcp
143
- port : 8443
144
- protocol : TCP
145
- targetPort : 8443
146
- - name : 8778-tcp
147
- port : 8778
148
- protocol : TCP
149
- targetPort : 8778
150
- selector :
151
- deploymentconfig : ${APPLICATION_NAME}
152
- sessionAffinity : None
153
- type : ClusterIP
154
- status :
155
- loadBalancer : {}
156
- - apiVersion : v1
157
- kind : Route
158
- metadata :
159
- labels :
160
- app : ${APPLICATION_NAME}
161
- name : ${APPLICATION_NAME}
162
- spec :
163
- host : " "
164
- port :
165
- targetPort : 8080-tcp
166
- to :
167
- kind : Service
168
- name : ${APPLICATION_NAME}
169
150
parameters :
170
- - description : The name of the application and the prefix for its artifacts
171
- displayName : Application Name
151
+ - description : The name for the application.
172
152
name : APPLICATION_NAME
153
+ required : true
173
154
value : tasks
174
- - description : The URL of the source code repository
175
- displayName : Source URL
155
+ - description : Git source URI for application
176
156
name : SOURCE_URL
157
+ required : true
177
158
value : https://github.com/openshiftdemos/openshift-tasks
178
- - description : The branch or tag of the source code to use
179
- displayName : Source Reference
180
- name : SOURCE_REFERENCE
159
+ - description : Git branch/tag reference
160
+ name : SOURCE_REF
181
161
value : master
182
- - description : A secret string used to configure the GitHub webhook.
183
- displayName : GitHub Webhook Secret
184
- from : ' [a-zA-Z0-9]{40}'
185
- generate : expression
186
- name : GITHUB_WEBHOOK_SECRET
187
- - description : A secret string used to configure the generic webhook.
188
- displayName : Generic Webhook Secret
189
- from : ' [a-zA-Z0-9]{40}'
190
- generate : expression
191
- name : GENERIC_WEBHOOK_SECRET
192
-
0 commit comments