-
Notifications
You must be signed in to change notification settings - Fork 55
/
deployment.yaml
78 lines (78 loc) · 2.33 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
apiVersion: apps/v1
kind: Deployment
metadata:
name: infra-engine
namespace: {{ .Release.Namespace }}
spec:
selector:
matchLabels:
app: infra-engine
replicas: 1
template:
metadata:
labels:
app: infra-engine
annotations:
rollme: {{ randAlphaNum 5 | quote }}
spec:
automountServiceAccountToken: true
serviceAccountName: infra-engine
dnsPolicy: ClusterFirst
{{- with .Values.image.pullSecrets }}
imagePullSecrets:
{{- range . }}
- name: {{ . }}
{{- end }}
{{- end }}
containers:
- name: engine
image: {{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
args: ["engine", "--tls-cache", "/var/run/infra/data/cache"]
ports:
{{- range .Values.service.ports }}
- name: {{ .name }}
containerPort: {{ .targetPort }}
{{- end }}
env:
{{- with .Values.name }}
- name: INFRA_ENGINE_NAME
value: {{ . | quote }}
{{- end }}
- name: INFRA_ENGINE_REGISTRY
value: {{ required "Value registry is required" .Values.registry | quote }}
- name: INFRA_LOG_LEVEL
value: {{ .Values.logLevel | default "info" }}
- name: INFRA_ENGINE_API_KEY
valueFrom:
secretKeyRef:
name: infra-engine
key: api-key
optional: true
volumeMounts:
- name: infra-engine-anonymous
mountPath: /var/run/secrets/infra-engine-anonymous
readOnly: true
- name: data
mountPath: /var/run/infra/data
readinessProbe:
httpGet:
scheme: HTTPS
path: /healthz
{{- with first .Values.service.ports }}
port: {{ .targetPort }}
{{- end }}
livenessProbe:
httpGet:
scheme: HTTPS
path: /healthz
{{- with first .Values.service.ports }}
port: {{ .targetPort }}
{{- end }}
periodSeconds: 3
volumes:
- name: infra-engine-anonymous
secret:
secretName: infra-engine-anonymous-secret
- name: data
emptyDir: {}