chore(helm): Add comments, clarifying ruler setup #18607
+6
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
This PR addresses issue #13027 by adding clarifying comments to the Helm chart's
values.yaml
.Problem
When using the Helm chart, if a user defines rules via
.Values.ruler.directories
,loki/production/helm/loki/values.yaml
Lines 3104 to 3120 in cc10685
the chart correctly creates
ConfigMaps
loki/production/helm/loki/templates/ruler/configmap-ruler.yaml
Line 3 in cc10685
and mounts them
loki/production/helm/loki/templates/ruler/statefulset-ruler.yaml
Lines 112 to 115 in cc10685
to the ruler's filesystem at
/etc/loki/rules
.However, if
.Values.loki.storage.type
is set to a cloud storage provider (e.g.,s3
,gcs
), the ruler is also implicitly configuredloki/production/helm/loki/templates/_helpers.tpl
Lines 322 to 329 in cc10685
to use that same provider for its rule storage. This causes the ruler to ignore the local rules mounted from the
ConfigMaps
, as it's looking for them in the cloud backend instead of the local filesystem.Workaround
To resolve this, the user must manually override the ruler's storage configuration to point to the local directory:
This solution is not intuitive and is fragile because it requires the user to hardcode the
/etc/loki/rules
path, which is an internal implementation detail of the chart.Proposed Solution
While modifying the chart's templates to automatically configure local storage for the ruler, I deemed it was potentially too intrusive and a possible breaking change.
Instead, this PR adds detailed comments to the
values.yaml
file. These comments explain the behavior and provide the required configuration override, improving the user experience by preventing this common pitfall without introducing breaking changes.Checklist
CONTRIBUTING.md
guide (required)feat
PRs 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.md
deprecated-config.yaml
anddeleted-config.yaml
files respectively in thetools/deprecated-config-checker
directory. Example PR