Skip to content

Commit 8fe76c5

Browse files
authored
feat(helm): support imagePullSecrets (#907)
Add additional `imagePullSecrets` to the deployment or daemonset via the value `image.pullSecrets`. Requested in #874
1 parent 4fa0786 commit 8fe76c5

3 files changed

Lines changed: 16 additions & 0 deletions

File tree

chart/templates/daemonset.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ spec:
2121
{{- toYaml .Values.podAnnotations | nindent 8 }}
2222
{{- end }}
2323
spec:
24+
{{- with .Values.image.pullSecrets }}
25+
imagePullSecrets:
26+
{{- toYaml . | nindent 8 }}
27+
{{- end }}
2428
serviceAccountName: {{ include "hcloud-cloud-controller-manager.name" . }}
2529
dnsPolicy: Default
2630
tolerations:

chart/templates/deployment.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ spec:
2222
{{- toYaml .Values.podAnnotations | nindent 8 }}
2323
{{- end }}
2424
spec:
25+
{{- with .Values.image.pullSecrets }}
26+
imagePullSecrets:
27+
{{- toYaml . | nindent 8 }}
28+
{{- end }}
2529
serviceAccountName: {{ include "hcloud-cloud-controller-manager.name" . }}
2630
dnsPolicy: Default
2731
tolerations:

chart/values.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,14 @@ env:
6161
image:
6262
repository: docker.io/hetznercloud/hcloud-cloud-controller-manager
6363
tag: "v{{ $.Chart.Version }}"
64+
# Optionally specify an array of imagePullSecrets.
65+
# Secrets must be manually created in the namespace.
66+
# ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
67+
# e.g:
68+
# pullSecrets:
69+
# - myRegistryKeySecretName
70+
#
71+
pullSecrets: []
6472

6573
monitoring:
6674
# When enabled, the hccm Pod will serve metrics on port :8233

0 commit comments

Comments
 (0)