From be1912f37d1b8b276f6546013ac5e78967c2b8f2 Mon Sep 17 00:00:00 2001 From: xeivieni Date: Tue, 1 Oct 2024 17:17:38 +0200 Subject: [PATCH] feat(deployment): support list of imagePullSecrets #major (#350) --- README.md | 2 +- application/templates/deployment.yaml | 4 ++-- application/values-test.yaml | 2 +- application/values.yaml | 5 +++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 2ac2dd03..5f3c3b71 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ helm delete --namespace test my-application | deployment.initContainers | object | `nil` | Add init containers to the pods. | | deployment.fluentdConfigAnnotations | object | `nil` | Configuration details for fluentdConfigurations. Only works for specific setup, see . | | deployment.replicas | int | `nil` | Number of replicas. | -| deployment.imagePullSecrets | string | `""` | Secret to be used for pulling the images (a single secret is supported). | +| deployment.imagePullSecrets | list | `[]` | List of secrets to be used for pulling the images. | | deployment.envFrom | object | `nil` | Mount environment variables from ConfigMap or Secret to the pod. | | deployment.env | object | `nil` | Environment variables to be added to the pod. | | deployment.volumes | object | `nil` | Volumes to be added to the pod. Key is the name of the volume. Value is the volume definition. | diff --git a/application/templates/deployment.yaml b/application/templates/deployment.yaml index e6347308..35ca0f49 100644 --- a/application/templates/deployment.yaml +++ b/application/templates/deployment.yaml @@ -104,9 +104,9 @@ spec: topologySpreadConstraints: {{- toYaml . | nindent 8 }} {{- end }} - {{- if .Values.deployment.imagePullSecrets }} + {{- with .Values.deployment.imagePullSecrets }} imagePullSecrets: - - name: {{ .Values.deployment.imagePullSecrets }} + {{- toYaml . | nindent 8 }} {{- end }} containers: {{- if .Values.deployment.openshiftOAuthProxy.enabled }} diff --git a/application/values-test.yaml b/application/values-test.yaml index bcf44133..5ab93b63 100644 --- a/application/values-test.yaml +++ b/application/values-test.yaml @@ -70,7 +70,7 @@ deployment: replicas: 2 # Secrets used to pull image - imagePullSecrets: "" + imagePullSecrets: [] # If want to mount Envs from configmap or secret envFrom: diff --git a/application/values.yaml b/application/values.yaml index 805f813e..36482eb9 100644 --- a/application/values.yaml +++ b/application/values.yaml @@ -139,9 +139,10 @@ deployment: # -- (int) Number of replicas. # @section -- Deployment Parameters replicas: - # -- (string) Secret to be used for pulling the images (a single secret is supported). + # -- (list) List of secrets to be used for pulling the images. # @section -- Deployment Parameters - imagePullSecrets: "" + imagePullSecrets: [] + # - name: docker-pull # -- (object) Mount environment variables from ConfigMap or Secret to the pod. # @section -- Deployment Parameters envFrom: