update
diff --git a/charts/cert-manager/templates/startupapicheck-job.yaml b/charts/cert-manager/templates/startupapicheck-job.yaml
index a9b965e..0093472 100644
--- a/charts/cert-manager/templates/startupapicheck-job.yaml
+++ b/charts/cert-manager/templates/startupapicheck-job.yaml
@@ -16,6 +16,9 @@
{{- end }}
spec:
backoffLimit: {{ .Values.startupapicheck.backoffLimit }}
+ {{- if hasKey .Values.startupapicheck "ttlSecondsAfterFinished" }}
+ ttlSecondsAfterFinished: {{ .Values.startupapicheck.ttlSecondsAfterFinished }}
+ {{- end }}
template:
metadata:
labels:
@@ -37,18 +40,24 @@
{{- if hasKey .Values.startupapicheck "automountServiceAccountToken" }}
automountServiceAccountToken: {{ .Values.startupapicheck.automountServiceAccountToken }}
{{- end }}
+ enableServiceLinks: {{ .Values.startupapicheck.enableServiceLinks }}
{{- with .Values.global.priorityClassName }}
priorityClassName: {{ . | quote }}
{{- end }}
+ {{- if (hasKey .Values.global "hostUsers") }}
+ hostUsers: {{ .Values.global.hostUsers }}
+ {{- end }}
{{- with .Values.startupapicheck.securityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
{{- end }}
+ {{- with .Values.global.imagePullSecrets }}
+ imagePullSecrets:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
containers:
- name: {{ .Chart.Name }}-startupapicheck
- {{- with .Values.startupapicheck.image }}
- image: "{{- if .registry -}}{{ .registry }}/{{- end -}}{{ .repository }}{{- if (.digest) -}} @{{ .digest }}{{- else -}}:{{ default $.Chart.AppVersion .tag }} {{- end -}}"
- {{- end }}
+ image: "{{ template "cert-manager.image" (tuple .Values.startupapicheck.image .Values.imageRegistry .Values.imageNamespace (printf ":%s" .Chart.AppVersion)) }}"
imagePullPolicy: {{ .Values.startupapicheck.image.pullPolicy }}
args:
- check
@@ -61,6 +70,14 @@
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
+ env:
+ - name: POD_NAMESPACE
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.namespace
+ {{- with .Values.startupapicheck.extraEnv }}
+ {{- toYaml . | nindent 10 }}
+ {{- end }}
{{- with .Values.startupapicheck.resources }}
resources:
{{- toYaml . | nindent 12 }}
@@ -69,9 +86,18 @@
volumeMounts:
{{- toYaml . | nindent 12 }}
{{- end }}
- {{- with .Values.startupapicheck.nodeSelector }}
+ {{- if .Values.startupapicheck.runtimeClassName }}
+ runtimeClassName: {{ .Values.startupapicheck.runtimeClassName | quote }}
+ {{- else if .Values.global.runtimeClassName }}
+ runtimeClassName: {{ .Values.global.runtimeClassName | quote }}
+ {{- end }}
+ {{- $nodeSelector := .Values.global.nodeSelector | default dict }}
+ {{- $nodeSelector = merge $nodeSelector (.Values.startupapicheck.nodeSelector | default dict) }}
+ {{- with $nodeSelector }}
nodeSelector:
- {{- toYaml . | nindent 8 }}
+ {{- range $key, $value := . }}
+ {{ $key }}: {{ $value | quote }}
+ {{- end }}
{{- end }}
{{- with .Values.startupapicheck.affinity }}
affinity: