Skip to content

Commit

Permalink
Merge pull request #1842 from vonhutrong/feature/define-image-pull-se…
Browse files Browse the repository at this point in the history
…crets

chart: add possibility for defining image pull secrets in daemonset
  • Loading branch information
thomasferrandiz authored Dec 21, 2023
2 parents 2ebe663 + c59f73a commit d3007fc
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions chart/kube-flannel/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,6 @@ spec:
hostPath:
path: /run/xtables.lock
type: FileOrCreate
{{- if .Values.global.imagePullSecrets }}
imagePullSecrets: {{ toYaml .Values.global.imagePullSecrets | nindent 6 }}
{{- end }}
10 changes: 10 additions & 0 deletions chart/kube-flannel/tests/daemonset_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,13 @@ tests:
- "/opt/bin/flanneld"
- "--ip-masq"
- "--kube-subnet-mgr"

- it: should have the correct image pull secrets
set:
global.imagePullSecrets:
- name: "a-test-secret"
asserts:
- equal:
path: spec.template.spec.imagePullSecrets
value:
- name: "a-test-secret"
3 changes: 3 additions & 0 deletions chart/kube-flannel/values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
---
global:
imagePullSecrets:
# - name: "a-secret-name"

# The IPv4 cidr pool to create on startup if none exists. Pod IPs will be
# chosen from this range.
Expand Down

0 comments on commit d3007fc

Please sign in to comment.