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

fix: improve helm lookup fallback in case of helm template rendering #1897

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

khanhngobackend
Copy link

@khanhngobackend khanhngobackend commented Dec 24, 2024

This improve the case of using helm template . to statically render the resources. Without this, it might produce error similar to the following even with default values.yaml

Error: template: harbor/templates/registry/registry-secret.yaml:12:62: executing "harbor/templates/registry/registry-secret.yaml" at <include "harbor.secretKeyHelper" (dict "key" "REGISTRY_HTTP_SECRET" "data" $existingSecret.data)>: error calling include: template: harbor/templates/_helpers.tpl:59:41: executing "harbor.secretKeyHelper" at <.data>: wrong type for value; expected map[string]interface {}; got interface {}

@khanhngobackend khanhngobackend force-pushed the khanhngobackend/helm-lookup-fallback-improvement branch from 47fca4e to e3270b3 Compare December 24, 2024 04:55
Signed-off-by: Khanh Ngo <[email protected]>
@khanhngobackend khanhngobackend force-pushed the khanhngobackend/helm-lookup-fallback-improvement branch from b5355f0 to e5d4265 Compare December 24, 2024 04:58
@Kajot-dev
Copy link
Contributor

Nice, what helm version are you using. It seems the same as: #1671
Did you test with version 3.10 or higher?

@khanhngobackend
Copy link
Author

Hi @Kajot-dev , I tested with latest Helm v3.16.4

@Kajot-dev
Copy link
Contributor

Ok, then I think this PR is a good thing. Mabye I didn't make this resilient enough to configurarion changes my bad (I made the secretKeyHelper, so my bad 😅)

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.

2 participants