From e5bb68ef22c79b2ce0096bf268f3e1e1a104b4c4 Mon Sep 17 00:00:00 2001 From: Adrian Aneci Date: Tue, 22 Aug 2023 14:58:37 +0300 Subject: [PATCH] Fix imagePullSecrets bug --- .../cluster-api-operator/templates/deployment.yaml | 12 ++++-------- hack/charts/cluster-api-operator/values.yaml | 4 +--- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/hack/charts/cluster-api-operator/templates/deployment.yaml b/hack/charts/cluster-api-operator/templates/deployment.yaml index 7c663abf..31a108a2 100644 --- a/hack/charts/cluster-api-operator/templates/deployment.yaml +++ b/hack/charts/cluster-api-operator/templates/deployment.yaml @@ -51,6 +51,10 @@ spec: securityContext: {{- toYaml . | nindent 8 }} {{- end }} + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} containers: - args: {{- if .Values.logLevel }} @@ -80,10 +84,6 @@ spec: image: "{{- if .registry -}}{{ .registry }}/{{- end -}}{{ .repository }}{{- if (.digest) -}} @{{ .digest }}{{- else -}}:{{ default $.Chart.AppVersion .tag }} {{- end -}}" {{- end }} imagePullPolicy: {{ .Values.image.manager.pullPolicy }} - {{- with .Values.imagePullSecrets.manager }} - imagePullSecrets: - {{- toYaml . | nindent 12 }} - {{- end }} name: manager ports: - containerPort: 9443 @@ -112,10 +112,6 @@ spec: image: "{{- if .registry -}}{{ .registry }}/{{- end -}}{{ .repository }}{{- if (.digest) -}} @{{ .digest }}{{- else -}}:{{ default $.Chart.AppVersion .tag }} {{- end -}}" {{- end }} imagePullPolicy: {{ .Values.image.kubeRBACProxy.pullPolicy }} - {{- with .Values.imagePullSecrets.kubeRBACProxy }} - imagePullSecrets: - {{- toYaml . | nindent 12 }} - {{- end }} name: kube-rbac-proxy ports: - containerPort: 8443 diff --git a/hack/charts/cluster-api-operator/values.yaml b/hack/charts/cluster-api-operator/values.yaml index b1d90f3b..aedad9b0 100644 --- a/hack/charts/cluster-api-operator/values.yaml +++ b/hack/charts/cluster-api-operator/values.yaml @@ -32,9 +32,7 @@ image: pullPolicy: IfNotPresent healthAddr: ":8081" metricsBindAddr: "127.0.0.1:8080" -imagePullSecrets: - manager: {} - kubeRBACProxy: {} +imagePullSecrets: {} resources: manager: limits: