pravega / zookeeper-operator

Kubernetes Operator for Zookeeper
Apache License 2.0
364 stars 203 forks source link

issue-589-Added imagepullsecrets for both helm hooks in zk-operator charts #590

Open krishnadas-menon opened 7 months ago

krishnadas-menon commented 7 months ago

Change log description

Currently the helm hooks used in zookeeper operator doesn't provide a mechanism to add imagepullsecrets to pull images from private registry. The PR could help us to override this limitation.

Purpose of the change

Fixes #589

What the code does

The code snippet will render the imagepull secrets added in either global section OR under hooks.serviceAccount.imagePullSecrets in values file.

How to verify it

## Create a secret in the desired namespace
kubectl create secret docker-registry  registry-name --docker-username=<username> --docker-password=<password> --namespace=zk-operator
helm upgrade --install zk <chartPath> -n zk-operator --create-namespace --set hooks.serviceAccount.imagePullSecrets={'registry-name'} --set global.imagePullSecrets={'registry-name'} --atomic

## OR

helm template zookeeper . -s templates/post-install-upgrade-hooks.yaml --namespace=zk-operator --set hooks.serviceAccount.imagePullSecrets={'regsitry-name'}
helm template zookeeper . -s templates/pre-delete-hooks.yaml --namespace=zk-operator --set hooks.serviceAccount.imagePullSecrets={'regsitry-name'}
codecov[bot] commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (9fc6151) 85.91% compared to head (d0d1e80) 85.91%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #590 +/- ## ======================================= Coverage 85.91% 85.91% ======================================= Files 12 12 Lines 1633 1633 ======================================= Hits 1403 1403 Misses 145 145 Partials 85 85 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.