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(helm): Use variables instead of root context in functions parsed by tpl #13781

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

Conversation

horihel
Copy link

@horihel horihel commented Aug 6, 2024

What this PR does / why we need it:

Using root context in _helpers.tpl triggers problems in helm, during render and especially during lint (helm/helm#12798)

This change works around the problem by storing the objects in a variable before the chart changes scope. I've added "required" keywords to retain the original behavior (chart fails to render if bucketNames is unset).

Which issue(s) this PR fixes:
Fixes #13284
might also clear up: #13564 (not sure)

Special notes for your reviewer:

Checklist

  • Reviewed the CONTRIBUTING.md guide (required)
  • Documentation added
  • Tests updated
  • Title matches the required conventional commits format, see here
    • Note that Promtail is considered to be feature complete, and future development for logs collection will be in Grafana Alloy. As such, feat PRs are unlikely to be accepted unless a case can be made for the feature actually being a bug fix to existing behavior.
  • Changes that require user attention or interaction to upgrade are documented in docs/sources/setup/upgrade/_index.md
  • For Helm chart changes bump the Helm chart version in production/helm/loki/Chart.yaml and update production/helm/loki/CHANGELOG.md and production/helm/loki/README.md. Example PR
  • If the change is deprecating or removing a configuration option, update the deprecated-config.yaml and deleted-config.yaml files respectively in the tools/deprecated-config-checker directory. Example PR

@CLAassistant
Copy link

CLAassistant commented Aug 6, 2024

CLA assistant check
All committers have signed the CLA.

@pull-request-size pull-request-size bot added size/M and removed size/S labels Aug 6, 2024
@horihel horihel marked this pull request as ready for review August 6, 2024 09:36
@horihel horihel requested a review from a team as a code owner August 6, 2024 09:36
@horihel horihel force-pushed the horihel-work-around-helm-lint-bug branch from c6a26d6 to 0814c20 Compare August 6, 2024 15:12
@horihel horihel force-pushed the horihel-work-around-helm-lint-bug branch from 0814c20 to 06730bd Compare August 7, 2024 06:04
@horihel horihel changed the title fix: Use variables instead of root context in functions parsed by tpl fix(helm): Use variables instead of root context in functions parsed by tpl Aug 13, 2024
@horihel
Copy link
Author

horihel commented Sep 2, 2024

Dear review team. It's now a month in and there was no reaction to this PR. I'm still available to discuss it, but I will pause maintaining it until someone shows up willing to review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Loki Helm chart can't be naturally used as a dependency
2 participants