From b1b2c0151ea35f372b1f16d6edd4b2a85f5a8114 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Otto=20Kr=C3=B6pke?= Date: Thu, 8 Aug 2024 16:05:21 +0200 Subject: [PATCH] [helm] Add global.imagePullSecrets --- helm/oauth2-proxy/templates/deployment.yaml | 20 +++++++++++--------- helm/oauth2-proxy/values.yaml | 9 ++++++++- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/helm/oauth2-proxy/templates/deployment.yaml b/helm/oauth2-proxy/templates/deployment.yaml index 5129cd9..ca4b1c3 100644 --- a/helm/oauth2-proxy/templates/deployment.yaml +++ b/helm/oauth2-proxy/templates/deployment.yaml @@ -388,21 +388,23 @@ spec: name: configaccesslist {{- end }} - {{- with (concat .Values.imagePullSecrets .Values.global.imagePullSecrets) }} + {{- with (.Values.imagePullSecrets | default .Values.global.imagePullSecrets) }} imagePullSecrets: {{- toYaml . | nindent 8 }} - {{- end }} - {{- if .Values.affinity }} + {{- end }} + {{- with .Values.affinity }} affinity: -{{ toYaml .Values.affinity | indent 8 }} + {{- toYaml . | nindent 8 }} {{- end }} - {{- if .Values.nodeSelector }} + {{- with .Values.nodeSelector }} nodeSelector: -{{ toYaml .Values.nodeSelector | indent 8 }} + {{ toYaml . | nindent 8 }} {{- end }} + {{- with .Values.tolerations }} tolerations: -{{ toYaml .Values.tolerations | indent 8 }} - {{- with .Values.topologySpreadConstraints }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.topologySpreadConstraints }} topologySpreadConstraints: {{- toYaml . | nindent 8 }} - {{- end }} + {{- end }} diff --git a/helm/oauth2-proxy/values.yaml b/helm/oauth2-proxy/values.yaml index 21f8083..d898743 100644 --- a/helm/oauth2-proxy/values.yaml +++ b/helm/oauth2-proxy/values.yaml @@ -1,3 +1,10 @@ +global: {} +# To help compatibility with other charts which use global.imagePullSecrets. +# global: +# imagePullSecrets: +# - name: pullSecret1 +# - name: pullSecret2 + ## Override the deployment namespace ## namespaceOverride: "" @@ -75,7 +82,7 @@ image: # Optionally specify an array of imagePullSecrets. # Secrets must be manually created in the namespace. # ref: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod -# imagePullSecrets: +imagePullSecrets: [] # - name: myRegistryKeySecretName # Set a custom containerPort if required.