-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy.yaml
164 lines (164 loc) · 3.66 KB
/
deploy.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
apiVersion: apps/v1
kind: Deployment
metadata:
name: web-primary
namespace: pcfweb
labels:
app: web-primary
spec:
replicas: 1
selector:
matchLabels:
app: web-primary
template:
metadata:
labels:
app: web-primary
spec:
volumes:
- name: client-secret
secret:
secretName: client-secret
optional: false
containers:
- image: holdenk/pcfweb:v0.9.11b
name: pcfweb
volumeMounts:
- name: client-secret
mountPath: "/opt/app/client_secret/"
readOnly: true
env:
- name: OAUTHLIB_RELAX_TOKEN_SCOPE
value: "1"
- name: PRIMARY
value: "1"
- name: ATOMIC_REQUESTS
value: "False"
envFrom:
- secretRef:
name: pcfweb-secret
imagePullPolicy: Always
ports:
- containerPort: 80
name: web
livenessProbe:
httpGet:
httpHeaders:
- name: Host
value: "www.pigscanfly.ca"
path: /
port: 80
periodSeconds: 180
startupProbe:
httpGet:
httpHeaders:
- name: Host
value: "www.pigscanfly.ca"
path: /
port: 80
periodSeconds: 10
failureThreshold: 30
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: web
namespace: pcfweb
labels:
app: pcfweb
spec:
replicas: 3
selector:
matchLabels:
app: pcfweb
template:
metadata:
labels:
app: pcfweb
spec:
volumes:
- name: client-secret
secret:
secretName: client-secret
optional: false
containers:
- image: holdenk/pcfweb:v0.9.11b
name: pcfweb
volumeMounts:
- name: client-secret
mountPath: "/opt/app/client_secret/"
readOnly: true
env:
- name: OAUTHLIB_RELAX_TOKEN_SCOPE
value: "1"
- name: ATOMIC_REQUESTS
value: "False"
envFrom:
- secretRef:
name: pcfweb-secret
imagePullPolicy: Always
ports:
- containerPort: 80
name: web
livenessProbe:
httpGet:
httpHeaders:
- name: Host
value: "www.pigscanfly.ca"
path: /
port: 80
periodSeconds: 180
startupProbe:
httpGet:
httpHeaders:
- name: Host
value: "www.pigscanfly.ca"
path: /
port: 80
periodSeconds: 10
failureThreshold: 30
---
apiVersion: v1
kind: Service
metadata:
labels:
app: pcfweb
name: web-svc
namespace: pcfweb
spec:
ports:
- name: http
port: 80
protocol: TCP
targetPort: web
selector:
app: pcfweb
sessionAffinity: None
type: ClusterIP
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: pcfweb-ingress
namespace: pcfweb
annotations:
cert-manager.io/cluster-issuer: letsencrypt
cert-manager.io/issue-temporary-certificate: "true"
acme.cert-manager.io/http01-edit-in-place: "true"
spec:
ingressClassName: nginx
tls:
- hosts:
- www.pigscanfly.ca
secretName: pcf-tls-secret
rules:
- host: www.pigscanfly.ca
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: web-svc
port:
number: 80