-
Notifications
You must be signed in to change notification settings - Fork 36
/
deployment.yaml
58 lines (58 loc) · 1.79 KB
/
deployment.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
apiVersion: apps/v1
kind: Deployment
metadata:
name: werf-guide-app
spec:
replicas: 1
selector:
matchLabels:
app: werf-guide-app
# [<snippet nginx_conf_checksum>]
# [<snippet configmap_app_envs_checksum>]
template:
metadata:
labels:
app: werf-guide-app
annotations:
checksum/configmap-nginx: '{{ include (print $.Template.BasePath "/configmap-nginx.yaml") . | sha256sum }}'
# [<endsnippet nginx_conf_checksum>]
checksum/configmap-app-envs: '{{ include (print $.Template.BasePath "/configmap-app-envs.yaml") . | sha256sum }}'
# [<endsnippet configmap_app_envs_checksum>]
checksum/secret-app-envs: '{{ include (print $.Template.BasePath "/secret-app-envs.yaml") . | sha256sum }}'
spec:
imagePullSecrets:
- name: registrysecret
volumes:
- name: run-php
emptyDir: {}
- name: nginx-conf
configMap:
name: nginx-conf
# [<snippet backend_conf>]
# [<snippet backend_secret>]
containers:
- name: backend
image: {{ .Values.werf.image.backend }}
volumeMounts:
- mountPath: /var/run/php
name: run-php
envFrom:
- configMapRef:
name: app-envs
# [<endsnippet backend_conf>]
- secretRef:
name: app-envs
# [<endsnippet backend_secret>]
# [<snippet nginx_conf>]
- name: frontend
image: {{ .Values.werf.image.frontend }}
ports:
- containerPort: 8080
name: http
volumeMounts:
- mountPath: /var/run/php
name: run-php
- mountPath: /etc/nginx/nginx.conf
subPath: nginx.conf
name: nginx-conf
# [<endsnippet nginx_conf>]