@@ -28,39 +28,53 @@ spec:
28
28
{{- toYaml . | nindent 8 }}
29
29
{{- end }}
30
30
serviceAccountName : {{ include "multi-arch-container-rust.serviceAccountName" . }}
31
+ {{- if hasKey .Values "podSecurityContext" }}
31
32
securityContext :
32
33
{{- toYaml .Values.podSecurityContext | nindent 8 }}
34
+ {{- end }}
33
35
containers :
34
36
- name : {{ .Chart.Name }}
37
+ {{- if hasKey .Values "securityContext" }}
35
38
securityContext :
36
39
{{- toYaml .Values.securityContext | nindent 12 }}
40
+ {{- end }}
37
41
image : " {{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
38
42
imagePullPolicy : {{ .Values.image.pullPolicy }}
39
43
ports :
40
44
- name : http
41
45
containerPort : {{ .Values.service.port }}
42
46
protocol : TCP
43
47
env :
48
+ {{- if hasKey .Values "git" }}
44
49
- name : " GIT_REPOSITORY"
45
50
value : {{ .Values.git.repository | default "" | quote }}
46
51
- name : " GIT_BRANCH"
47
52
value : {{ .Values.git.branch | default "" | quote }}
48
53
- name : " GIT_COMMIT"
49
54
value : {{ .Values.git.commit | default "" | quote }}
55
+ {{- end }}
50
56
- name : " GIT_TAG"
51
57
value : {{ .Values.image.tag | default .Chart.AppVersion }}
58
+ {{- if hasKey .Values "github" }}
52
59
- name : " GITHUB_WORKFLOW"
53
60
value : {{ .Values.github.workflow | default "" | quote }}
54
61
- name : " GITHUB_RUN_ID"
55
62
value : {{ .Values.github.run_id | int64 | default 0 | quote }}
56
63
- name : " GITHUB_RUN_NUMBER"
57
64
value : {{ .Values.github.run_number | int64 | default 0 | quote }}
65
+ {{- end }}
66
+ {{- if hasKey .Values "livenessProbe" }}
58
67
livenessProbe :
59
68
{{- toYaml .Values.livenessProbe | nindent 12 }}
69
+ {{- end }}
70
+ {{- if hasKey .Values "readinessProbe" }}
60
71
readinessProbe :
61
72
{{- toYaml .Values.readinessProbe | nindent 12 }}
73
+ {{- end }}
74
+ {{- if hasKey .Values "resources" }}
62
75
resources :
63
76
{{- toYaml .Values.resources | nindent 12 }}
77
+ {{- end }}
64
78
{{- with .Values.volumeMounts }}
65
79
volumeMounts :
66
80
{{- toYaml . | nindent 12 }}
0 commit comments