@@ -28,39 +28,53 @@ spec:
2828 {{- toYaml . | nindent 8 }}
2929 {{- end }}
3030 serviceAccountName : {{ include "multi-arch-container-rust.serviceAccountName" . }}
31+ {{- if hasKey .Values "podSecurityContext" }}
3132 securityContext :
3233 {{- toYaml .Values.podSecurityContext | nindent 8 }}
34+ {{- end }}
3335 containers :
3436 - name : {{ .Chart.Name }}
37+ {{- if hasKey .Values "securityContext" }}
3538 securityContext :
3639 {{- toYaml .Values.securityContext | nindent 12 }}
40+ {{- end }}
3741 image : " {{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
3842 imagePullPolicy : {{ .Values.image.pullPolicy }}
3943 ports :
4044 - name : http
4145 containerPort : {{ .Values.service.port }}
4246 protocol : TCP
4347 env :
48+ {{- if hasKey .Values "git" }}
4449 - name : " GIT_REPOSITORY"
4550 value : {{ .Values.git.repository | default "" | quote }}
4651 - name : " GIT_BRANCH"
4752 value : {{ .Values.git.branch | default "" | quote }}
4853 - name : " GIT_COMMIT"
4954 value : {{ .Values.git.commit | default "" | quote }}
55+ {{- end }}
5056 - name : " GIT_TAG"
5157 value : {{ .Values.image.tag | default .Chart.AppVersion }}
58+ {{- if hasKey .Values "github" }}
5259 - name : " GITHUB_WORKFLOW"
5360 value : {{ .Values.github.workflow | default "" | quote }}
5461 - name : " GITHUB_RUN_ID"
5562 value : {{ .Values.github.run_id | int64 | default 0 | quote }}
5663 - name : " GITHUB_RUN_NUMBER"
5764 value : {{ .Values.github.run_number | int64 | default 0 | quote }}
65+ {{- end }}
66+ {{- if hasKey .Values "livenessProbe" }}
5867 livenessProbe :
5968 {{- toYaml .Values.livenessProbe | nindent 12 }}
69+ {{- end }}
70+ {{- if hasKey .Values "readinessProbe" }}
6071 readinessProbe :
6172 {{- toYaml .Values.readinessProbe | nindent 12 }}
73+ {{- end }}
74+ {{- if hasKey .Values "resources" }}
6275 resources :
6376 {{- toYaml .Values.resources | nindent 12 }}
77+ {{- end }}
6478 {{- with .Values.volumeMounts }}
6579 volumeMounts :
6680 {{- toYaml . | nindent 12 }}
0 commit comments