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

Issue 589: Add imagePullSecrets for Helm hooks #591

Merged
merged 2 commits into from
Jun 12, 2024

Conversation

unguiculus
Copy link
Contributor

Change log description

  • Adds imagePullSecrets to the service accounts for the Helm hooks
  • Follows the same principle as the service account for the operator taking global imagePullSecrets into account

Purpose of the change

Fixes #589

What the code does

Adds imagePullSecrets to the YAML for the ServiceAccounts for the Helm hooks. This is important when images are pulled from a private registry, e.g. an internal proxy, such as Artifactory, or when using custom images.

How to verify it

Render the templates using the following command:

helm template zookeeper charts/zookeeper-operator \
    --show-only templates/post-install-upgrade-hooks.yaml \
    --show-only templates/pre-delete-hooks.yaml \
    --set hooks.serviceAccount.imagePullSecrets={'my-pull-secret'}

### Change log description

* Adds imagePullSecrets to the service accounts for the Helm hooks
* Follows the same principle as the service account for the operator
  taking global imagePullSecrets into account

### Purpose of the change

Fixes pravega#589

### What the code does

Adds imagePullSecrets to the YAML for the ServiceAccounts for the Helm
hooks. This is important when images are pulled from a private registry,
e.g. an internal proxy, such as Artifactory, or when using custom images.

### How to verify it

Render the templates using the following command:

```console
helm template zookeeper charts/zookeeper-operator \
    --show-only templates/post-install-upgrade-hooks.yaml \
    --show-only templates/pre-delete-hooks.yaml \
    --set hooks.serviceAccount.imagePullSecrets={'my-pull-secret'}
```

Signed-off-by: Reinhard Nägele <[email protected]>

# Please enter the commit message for your changes. Lines starting
# with '#' will be kept; you may remove them yourself if you want to.
# An empty message aborts the commit.
#
# Date:      Mon Jan 22 11:52:54 2024 +0100
#
# On branch issue-589-pull-creds-for-hook
# Your branch and 'origin/issue-589-pull-creds-for-hook' have diverged,
# and have 1 and 1 different commits each, respectively.
#
# Changes to be committed:
#	modified:   charts/zookeeper-operator/templates/post-install-upgrade-hooks.yaml
#	modified:   charts/zookeeper-operator/templates/pre-delete-hooks.yaml
#	modified:   charts/zookeeper-operator/values.yaml
#
@anishakj anishakj requested a review from jkhalack January 23, 2024 01:25
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

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

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@krishnadas-menon
Copy link

@jkhalack Would you be able to have a look at this change? It would be really appreciated to get this change added to the helm charts. TIA

@@ -57,6 +57,10 @@ tolerations: []
annotations: {}

hooks:
## Optionally specify an array of imagePullSecrets. Will override the global parameter if set
Copy link
Contributor

Choose a reason for hiding this comment

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

Please update the comment to explain that the array here is expected to contain secret names only, as we seem to have two different schemas already in the code:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried to be consistent and matched what is already done in the values.yaml. See https://github.com/pravega/zookeeper-operator/blob/master/charts/zookeeper-operator/values.yaml#L30. If you like, I could update the whole chart in order to improve this.

@unguiculus unguiculus requested a review from jkhalack June 10, 2024 09:23
Copy link
Contributor

@anishakj anishakj left a comment

Choose a reason for hiding this comment

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

LGTM

@krishnadasm
Copy link

@anishakj Could you please help me with the timeline for this change to be released. Appreciate if you could expedite the same. Thanks in advance.

@crazyzhou crazyzhou merged commit 644ebe3 into pravega:master Jun 12, 2024
3 checks passed
@crazyzhou
Copy link

Merged as admin.

@unguiculus unguiculus deleted the issue-589-pull-creds-for-hook branch July 23, 2024 12:12
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.

Add imagePullSecrets to Helm Hooks in Zookeeper_Operator charts
7 participants