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.
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 <heiko.helmle@horiba.com>
|
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.
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
jkroepke
left a comment
There was a problem hiding this comment.
LGTM - maybe change the PR Title as well.
Signed-off-by: horihel <heiko.helmle@horiba.com>
Signed-off-by: Heiko Helmle <heiko.helmle@horiba.com>
jkroepke
left a comment
There was a problem hiding this comment.
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 <mail@jkroepke.de> Signed-off-by: horihel <heiko.helmle@horiba.com>
|
LGTM, lets check the CI. |
Co-authored-by: Jan-Otto Kröpke <mail@jkroepke.de> Signed-off-by: horihel <heiko.helmle@horiba.com>
Signed-off-by: Jay Clifford <45856600+Jayclifford345@users.noreply.github.com>
Signed-off-by: Jay Clifford <45856600+Jayclifford345@users.noreply.github.com>
Signed-off-by: Jay Clifford <45856600+Jayclifford345@users.noreply.github.com>
Signed-off-by: Jay Clifford <45856600+Jayclifford345@users.noreply.github.com>
Signed-off-by: horihel <heiko.helmle@horiba.com> Signed-off-by: Heiko Helmle <heiko.helmle@horiba.com> Signed-off-by: Jay Clifford <45856600+Jayclifford345@users.noreply.github.com> Co-authored-by: Jan-Otto Kröpke <mail@jkroepke.de> Co-authored-by: J Stickler <julie.stickler@grafana.com> Co-authored-by: Jay Clifford <45856600+Jayclifford345@users.noreply.github.com>
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