Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refact(charts): make cleanup pre hook image configurable #336

Merged
merged 2 commits into from
May 31, 2021

Conversation

shubham14bajpai
Copy link
Contributor

Signed-off-by: shubham shubham.bajpai@mayadata.io

This PR makes the cleanup pre delete hook job image configurable for air-gap setups

Signed-off-by: shubham <shubham.bajpai@mayadata.io>
@@ -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 }}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as openebs/charts PR , tag can be different as well.

Signed-off-by: shubham <shubham.bajpai@mayadata.io>
# For example : quay.io/ is a correct value here and quay.io is incorrect
registry:
repository: bitnami/kubectl
tag:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the tag is empty? Are we going to use latest always?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tag is determined in the job template itself using the helm Capabilities to determine the k8s version, which will be same as the tag

@@ -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 |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question(n_p) :
nil vs ""
( I see that existing code uses nil )

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The existing values.yaml uses empty fields so I continued with that

@prateekpandey14 prateekpandey14 merged commit b6a52f8 into openebs-archive:master May 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants