From 817e05cc937e1602c36ad5a82f68d6ebdccb16ff Mon Sep 17 00:00:00 2001 From: Boris Barnier Date: Sat, 4 Nov 2023 13:08:07 +0100 Subject: [PATCH] Define image repository & pullPolicy on the initContainer wait-for-redis Signed-off-by: Boris Barnier --- helm/oauth2-proxy/Chart.yaml | 4 ++-- helm/oauth2-proxy/README.md | 2 ++ helm/oauth2-proxy/templates/deployment.yaml | 3 ++- helm/oauth2-proxy/values.yaml | 3 +++ 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/helm/oauth2-proxy/Chart.yaml b/helm/oauth2-proxy/Chart.yaml index 8805fdf..f488d1f 100644 --- a/helm/oauth2-proxy/Chart.yaml +++ b/helm/oauth2-proxy/Chart.yaml @@ -1,5 +1,5 @@ name: oauth2-proxy -version: 6.18.0 +version: 6.18.1 apiVersion: v2 appVersion: 7.5.1 home: https://oauth2-proxy.github.io/oauth2-proxy/ @@ -35,7 +35,7 @@ kubeVersion: ">=1.9.0-0" annotations: artifacthub.io/changes: | - kind: added - description: Redis version bump + description: Define image repository & pullPolicy on the initContainer wait-for-redis links: - name: Github PR url: https://github.com/oauth2-proxy/manifests/pull/165 diff --git a/helm/oauth2-proxy/README.md b/helm/oauth2-proxy/README.md index e947f56..730ea20 100644 --- a/helm/oauth2-proxy/README.md +++ b/helm/oauth2-proxy/README.md @@ -144,6 +144,8 @@ Parameter | Description | Default `ingress.hosts` | Ingress accepted hostnames | `nil` `ingress.tls` | Ingress TLS configuration | `nil` `initContainers.waitForRedis.enabled` | if `redis.enabled` is true, use an init container to wait for the redis master pod to be ready. If `serviceAccount.enabled` is true, create additionally a role/binding to get, list and watch the redis master pod | `true` +`initContainers.waitForRedis.image.pullPolicy` | kubectl image pull policy | `IfNotPresent` +`initContainers.waitForRedis.image.repository` | kubectl image repository | `docker.io/bitnami/kubectl` `initContainers.waitForRedis.kubectlVersion` | kubectl version to use for the init container | `printf "%s.%s" .Capabilities.KubeVersion.Major (.Capabilities.KubeVersion.Minor | replace "+" "")` `initContainers.waitForRedis.securityContext.enabled` | enable Kubernetes security context on container | `true` `initContainers.waitForRedis.timeout` | number of seconds | 180 diff --git a/helm/oauth2-proxy/templates/deployment.yaml b/helm/oauth2-proxy/templates/deployment.yaml index a10084d..6154247 100644 --- a/helm/oauth2-proxy/templates/deployment.yaml +++ b/helm/oauth2-proxy/templates/deployment.yaml @@ -60,7 +60,8 @@ spec: {{- if and .Values.redis.enabled .Values.initContainers.waitForRedis.enabled }} initContainers: - name: wait-for-redis - image: "docker.io/bitnami/kubectl:{{ include "kubectl.version" . }}" + image: "{{ .Values.initContainers.waitForRedis.image.repository }}:{{ include "kubectl.version" . }}" + imagePullPolicy: {{ .Values.initContainers.waitForRedis.image.pullPolicy }} args: - wait - pod/{{ include "oauth2-proxy.redis.fullname" . }}-master-0 diff --git a/helm/oauth2-proxy/values.yaml b/helm/oauth2-proxy/values.yaml index b4a0e62..8d73d27 100644 --- a/helm/oauth2-proxy/values.yaml +++ b/helm/oauth2-proxy/values.yaml @@ -273,6 +273,9 @@ initContainers: # if service account is enabled waitForRedis: enabled: true + image: + repository: "docker.io/bitnami/kubectl" + pullPolicy: "IfNotPresent" # uses the kubernetes version of the cluster # the chart is deployed on, if not set kubectlVersion: ""