forked from OpenShiftDemos/openshift-tasks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
app-template.yaml
172 lines (172 loc) · 4.22 KB
/
app-template.yaml
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
apiVersion: v1
kind: Template
labels:
template: openshift-tasks
metadata:
name: openshift-tasks
objects:
- apiVersion: v1
kind: ImageStream
metadata:
labels:
application: ${APPLICATION_NAME}
name: ${APPLICATION_NAME}
- apiVersion: v1
kind: Service
metadata:
annotations:
description: The web server's http port.
labels:
application: ${APPLICATION_NAME}
name: ${APPLICATION_NAME}
spec:
ports:
- port: 8080
targetPort: 8080
selector:
deploymentConfig: ${APPLICATION_NAME}
- apiVersion: v1
id: ${APPLICATION_NAME}-http
kind: Route
metadata:
annotations:
description: Route for application's http service.
labels:
application: ${APPLICATION_NAME}
name: ${APPLICATION_NAME}
spec:
to:
name: ${APPLICATION_NAME}
- apiVersion: v1
kind: BuildConfig
metadata:
labels:
application: ${APPLICATION_NAME}
name: ${APPLICATION_NAME}
spec:
output:
to:
kind: ImageStreamTag
name: ${APPLICATION_NAME}:latest
source:
git:
ref: ${SOURCE_REF}
uri: ${SOURCE_URL}
type: Git
strategy:
sourceStrategy:
forcePull: true
from:
kind: ImageStreamTag
name: jboss-eap64-openshift:latest
namespace: openshift
type: Source
triggers:
- github:
secret: kJZLvfQr3hZg
type: GitHub
- generic:
secret: kJZLvfQr3hZg
type: Generic
- imageChange: {}
type: ImageChange
- type: ConfigChange
- apiVersion: v1
kind: DeploymentConfig
metadata:
labels:
application: ${APPLICATION_NAME}
name: ${APPLICATION_NAME}
spec:
replicas: 1
selector:
deploymentConfig: ${APPLICATION_NAME}
strategy:
resources: {}
rollingParams:
intervalSeconds: 1
maxSurge: 25%
maxUnavailable: 25%
timeoutSeconds: 600
updatePeriodSeconds: 1
type: Rolling
template:
metadata:
labels:
application: ${APPLICATION_NAME}
deploymentConfig: ${APPLICATION_NAME}
name: ${APPLICATION_NAME}
spec:
containers:
- env:
- name: MY_POD_IP
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: status.podIP
- name: OPENSHIFT_KUBE_PING_LABELS
value: application=${APPLICATION_NAME}
- name: OPENSHIFT_KUBE_PING_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: HORNETQ_CLUSTER_PASSWORD
value: kJZLvfQr3hZg
- name: JGROUPS_CLUSTER_PASSWORD
value: kJZLvfQr3hZg
image: ${APPLICATION_NAME}
imagePullPolicy: Always
livenessProbe:
failureThreshold: 3
httpGet:
path: /ws/demo/healthcheck
port: 8080
scheme: HTTP
initialDelaySeconds: 45
periodSeconds: 45
successThreshold: 1
timeoutSeconds: 1
name: ${APPLICATION_NAME}
ports:
- containerPort: 8778
name: jolokia
protocol: TCP
- containerPort: 8080
name: http
protocol: TCP
- containerPort: 8888
name: ping
protocol: TCP
readinessProbe:
failureThreshold: 3
httpGet:
path: /ws/demo/healthcheck
port: 8080
scheme: HTTP
initialDelaySeconds: 20
periodSeconds: 5
successThreshold: 1
timeoutSeconds: 1
terminationGracePeriodSeconds: 60
triggers:
- imageChangeParams:
automatic: true
containerNames:
- ${APPLICATION_NAME}
from:
kind: ImageStream
name: ${APPLICATION_NAME}
type: ImageChange
- type: ConfigChange
parameters:
- description: The name for the application.
name: APPLICATION_NAME
required: true
value: tasks
- description: Git source URI for application
name: SOURCE_URL
required: true
value: https://github.com/openshiftdemos/openshift-tasks
- description: Git branch/tag reference
name: SOURCE_REF
value: master