Skip to content

fix(helm): Use correct access_key_id mapping in alibabacloud storage helper template - #21827

Merged
JStickler merged 3 commits into
grafana:mainfrom
maxsxu:patch-1
May 14, 2026
Merged

fix(helm): Use correct access_key_id mapping in alibabacloud storage helper template#21827
JStickler merged 3 commits into
grafana:mainfrom
maxsxu:patch-1

Conversation

@maxsxu

@maxsxu maxsxu commented May 12, 2026

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

  • 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.

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

  • 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.

Checklist

  • Reviewed the CONTRIBUTING.md guide (required)
  • Documentation added
  • Tests updated
  • Title matches the required conventional commits format, see here
  • Changes that require user attention or interaction to upgrade are documented in docs/sources/setup/upgrade/_index.md
  • 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

Note

Low Risk
Low risk: a single Helm template field mapping is corrected, affecting only loki.storage.type=alibabacloud rendering.

Overview
Fixes the alibabacloud storage stanza in production/helm/loki/templates/_helpers.tpl so access_key_id is rendered from .accessKeyId instead of incorrectly reusing .secretAccessKey.

This makes loki.storage.alibabacloud.accessKeyId usable 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.

## 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>
@maxsxu
maxsxu requested a review from a team as a code owner May 12, 2026 03:59
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@cla-assistant

cla-assistant Bot commented May 12, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@chaudum

chaudum commented May 12, 2026

Copy link
Copy Markdown
Contributor

Hi @maxsxu

As of March 16, 2026, the Grafana Loki Helm chart for OSS users has moved to grafana-community/helm-charts (forked at chart version 6.55.0). OSS users are encouraged to migrate to the community-maintained chart. The chart in this repository is now maintained for Grafana Enterprise Logs (GEL) users only. See #20705 for details.

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

@chaudum chaudum changed the title fix(alibabacloud): correct access_key_id mapping in alibabacloud helper May 12, 2026
@chaudum

chaudum commented May 12, 2026

Copy link
Copy Markdown
Contributor

@maxsxu Can you please sign the CLA?

@maxsxu

maxsxu commented May 13, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @chaudum for reminding!

Now I've

Could you help review again?

@chaudum

chaudum commented May 14, 2026

Copy link
Copy Markdown
Contributor

@JStickler Should we still merge this into the GEL helm chart?

@JStickler

Copy link
Copy Markdown
Contributor

@chaudum Yes.

@JStickler
JStickler merged commit ea99cb8 into grafana:main May 14, 2026
97 checks passed
sophiewaldman pushed a commit that referenced this pull request May 15, 2026
…age helper template (#21827)

Signed-off-by: Max Xu <xuhuan@live.cn>
Co-authored-by: Christian Haudum <christian.haudum@gmail.com>
@maxsxu
maxsxu deleted the patch-1 branch May 17, 2026 03:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3 participants