fix(helm): Use correct access_key_id mapping in alibabacloud storage helper template - #21827
Conversation
## Motivation - Fix a one-character bug in `grafana-loki/chart/templates/_helpers.tpl` where the alibabacloud storage block had `"access_key_id" .secretAccessKey` instead of `.accessKeyId`. - As a result, `loki.storage.alibabacloud.accessKeyId` was previously unusable — the rendered `access_key_id` always took `secretAccessKey`'s value. ## Verification - [ ] \`helm template\` against a sample values file with \`loki.storage.type=alibabacloud\` and distinct \`accessKeyId\` / \`secretAccessKey\` values, and confirm the rendered Loki config has them mapped correctly. Signed-off-by: Max Xu <xuhuan@live.cn>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Hi @maxsxu
Please also open a PR against the grafana-community/helm-charts repository The bug exists there as well: https://github.com/grafana-community/helm-charts/blob/main/charts/loki/templates/_helpers.tpl#L285-L293 |
|
@maxsxu Can you please sign the CLA? |
|
Thanks @chaudum for reminding! Now I've
Could you help review again? |
|
@JStickler Should we still merge this into the GEL helm chart? |
|
@chaudum Yes. |
…age helper template (#21827) Signed-off-by: Max Xu <xuhuan@live.cn> Co-authored-by: Christian Haudum <christian.haudum@gmail.com>
What this PR does / why we need it:
grafana-loki/chart/templates/_helpers.tplwhere the alibabacloud storage block had"access_key_id" .secretAccessKeyinstead of.accessKeyId.loki.storage.alibabacloud.accessKeyIdwas previously unusable — the renderedaccess_key_idalways tooksecretAccessKey's value.Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
helm templateagainst a sample values file withloki.storage.type=alibabacloudand distinctaccessKeyId/secretAccessKeyvalues, and confirm the rendered Loki config has them mapped correctly.Checklist
CONTRIBUTING.mdguide (required)docs/sources/setup/upgrade/_index.mddeprecated-config.yamlanddeleted-config.yamlfiles respectively in thetools/deprecated-config-checkerdirectory. Example PRNote
Low Risk
Low risk: a single Helm template field mapping is corrected, affecting only
loki.storage.type=alibabacloudrendering.Overview
Fixes the
alibabacloudstorage stanza inproduction/helm/loki/templates/_helpers.tplsoaccess_key_idis rendered from.accessKeyIdinstead of incorrectly reusing.secretAccessKey.This makes
loki.storage.alibabacloud.accessKeyIdusable and prevents generated Loki config from having identical access and secret keys.Reviewed by Cursor Bugbot for commit 4cfba7a. Bugbot is set up for automated code reviews on this repo. Configure here.