-
Notifications
You must be signed in to change notification settings - Fork 0
/
ocp-deploy-template.yml
168 lines (163 loc) · 4.16 KB
/
ocp-deploy-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
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
apiVersion: v1
kind: Template
labels:
template: ips-microservice
metadata:
name: ips-microservice
objects:
- apiVersion: v1
kind: DeploymentConfig
metadata:
labels:
app: ${NAME}
name: ${NAME}
spec:
replicas: 1
selector:
name: ${NAME}
strategy:
rollingParams:
intervalSeconds: 1
maxSurge: 25%
maxUnavailable: 25%
timeoutSeconds: 600
updatePeriodSeconds: 1
type: Rolling
template:
metadata:
labels:
name: ${NAME}
spec:
containers:
- env:
- name: IPS_URL
valueFrom:
configMapKeyRef:
name: ${NAME}-config-${CONFIGVERSION}
key: ips_url
- name: IPS_USER
valueFrom:
configMapKeyRef:
name: ${NAME}-config-${CONFIGVERSION}
key: ips_user
- name: CPS_PASSWORD
valueFrom:
secretKeyRef:
name: ${NAME}-secret-${CONFIGVERSION}
key: cps_password
- name: PPS_USER
valueFrom:
configMapKeyRef:
name: ${NAME}-config-${CONFIGVERSION}
key: pps_user
- name: PPS_PASSWORD
valueFrom:
secretKeyRef:
name: ${NAME}-secret-${CONFIGVERSION}
key: pps_password
- name: PPS_URL
valueFrom:
configMapKeyRef:
name: ${NAME}-config-${CONFIGVERSION}
key: pps_url
- name: AUTH_USER
valueFrom:
configMapKeyRef:
name: ${NAME}-config-${CONFIGVERSION}
key: auth_user
- name: AUTH_PASSWORD
valueFrom:
secretKeyRef:
name: ${NAME}-secret-${CONFIGVERSION}
key: auth_password
- name: NODE_EXTRA_CA_CERTS
value: /usr/src/app/lib/cps.cert
image: "${IS_PULL_NAMESPACE}/${NAME}"
imagePullPolicy: Always
name: ${NAME}
ports:
- containerPort: 8080
protocol: TCP
readinessProbe:
failureThreshold: 3
httpGet:
path: /
port: 8080
scheme: HTTP
initialDelaySeconds: 10
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
resources:
limits:
cpu: 100m
memory: 200Mi
requests:
cpu: 50m
memory: 100Mi
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
test: false
triggers:
- type: ImageChange
imageChangeParams:
automatic: false
containerNames:
- ${NAME}
from:
kind: ImageStreamTag
namespace: ${IS_PULL_NAMESPACE}
name: '${NAME}:${IS_TAG}'
- apiVersion: v1
kind: Service
metadata:
labels:
name: ${NAME}
name: ${NAME}
spec:
ports:
- name: 8080-tcp
port: 8080
protocol: TCP
targetPort: 8080
selector:
name: ${NAME}
sessionAffinity: None
type: ClusterIP
- apiVersion: v1
kind: Route
metadata:
labels:
name: ${NAME}
name: ${NAME}
spec:
host: ${SECUREROUTE}
to:
kind: Service
name: ${NAME}
weight: 100
port:
targetPort: 8080-tcp
tls:
termination: edge
insecureEdgeTerminationPolicy: Redirect
wildcardPolicy: None
parameters:
- name: "NAME"
required: true
value: ips-microservice
- name: "IS_TAG"
required: true
- name: "IS_PULL_NAMESPACE"
required: true
- name: "NUM_REPLICAS"
required: true
- name: "CONFIGVERSION"
required: true
- name: "SECUREROUTE"
required: true