@@ -16,63 +16,13 @@ initContainers:
16
16
17
17
containers:
18
18
- name: { { .Chart.Name } }
19
- image: "{ { .Values.image.repository } }:{ { .Values.image.tag } }"
20
- imagePullPolicy: Always
21
- { {- if .Values.command } }
22
- command:
23
- { { toYaml .Values.command | nindent 6 } }
24
- { {- end } }
25
- { {- if .Values.args } }
26
- args:
27
- { { toYaml .Values.args | nindent 6 } }
28
- { {- end } }
29
- { {- if or (.Values.volumeMounts) (.Values.csi) } }
30
- volumeMounts:
31
- { {- if .Values.volumeMounts } }
32
- { { toYaml .Values.volumeMounts | nindent 6 } }
33
- { {- end } }
34
- { {- if .Values.csi } }
35
- - name: { { .Values.csi.name } }
36
- mountPath: { { .Values.csi.mountPath | quote } }
37
- readOnly: true
38
- { {- end } }
39
- { {- end } }
40
- ports:
41
- - name: http
42
- containerPort: { { .Values.service.targetPort | default 8080 } }
43
- protocol: TCP
44
- { { if .Values.extraContainerPorts } }
45
- { { toYaml .Values.extraContainerPorts | nindent 6 } }
46
- { {- end } }
47
- { {- if and (.Values.liveness) (.Values.liveness.enabled) } }
48
- livenessProbe:
49
- httpGet:
50
- path: { { .Values.liveness.path | default " /" } }
51
- port: { { .Values.liveness.port | default 8080 } }
52
- initialDelaySeconds: { { .Values.liveness.delay | default 15 } }
53
- timeoutSeconds: { { .Values.liveness.timeout | default 15 } }
54
- periodSeconds: { { .Values.liveness.periodSeconds | default 15 } }
55
- { {- end } }
56
- { {- if and (.Values.readiness) (.Values.readiness.enabled) } }
57
- readinessProbe:
58
- httpGet:
59
- path: { { .Values.readiness.path | default " /" } }
60
- port: { { .Values.readiness.port | default 8080 } }
61
- initialDelaySeconds: { { .Values.readiness.delay | default 15 } }
62
- timeoutSeconds: { { .Values.readiness.timeout | default 15 } }
63
- periodSeconds: { { .Values.readiness.periodSeconds | default 15 } }
64
- { {- end } }
65
- env:
66
- { {- if .Values.secrets } }
67
- { { toYaml .Values.secrets | nindent 6 } }
68
- { {- end } }
69
- { {- if .Values.environment } }
70
- { { toYaml .Values.environment | nindent 6 } }
71
- { {- end } }
72
- resources:
73
- { { toYaml .Values.resources | nindent 6 } }
74
- securityContext:
75
- { {- toYaml .Values.securityContext | nindent 6 } }
19
+ { {- include " libchart.container" .Values | indent 2 -} }
20
+ { {- range $sc := .Values.sidecars -} }
21
+ { { " - name: " | nindent 2 } }{ { $sc .name } }
22
+ { {- include " libchart.container" $sc | indent 2 } }
23
+ { {- end } }
24
+ { {- if .Values.initContainers } }
25
+ { {- end } }
76
26
{ {- with .Values.nodeSelector } }
77
27
nodeSelector:
78
28
{ { toYaml . | nindent 4 } }
0 commit comments