From ae3f94cc7129b92dba0eb7ef89f72af404bb75f2 Mon Sep 17 00:00:00 2001 From: shubham Date: Fri, 21 May 2021 11:55:21 +0530 Subject: [PATCH] refact(charts): make cleanup pre hook image configurable Signed-off-by: shubham --- deploy/helm/charts/Chart.yaml | 2 +- deploy/helm/charts/README.md | 6 ++++-- deploy/helm/charts/templates/cleanup-webhook.yaml | 4 ++-- deploy/helm/charts/values.yaml | 7 +++++++ 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/deploy/helm/charts/Chart.yaml b/deploy/helm/charts/Chart.yaml index 6d9a73dd..51f09335 100644 --- a/deploy/helm/charts/Chart.yaml +++ b/deploy/helm/charts/Chart.yaml @@ -4,7 +4,7 @@ description: CStor-Operator helm chart for Kubernetes type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. -version: 2.9.0 +version: 2.9.1 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. appVersion: 2.9.0 diff --git a/deploy/helm/charts/README.md b/deploy/helm/charts/README.md index 9baafc43..e9858336 100644 --- a/deploy/helm/charts/README.md +++ b/deploy/helm/charts/README.md @@ -115,6 +115,8 @@ helm install openebs-cstor openebs-cstor/cstor --namespace openebs --create-name | admissionServer.resources | object | `{}` | Admission webhook pod resources | | admissionServer.securityContext | object | `{}` | Admission webhook security context | | admissionServer.tolerations | list | `[]` | Admission webhook tolerations | +| cleanup.image.registry | string | `nil` | cleanup pre hook image registry | +| cleanup.image.repository | string | `"bitnami/kubectl"` | cleanup pre hook image repository | | csiController.annotations | object | `{}` | CSI controller annotations | | csiController.attacher.image.pullPolicy | string | `"IfNotPresent"` | CSI attacher image pull policy | | csiController.attacher.image.registry | string | `"k8s.gcr.io/"` | CSI attacher image registry | @@ -143,7 +145,7 @@ helm install openebs-cstor openebs-cstor/cstor --namespace openebs --create-name | csiController.snapshotController.name | string | `"snapshot-controller"` | CSI snapshot controller container name | | csiController.snapshotter.image.pullPolicy | string | `"IfNotPresent"` | CSI snapshotter image pull policy | | csiController.snapshotter.image.registry | string | `"k8s.gcr.io/"` | CSI snapshotter image pull registry | -| csiController.snapshotter.image.repository | string | `"sig-storage/csi-snapshotter"` | CSI snapshotter image repositroy | +| csiController.snapshotter.image.repository | string | `"sig-storage/csi-snapshotter"` | CSI snapshotter image repository | | csiController.snapshotter.image.tag | string | `"v3.0.3"` | CSI snapshotter image tag | | csiController.snapshotter.name | string | `"csi-snapshotter"` | CSI snapshotter container name | | csiController.tolerations | list | `[]` | CSI controller pod tolerations | @@ -168,7 +170,7 @@ helm install openebs-cstor openebs-cstor/cstor --namespace openebs --create-name | cspcOperator.cstorPool.image.repository | string | `"openebs/cstor-pool"` | CStor pool image repository| | cspcOperator.cstorPool.image.tag | string | `"2.9.0"` | CStor pool image tag | | cspcOperator.cstorPoolExporter.image.registry | string | `nil` | CStor pool exporter image registry | -| cspcOperator.cstorPoolExporter.image.repository | string | `"openebs/m-exporter"` | CStor pool exporter image repositry | +| cspcOperator.cstorPoolExporter.image.repository | string | `"openebs/m-exporter"` | CStor pool exporter image repository | | cspcOperator.cstorPoolExporter.image.tag | string | `"2.9.0"` | CStor pool exporter image tag | | cspcOperator.image.pullPolicy | string | `"IfNotPresent"` | CSPC operator image pull policy | | cspcOperator.image.registry | string | `nil` | CSPC operator image registry | diff --git a/deploy/helm/charts/templates/cleanup-webhook.yaml b/deploy/helm/charts/templates/cleanup-webhook.yaml index 01ed2df1..b43dd268 100644 --- a/deploy/helm/charts/templates/cleanup-webhook.yaml +++ b/deploy/helm/charts/templates/cleanup-webhook.yaml @@ -26,10 +26,10 @@ 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 }} + image: "{{ .Values.cleanup.image.registry }}{{ .Values.cleanup.image.repository }}:{{ .Capabilities.KubeVersion.Major }}.{{ $kubeMinor }}" command: - /bin/sh - -c - > kubectl delete validatingWebhookConfiguration openebs-cstor-validation-webhook; - restartPolicy: OnFailure \ No newline at end of file + restartPolicy: OnFailure diff --git a/deploy/helm/charts/values.yaml b/deploy/helm/charts/values.yaml index b4b48d53..52b17f14 100644 --- a/deploy/helm/charts/values.yaml +++ b/deploy/helm/charts/values.yaml @@ -238,3 +238,10 @@ analytics: enabled: true # Specify in hours the duration after which a ping event needs to be sent. pingInterval: "24h" + +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