-
Notifications
You must be signed in to change notification settings - Fork 1
/
deployment.yaml
107 lines (107 loc) · 2.36 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
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: catracker
labels:
uri: catracker.eu
spec:
selector:
matchLabels:
uri: catracker.eu
template:
metadata:
labels:
uri: catracker.eu
spec:
containers:
- name: http
imagePullPolicy: Always
image: eblovich/catracker-http:${APP_VERSION}
securityContext:
allowPrivilegeEscalation: false
runAsNonRoot: true
runAsUser: 10002
ports:
- containerPort: 8080
resources:
limits:
memory: 128Mi
requests:
memory: 64Mi
volumeMounts:
- mountPath: /var/cache/nginx
name: cache-http
- name: app
imagePullPolicy: Always
image: eblovich/catracker-service:${APP_VERSION}
env:
- name: DATABASE_PASSWORD
valueFrom:
secretKeyRef:
name: catracker
key: DATABASE_PASSWORD
securityContext:
allowPrivilegeEscalation: false
runAsNonRoot: true
runAsUser: 10002
ports:
- containerPort: 8081
resources:
limits:
memory: 1G
requests:
memory: 512Mi
volumes:
- name: cache
emptyDir: {}
- name: cache-http
emptyDir: {}
---
apiVersion: v1
kind: Service
metadata:
name: catracker-service
spec:
selector:
uri: catracker.eu
type: ClusterIP
ports:
- name: http
protocol: TCP
targetPort: 8080
port: 8080
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: catracker-ingress
labels:
uri: catracker.eu
annotations:
kubernetes.io/ingress.class: "nginx"
cert-manager.io/cluster-issuer: "letsencrypt-prod"
nginx.ingress.kubernetes.io/force-ssl-redirect: "True"
spec:
rules:
- host: catracker.eu
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: catracker-service
port:
number: 8080
tls:
- hosts:
- catracker.eu
secretName: catracker-tls
---
kind: Secret
apiVersion: v1
metadata:
name: catracker
stringData:
DATABASE_PASSWORD: ${DATABASE_PASSWORD}
type: Opaque