From 0ec4ae3c47d2db834243853cc5c6ccf70b0a9833 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Otto=20Kr=C3=B6pke?= Date: Thu, 8 Aug 2024 15:52:05 +0200 Subject: [PATCH 1/4] [helm] Add global.imagePullSecrets --- charts/external-dns/templates/deployment.yaml | 2 +- charts/external-dns/values.yaml | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/charts/external-dns/templates/deployment.yaml b/charts/external-dns/templates/deployment.yaml index 71b00937f6..7597a57cd0 100644 --- a/charts/external-dns/templates/deployment.yaml +++ b/charts/external-dns/templates/deployment.yaml @@ -40,7 +40,7 @@ spec: {{- if not (quote .Values.automountServiceAccountToken | empty) }} automountServiceAccountToken: {{ .Values.automountServiceAccountToken }} {{- end }} - {{- with .Values.imagePullSecrets }} + {{- with (.Values.global.imagePullSecrets | default .Values.imagePullSecrets) }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} diff --git a/charts/external-dns/values.yaml b/charts/external-dns/values.yaml index 060dd1ffe1..531a0436aa 100644 --- a/charts/external-dns/values.yaml +++ b/charts/external-dns/values.yaml @@ -2,6 +2,10 @@ # This is a YAML-formatted file. # Declare variables to be passed into your templates. +global: + # -- Global image pull secrets. + imagePullSecrets: [] + image: # -- Image repository for the `external-dns` container. repository: registry.k8s.io/external-dns/external-dns From 98cef7c2f190a50403f92116231417d2aba3fa8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Otto=20Kr=C3=B6pke?= Date: Tue, 29 Oct 2024 15:42:26 +0100 Subject: [PATCH 2/4] Update charts/external-dns/templates/deployment.yaml Co-authored-by: Steve Hipwell --- charts/external-dns/templates/deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/external-dns/templates/deployment.yaml b/charts/external-dns/templates/deployment.yaml index e8abbbeb71..8a097c3387 100644 --- a/charts/external-dns/templates/deployment.yaml +++ b/charts/external-dns/templates/deployment.yaml @@ -40,7 +40,7 @@ spec: {{- if not (quote .Values.automountServiceAccountToken | empty) }} automountServiceAccountToken: {{ .Values.automountServiceAccountToken }} {{- end }} - {{- with (.Values.global.imagePullSecrets | default .Values.imagePullSecrets) }} + {{- with (default .Values.global.imagePullSecrets .Values.imagePullSecrets) }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} From b91729faf9b8031f9dadc8aaa8e44129c8e7a900 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Otto=20Kr=C3=B6pke?= Date: Tue, 29 Oct 2024 16:15:48 +0100 Subject: [PATCH 3/4] [helm] Add global to json schema --- charts/external-dns/values.schema.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/charts/external-dns/values.schema.json b/charts/external-dns/values.schema.json index 614deeaca3..80378c7247 100644 --- a/charts/external-dns/values.schema.json +++ b/charts/external-dns/values.schema.json @@ -2,6 +2,9 @@ "$schema": "http://json-schema.org/draft-07/schema", "type": "object", "properties": { + "global": { + "type": "object" + }, "provider": { "anyOf": [ { From e77e697f6d92b96b081681496480bf9d2c12fe30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Otto=20Kr=C3=B6pke?= Date: Tue, 29 Oct 2024 16:53:46 +0100 Subject: [PATCH 4/4] [helm] Add docs and changelog --- charts/external-dns/CHANGELOG.md | 4 ++++ charts/external-dns/README.md | 1 + 2 files changed, 5 insertions(+) diff --git a/charts/external-dns/CHANGELOG.md b/charts/external-dns/CHANGELOG.md index 02b467e1d6..19863f4933 100644 --- a/charts/external-dns/CHANGELOG.md +++ b/charts/external-dns/CHANGELOG.md @@ -18,6 +18,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [UNRELEASED] +### Added + +- Ability to configure `imagePullSecrets` via helm `global` value ([#4667](https://github.com/kubernetes-sigs/external-dns/pull/4667)) _@jkroepke_ + ## [v1.15.0] - 2023-09-10 ### Changed diff --git a/charts/external-dns/README.md b/charts/external-dns/README.md index 9b21ecdec6..fd0d4e29b2 100644 --- a/charts/external-dns/README.md +++ b/charts/external-dns/README.md @@ -105,6 +105,7 @@ If `namespaced` is set to `true`, please ensure that `sources` my only contains | extraVolumeMounts | list | `[]` | Extra [volume mounts](https://kubernetes.io/docs/concepts/storage/volumes/) for the `external-dns` container. | | extraVolumes | list | `[]` | Extra [volumes](https://kubernetes.io/docs/concepts/storage/volumes/) for the `Pod`. | | fullnameOverride | string | `nil` | Override the full name of the chart. | +| global.imagePullSecrets | list | `[]` | Global image pull secrets. | | image.pullPolicy | string | `"IfNotPresent"` | Image pull policy for the `external-dns` container. | | image.repository | string | `"registry.k8s.io/external-dns/external-dns"` | Image repository for the `external-dns` container. | | image.tag | string | `nil` | Image tag for the `external-dns` container, this will default to `.Chart.AppVersion` if not set. |