Skip to content

[kube-state-metrics] align metricAnnotationsAllowlist naming#6721

Open
firasmosbehi wants to merge 1 commit intoprometheus-community:mainfrom
firasmosbehi:codex/5651-ksm-metric-annotations-allowlist
Open

[kube-state-metrics] align metricAnnotationsAllowlist naming#6721
firasmosbehi wants to merge 1 commit intoprometheus-community:mainfrom
firasmosbehi:codex/5651-ksm-metric-annotations-allowlist

Conversation

@firasmosbehi
Copy link
Copy Markdown
Contributor

Summary

This PR adds the normalized metricAnnotationsAllowlist values key to kube-state-metrics while preserving backward compatibility with the existing metricAnnotationsAllowList key, addressing #5651.

Problem

The chart uses metricAnnotationsAllowList while related options use the Allowlist casing convention. This is inconsistent and causes confusion.

Root cause

The value and template wiring were implemented only with the older AllowList casing.

Fix

  • Added metricAnnotationsAllowlist to values.yaml.
  • Kept metricAnnotationsAllowList as a deprecated compatibility alias.
  • Updated deployment args rendering to prefer metricAnnotationsAllowlist and fall back to metricAnnotationsAllowList.
  • Bumped chart version from 7.2.0 to 7.2.1.

Validation

  • helm lint charts/kube-state-metrics
  • helm template test charts/kube-state-metrics --set-string 'metricAnnotationsAllowlist[0]=pods=[kubernetes.io/team]'
  • helm template test charts/kube-state-metrics --set-string 'metricAnnotationsAllowList[0]=pods=[legacy/key]'
  • Verified both render the expected --metric-annotations-allowlist=... argument.

Compatibility

Backward compatible by design: existing users of metricAnnotationsAllowList continue to work.

Signed-off-by: Firas Mosbehi <firas.mosbehi@insat.ucar.tn>
@firasmosbehi firasmosbehi changed the title [codex] [kube-state-metrics] align metricAnnotationsAllowlist naming [kube-state-metrics] align metricAnnotationsAllowlist naming Mar 6, 2026
@firasmosbehi firasmosbehi marked this pull request as ready for review March 6, 2026 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant