-
Notifications
You must be signed in to change notification settings - Fork 3.8k
fix(helm): Add validation for loki.storage.bucketNames #13781
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): Add validation for loki.storage.bucketNames #13781
Conversation
|
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. |
|
why proceed with this? A lot of people is getting this lint error and needs making adjustment for bypass this. |
|
Dear maintainers, could you please review and merge it? We are all experiencing the same issue and have to keep a local copy with the fix, which brings additional complexity during each upgrade. |
trevorwhitney
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with this change but it looks pretty out of date. Can you please update this branch against main. I'd like to see the helm diff CI job results to make sure this doesn't change anything (looks like it should be a no-op on the diff). Also the changelog entry doesn't need a version header, just put in in the unversioned top section, the correct version header will be applied automatically.
|
thanks for picking this up - i'll update the PR as soon as time allows |
Signed-off-by: horihel <[email protected]>
|
updated the PR - i've added the check for bucketNames to the use_thanos_objstorage path, though I can't test that locally. |
|
@trevorwhitney i know you're busy, but if nobody even permits the checks to run, this PR will again fall behind main... |
|
Hi @horihel I'm part of new loki helm maintainer group. Once PR updated again, I can take a look into this. Running the chart without an extra values files currently results into a error
I hope this PR can fixed this issue as well. |
|
Hi @jkroepke - Thanks for picking this up. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I looked through the changes and I guess it might be better to use the validate.yaml.
Adding
{{- if not (hasKey .Values.loki.storage.bucketNames "chunks") }}
{{- fail "Please define loki.storage.bucketName.chunks" }}
{{- end }}
{{- if not (hasKey .Values.loki.storage.bucketNames "ruler") }}
{{- fail "Please define loki.storage.bucketName.ruler" }}
{{- end }}
to the validate.yaml would resolved this as well. WDYT?
And please change might also clear up: https://github.com/grafana/loki/issues/13564 (not sure) to fixes https://github.com/grafana/loki/issues/13564
Signed-off-by: horihel <[email protected]>
jkroepke
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - maybe change the PR Title as well.
jkroepke
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: horihel <[email protected]>
Signed-off-by: Heiko Helmle <[email protected]>
jkroepke
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - Nice! Thanks a lot!
|
Hey @horihel, sound like we have an bug here. but the admin bucket is set.
|
Co-authored-by: Jan-Otto Kröpke <[email protected]> Signed-off-by: horihel <[email protected]>
|
LGTM, lets check the CI. |
Co-authored-by: Jan-Otto Kröpke <[email protected]> Signed-off-by: horihel <[email protected]>
Signed-off-by: Jay Clifford <[email protected]>
Signed-off-by: Jay Clifford <[email protected]>
Signed-off-by: Jay Clifford <[email protected]>
Signed-off-by: Jay Clifford <[email protected]>
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
Fixes #13564
Fixes #14843
Special notes for your reviewer:
Checklist
CONTRIBUTING.mdguide (required)featPRs are unlikely to be accepted unless a case can be made for the feature actually being a bug fix to existing behavior.docs/sources/setup/upgrade/_index.mdproduction/helm/loki/Chart.yamland updateproduction/helm/loki/CHANGELOG.mdandproduction/helm/loki/README.md. Example PRdeprecated-config.yamlanddeleted-config.yamlfiles respectively in thetools/deprecated-config-checkerdirectory. Example PR