Skip to content
This repository has been archived by the owner on May 8, 2024. It is now read-only.

Commit

Permalink
refact(charts): make cleanup pre hook image configurable (#219)
Browse files Browse the repository at this point in the history
Signed-off-by: shubham <shubham.bajpai@mayadata.io>
  • Loading branch information
shubham14bajpai authored May 31, 2021
1 parent 0e03830 commit ab1bd72
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/openebs/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 3 additions & 1 deletion charts/openebs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 5 additions & 1 deletion charts/openebs/templates/cleanup-webhook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions charts/openebs/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:

0 comments on commit ab1bd72

Please sign in to comment.