-
Notifications
You must be signed in to change notification settings - Fork 88
/
deployment.yaml
53 lines (50 loc) · 1.58 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
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "reservation-server.fullname" . }}
labels:
{{- include "reservation-server.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.reservation.replicaCount }}
selector:
matchLabels:
{{- include "reservation-server.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
{{- include "reservation-server.selectorLabels" . | nindent 8 }}
spec:
containers:
- name: {{ .Chart.Name }}
image: {{ .Values.reservation.image.repository }}:{{ .Values.reservation.image.tag }}
imagePullPolicy: {{ .Values.reservation.image.pullPolicy }}
ports:
- name: http
containerPort: 80
protocol: TCP
livenessProbe:
httpGet:
path: /health
port: http
initialDelaySeconds: 60
periodSeconds: 10
readinessProbe:
httpGet:
path: /api/notice
port: http
initialDelaySeconds: 60
periodSeconds: 10
resources:
{{- toYaml .Values.reservation.resources | nindent 12 }}
volumeMounts:
- name: settings
mountPath: /app/appsettings.json
subPath: appsettings
initContainers:
- name: init-redis
image: busybox:1.31
command: ['sh', '-c', 'until nslookup {{ .Values.redis.svcName }}; do echo waiting for redis; sleep 2; done;']
volumes:
- name: settings
configMap:
name: reservation-configs