Implement pre-delete hook for graceful delete of spiffe-oidc-discovery-provider (#353)
This commit is contained in:
@@ -105,15 +105,6 @@ Create the name of the service account to use
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "spire-server.kubectl-image" }}
|
||||
{{- $root := deepCopy . }}
|
||||
{{- $tag := (default $root.image.tag $root.image.version) | toString }}
|
||||
{{- if eq (len $tag) 0 }}
|
||||
{{- $_ := set $root.image "tag" (regexReplaceAll "^(v?\\d+\\.\\d+\\.\\d+).*" $root.KubeVersion "${1}") }}
|
||||
{{- end }}
|
||||
{{- include "spire-lib.image" $root }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "spire-server.config-mysql-query" }}
|
||||
{{- $lst := list }}
|
||||
{{- range . }}
|
||||
|
||||
@@ -63,7 +63,7 @@ spec:
|
||||
- name: post-install-job
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 10 }}
|
||||
image: {{ template "spire-server.kubectl-image" (dict "appVersion" $.Chart.AppVersion "image" .Values.tools.kubectl.image "global" .Values.global "KubeVersion" .Capabilities.KubeVersion.Version) }}
|
||||
image: {{ template "spire-lib.kubectl-image" (dict "appVersion" $.Chart.AppVersion "image" .Values.tools.kubectl.image "global" .Values.global "KubeVersion" .Capabilities.KubeVersion.Version) }}
|
||||
args:
|
||||
- patch
|
||||
- validatingwebhookconfiguration
|
||||
|
||||
@@ -56,14 +56,14 @@ spec:
|
||||
name: {{ include "spire-server.fullname" . }}-post-upgrade
|
||||
spec:
|
||||
restartPolicy: Never
|
||||
serviceAccountName: {{ include "spire-server.serviceAccountName" . }}-post-upgrade
|
||||
serviceAccountName: {{ include "spire-server.serviceAccountName" . }}-post-upgrade
|
||||
securityContext:
|
||||
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||
containers:
|
||||
- name: post-upgrade-job
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 10 }}
|
||||
image: {{ template "spire-server.kubectl-image" (dict "appVersion" $.Chart.AppVersion "image" .Values.tools.kubectl.image "global" .Values.global "KubeVersion" .Capabilities.KubeVersion.Version) }}
|
||||
image: {{ template "spire-lib.kubectl-image" (dict "appVersion" $.Chart.AppVersion "image" .Values.tools.kubectl.image "global" .Values.global "KubeVersion" .Capabilities.KubeVersion.Version) }}
|
||||
args:
|
||||
- patch
|
||||
- validatingwebhookconfiguration
|
||||
|
||||
@@ -63,7 +63,7 @@ spec:
|
||||
- name: post-install-job
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 10 }}
|
||||
image: {{ template "spire-server.kubectl-image" (dict "appVersion" $.Chart.AppVersion "image" .Values.tools.kubectl.image "global" .Values.global "KubeVersion" .Capabilities.KubeVersion.Version) }}
|
||||
image: {{ template "spire-lib.kubectl-image" (dict "appVersion" $.Chart.AppVersion "image" .Values.tools.kubectl.image "global" .Values.global "KubeVersion" .Capabilities.KubeVersion.Version) }}
|
||||
args:
|
||||
- patch
|
||||
- validatingwebhookconfiguration
|
||||
|
||||
Reference in New Issue
Block a user