Newer
Older
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
apiVersion: apps/v1
kind: Deployment
metadata:
name: backend
spec:
selector:
matchLabels:
app: backend
strategy:
rollingUpdate:
maxSurge: 0
template:
metadata:
labels:
app: backend
spec:
containers:
- name: backend
image: backend-placeholder
envFrom:
- configMapRef:
name: backend
- secretRef:
name: backend
- secretRef:
name: database
securityContext:
readOnlyRootFilesystem: true
ports:
- name: backend
containerPort: 8001
volumeMounts:
- name: photos
mountPath: /data
- name: protected-media
mountPath: /protected_media
- name: logs
mountPath: /logs
- name: cache
mountPath: /root/.cache
- name: backend-tmp
mountPath: /tmp
- name: proxy
image: proxy-placeholder
securityContext:
readOnlyRootFilesystem: true
ports:
- name: proxy
containerPort: 80
volumeMounts:
- name: photos
mountPath: /data
- name: protected-media
mountPath: /protected_media
- name: nginx-cache
mountPath: /var/cache/nginx
- name: proxy-var-run
mountPath: /var/run
securityContext:
runAsUser: 65534
runAsGroup: 65534
fsGroup: 65534
volumes:
- name: photos
persistentVolumeClaim:
claimName: photos
- name: protected-media
persistentVolumeClaim:
claimName: protected
- name: logs
emptyDir: {}
- name: cache
emptyDir: {}
- name: backend-tmp
emptyDir: {}
- name: nginx-cache
emptyDir: {}
- name: proxy-var-run
emptyDir: {}
---
apiVersion: v1
kind: Service
metadata:
name: backend
spec:
selector:
app: backend
ports:
- name: http
port: 8001
targetPort: backend
---
apiVersion: v1
kind: Service
metadata:
name: proxy
spec:
selector:
app: backend
ports:
- name: http
port: 80
targetPort: proxy