diff --git a/charts/openebs/Chart.yaml b/charts/openebs/Chart.yaml index 28ad365d..6b126f7a 100644 --- a/charts/openebs/Chart.yaml +++ b/charts/openebs/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v2 -version: 2.9.1 +version: 2.9.2 name: openebs appVersion: 2.9.0 description: Containerized Storage for Containers diff --git a/charts/openebs/README.md b/charts/openebs/README.md index d006cba8..fa04a458 100644 --- a/charts/openebs/README.md +++ b/charts/openebs/README.md @@ -135,7 +135,9 @@ The following table lists the configurable parameters of the OpenEBS chart and t | `varDirectoryPath.baseDir` | To store debug info of OpenEBS containers | `/var/openebs` | | `healthCheck.initialDelaySeconds` | Delay before liveness probe is initiated | `30` | | `healthCheck.periodSeconds` | How often to perform the liveness probe | `60` | - +| `cleanup.image.registry` | Cleanup pre hook image registry | `nil` | +| `cleanup.image.repository` | Cleanup pre hook image repository | `"bitnami/kubectl"` | +| `cleanup.image.tag` | Cleanup pre hook image tag | `if not provided determined by the k8s version` | Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example, diff --git a/charts/openebs/templates/cleanup-webhook.yaml b/charts/openebs/templates/cleanup-webhook.yaml index 1d4aa0c9..8e1ca569 100644 --- a/charts/openebs/templates/cleanup-webhook.yaml +++ b/charts/openebs/templates/cleanup-webhook.yaml @@ -30,7 +30,11 @@ spec: - name: kubectl {{- /* bitnami maintains an image for all k8s versions */}} {{- /* see: https://hub.docker.com/r/bitnami/kubectl */}} - image: {{ printf "%s/%s:%s.%s" "bitnami" "kubectl" .Capabilities.KubeVersion.Major $kubeMinor }} + {{- if .Values.cleanup.image.tag }} + image: "{{ .Values.cleanup.image.registry }}{{ .Values.cleanup.image.repository }}:{{ .Values.cleanup.image.tag }}" + {{- else }} + image: "{{ .Values.cleanup.image.registry }}{{ .Values.cleanup.image.repository }}:{{ .Capabilities.KubeVersion.Major }}.{{ $kubeMinor }}" + {{- end }} command: - /bin/sh - -c diff --git a/charts/openebs/values.yaml b/charts/openebs/values.yaml index 25ff45e1..fe012c5f 100644 --- a/charts/openebs/values.yaml +++ b/charts/openebs/values.yaml @@ -571,3 +571,10 @@ zfs-localpv: # repository: openebs/zfs-driver # pullPolicy: IfNotPresent # tag: 1.7.0 +cleanup: + image: + # Make sure that registry name end with a '/'. + # For example : quay.io/ is a correct value here and quay.io is incorrect + registry: + repository: bitnami/kubectl + tag: