Add imagePullSecrets support to helm hook jobs (#741)
* Add imagePullSecrets support to helm hook jobs Hook jobs lacked imagePullSecrets configuration on their pod specs, causing image pull failures in environments using private registries with authentication * spire-server: post-install, pre-upgrade, post-upgrade, pre-delete hooks * spire-oidc-discovery-provider: pre-delete hook * spike-nexus: bootstrap hook * spire: global imagePullSecrets Fixes #649 Signed-off-by: Rowan Ruseler <[email protected]> * Document global.imagePullSecrets parameter Signed-off-by: Rowan Ruseler <[email protected]> * Replaced non functioning 'or' with 'coalesce' Signed-off-by: Rowan Ruseler <[email protected]> --------- Signed-off-by: Rowan Ruseler <[email protected]>
This commit is contained in:
@@ -273,6 +273,7 @@ Now you can interact with the Spire agent socket from your own application. The
|
|||||||
|
|
||||||
| Name | Description | Value |
|
| Name | Description | Value |
|
||||||
| ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- |
|
| ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- |
|
||||||
|
| `global.imagePullSecrets` | Image pull secret names | `[]` |
|
||||||
| `global.k8s.clusterDomain` | Cluster domain name configured for Spire install | `cluster.local` |
|
| `global.k8s.clusterDomain` | Cluster domain name configured for Spire install | `cluster.local` |
|
||||||
| `global.spire.bundleConfigMap` | A configmap containing the Spire bundle | `""` |
|
| `global.spire.bundleConfigMap` | A configmap containing the Spire bundle | `""` |
|
||||||
| `global.spire.clusterName` | The name of the k8s cluster for Spire install | `example-cluster` |
|
| `global.spire.clusterName` | The name of the k8s cluster for Spire install | `example-cluster` |
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ spec:
|
|||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
spec:
|
spec:
|
||||||
{{- with .Values.imagePullSecrets }}
|
{{- with (coalesce .Values.imagePullSecrets .Values.global.imagePullSecrets) }}
|
||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ spec:
|
|||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
spec:
|
spec:
|
||||||
{{- with .Values.imagePullSecrets }}
|
{{- with (coalesce .Values.imagePullSecrets .Values.global.imagePullSecrets) }}
|
||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@@ -57,6 +57,10 @@ spec:
|
|||||||
name: {{ include "spiffe-oidc-discovery-provider.fullname" . }}-pre-delete
|
name: {{ include "spiffe-oidc-discovery-provider.fullname" . }}-pre-delete
|
||||||
spec:
|
spec:
|
||||||
restartPolicy: Never
|
restartPolicy: Never
|
||||||
|
{{- with (coalesce .Values.imagePullSecrets .Values.global.imagePullSecrets) }}
|
||||||
|
imagePullSecrets:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
serviceAccountName: {{ include "spiffe-oidc-discovery-provider.serviceAccountName" . }}-pre-delete
|
serviceAccountName: {{ include "spiffe-oidc-discovery-provider.serviceAccountName" . }}-pre-delete
|
||||||
securityContext:
|
securityContext:
|
||||||
{{- include "spire-lib.podsecuritycontext" . | nindent 8 }}
|
{{- include "spire-lib.podsecuritycontext" . | nindent 8 }}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ spec:
|
|||||||
release-namespace: {{ .Release.Namespace }}
|
release-namespace: {{ .Release.Namespace }}
|
||||||
component: spike-keeper
|
component: spike-keeper
|
||||||
spec:
|
spec:
|
||||||
{{- with .Values.imagePullSecrets }}
|
{{- with (coalesce .Values.imagePullSecrets .Values.global.imagePullSecrets) }}
|
||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@@ -68,6 +68,10 @@ spec:
|
|||||||
component: spike-bootstrap
|
component: spike-bootstrap
|
||||||
spec:
|
spec:
|
||||||
restartPolicy: Never
|
restartPolicy: Never
|
||||||
|
{{- with (coalesce .Values.imagePullSecrets .Values.global.imagePullSecrets) }}
|
||||||
|
imagePullSecrets:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
serviceAccountName: {{ include "spike-nexus.serviceAccountName" . }}-bootstrap
|
serviceAccountName: {{ include "spike-nexus.serviceAccountName" . }}-bootstrap
|
||||||
securityContext:
|
securityContext:
|
||||||
{{- include "spire-lib.podsecuritycontext" . | nindent 8 }}
|
{{- include "spire-lib.podsecuritycontext" . | nindent 8 }}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ spec:
|
|||||||
release-namespace: {{ .Release.Namespace }}
|
release-namespace: {{ .Release.Namespace }}
|
||||||
component: spike-nexus
|
component: spike-nexus
|
||||||
spec:
|
spec:
|
||||||
{{- with .Values.imagePullSecrets }}
|
{{- with (coalesce .Values.imagePullSecrets .Values.global.imagePullSecrets) }}
|
||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ spec:
|
|||||||
release-namespace: {{ .Release.Namespace }}
|
release-namespace: {{ .Release.Namespace }}
|
||||||
component: spike-pilot
|
component: spike-pilot
|
||||||
spec:
|
spec:
|
||||||
{{- with .Values.imagePullSecrets }}
|
{{- with (coalesce .Values.imagePullSecrets .Values.global.imagePullSecrets) }}
|
||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ spec:
|
|||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
spec:
|
spec:
|
||||||
{{- with .Values.imagePullSecrets }}
|
{{- with (coalesce .Values.imagePullSecrets .Values.global.imagePullSecrets) }}
|
||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@@ -63,6 +63,10 @@ spec:
|
|||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
restartPolicy: Never
|
restartPolicy: Never
|
||||||
|
{{- with (coalesce .Values.imagePullSecrets .Values.global.imagePullSecrets) }}
|
||||||
|
imagePullSecrets:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
serviceAccountName: {{ include "spire-server.serviceAccountName" . }}-post-install
|
serviceAccountName: {{ include "spire-server.serviceAccountName" . }}-post-install
|
||||||
securityContext:
|
securityContext:
|
||||||
{{- include "spire-lib.podsecuritycontext" . | nindent 8 }}
|
{{- include "spire-lib.podsecuritycontext" . | nindent 8 }}
|
||||||
|
|||||||
@@ -63,6 +63,10 @@ spec:
|
|||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
restartPolicy: Never
|
restartPolicy: Never
|
||||||
|
{{- with (coalesce .Values.imagePullSecrets .Values.global.imagePullSecrets) }}
|
||||||
|
imagePullSecrets:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
serviceAccountName: {{ include "spire-server.serviceAccountName" . }}-post-upgrade
|
serviceAccountName: {{ include "spire-server.serviceAccountName" . }}-post-upgrade
|
||||||
securityContext:
|
securityContext:
|
||||||
{{- include "spire-lib.podsecuritycontext" . | nindent 8 }}
|
{{- include "spire-lib.podsecuritycontext" . | nindent 8 }}
|
||||||
|
|||||||
@@ -66,6 +66,10 @@ spec:
|
|||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
restartPolicy: Never
|
restartPolicy: Never
|
||||||
|
{{- with (coalesce .Values.imagePullSecrets .Values.global.imagePullSecrets) }}
|
||||||
|
imagePullSecrets:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
serviceAccountName: {{ include "spire-server.serviceAccountName" . }}-pre-delete
|
serviceAccountName: {{ include "spire-server.serviceAccountName" . }}-pre-delete
|
||||||
securityContext:
|
securityContext:
|
||||||
{{- include "spire-lib.podsecuritycontext" . | nindent 8 }}
|
{{- include "spire-lib.podsecuritycontext" . | nindent 8 }}
|
||||||
|
|||||||
@@ -63,6 +63,10 @@ spec:
|
|||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
restartPolicy: Never
|
restartPolicy: Never
|
||||||
|
{{- with (coalesce .Values.imagePullSecrets .Values.global.imagePullSecrets) }}
|
||||||
|
imagePullSecrets:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
serviceAccountName: {{ include "spire-server.serviceAccountName" . }}-pre-upgrade
|
serviceAccountName: {{ include "spire-server.serviceAccountName" . }}-pre-upgrade
|
||||||
securityContext:
|
securityContext:
|
||||||
{{- include "spire-lib.podsecuritycontext" . | nindent 8 }}
|
{{- include "spire-lib.podsecuritycontext" . | nindent 8 }}
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ spec:
|
|||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
spec:
|
spec:
|
||||||
{{- with .Values.imagePullSecrets }}
|
{{- with (coalesce .Values.imagePullSecrets .Values.global.imagePullSecrets) }}
|
||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ spec:
|
|||||||
labels:
|
labels:
|
||||||
{{- include "tornjak-frontend.selectorLabels" . | nindent 8 }}
|
{{- include "tornjak-frontend.selectorLabels" . | nindent 8 }}
|
||||||
spec:
|
spec:
|
||||||
{{- with .Values.imagePullSecrets }}
|
{{- with (coalesce .Values.imagePullSecrets .Values.global.imagePullSecrets) }}
|
||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@@ -5,6 +5,9 @@
|
|||||||
## Note: the parameter values specified here will override the chart level values for these parameters.
|
## Note: the parameter values specified here will override the chart level values for these parameters.
|
||||||
##
|
##
|
||||||
global:
|
global:
|
||||||
|
## @param global.imagePullSecrets [array] Image pull secret names
|
||||||
|
imagePullSecrets: []
|
||||||
|
|
||||||
k8s:
|
k8s:
|
||||||
## @param global.k8s.clusterDomain Cluster domain name configured for Spire install
|
## @param global.k8s.clusterDomain Cluster domain name configured for Spire install
|
||||||
clusterDomain: cluster.local
|
clusterDomain: cluster.local
|
||||||
|
|||||||
Reference in New Issue
Block a user