From f5fa270f9ff3f8550b818400500d94ca3d6c86f4 Mon Sep 17 00:00:00 2001 From: Alexandr Demicev Date: Tue, 26 Sep 2023 14:23:05 +0200 Subject: [PATCH] Add image pull secrets value to chart Signed-off-by: Alexandr Demicev --- charts/rancher-turtles/templates/deployment.yaml | 8 +++++++- charts/rancher-turtles/values.yaml | 1 + test/e2e/e2e_suite_test.go | 6 +++--- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/charts/rancher-turtles/templates/deployment.yaml b/charts/rancher-turtles/templates/deployment.yaml index 2ca8da4a..1c64cc3b 100644 --- a/charts/rancher-turtles/templates/deployment.yaml +++ b/charts/rancher-turtles/templates/deployment.yaml @@ -17,10 +17,16 @@ spec: labels: control-plane: controller-manager spec: + {{- if .Values.rancherTurtles.imagePullSecrets }} + imagePullSecrets: + {{- range .Values.rancherTurtles.imagePullSecrets }} + - name: {{ . }} + {{- end }} + {{- end }} containers: - args: - --leader-elect - {{- range .Values.managerArguments }} + {{- range .Values.rancherTurtles.managerArguments }} - {{ . }} {{- end }} command: diff --git a/charts/rancher-turtles/values.yaml b/charts/rancher-turtles/values.yaml index 346f3692..54a1e049 100644 --- a/charts/rancher-turtles/values.yaml +++ b/charts/rancher-turtles/values.yaml @@ -4,6 +4,7 @@ rancherTurtles: imagePullPolicy: Never namespace: rancher-turtles-system managerArguments: {} + imagePullSecrets: [] cluster-api-operator: enabled: true cert-manager: diff --git a/test/e2e/e2e_suite_test.go b/test/e2e/e2e_suite_test.go index 3d6def30..f5762027 100644 --- a/test/e2e/e2e_suite_test.go +++ b/test/e2e/e2e_suite_test.go @@ -312,11 +312,11 @@ func initRancherTurtles(clusterProxy framework.ClusterProxy, config *clusterctl. "--create-namespace", "--wait"), } _, err := chart.Run(map[string]string{ - "managerArguments[0]": "--insecure-skip-verify=true", - "cluster-api-operator.cluster-api.configSecret.namespace": "default", - "cluster-api-operator.cluster-api.configSecret.name": "variables", "rancherTurtles.image": "ghcr.io/rancher-sandbox/rancher-turtles-amd64", "rancherTurtles.tag": "v0.0.1", + "rancherTurtles.managerArguments[0]": "--insecure-skip-verify=true", + "cluster-api-operator.cluster-api.configSecret.namespace": "default", + "cluster-api-operator.cluster-api.configSecret.name": "variables", }) Expect(err).ToNot(HaveOccurred())