Skip to content

fix: Wildcard label/annotation clobbering#2960

Open
ringerc wants to merge 1 commit into
kubernetes:mainfrom
ringerc:fix-allowlist-wildcard-clobber
Open

fix: Wildcard label/annotation clobbering#2960
ringerc wants to merge 1 commit into
kubernetes:mainfrom
ringerc:fix-allowlist-wildcard-clobber

Conversation

@ringerc
Copy link
Copy Markdown

@ringerc ringerc commented May 19, 2026

Wildcard entries in labels_allow_list and annotations_allow_list clobbered resource-specific entries per #2488. So it was not possible to express the configuration "label A for all resource types, and additionally label B for this specific resource type".

Fix by merging the wildcard and resource-specific discovered labels.

No effect on cardinality except possibly if an existing configuration has masked config due to this bug; if any annotations (or labels, where on mutable resources) have high rates of churn on underlying resources, the newly-unclobbered labels might increase cardinality. This is really a user misconfiguration, but was previously masked by this bug.

Fixes #2488

@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label May 19, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

This issue is currently awaiting triage.

If kube-state-metrics contributors determine this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: ringerc
Once this PR has been reviewed and has the lgtm label, please assign catherinef-dev for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot requested review from dgrisonnet and nmn3m May 19, 2026 02:43
@github-project-automation github-project-automation Bot moved this to Needs Triage in SIG Instrumentation May 19, 2026
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels May 19, 2026
Wildcard entries in labels_allow_list and annotations_allow_list
clobbered resource-specific entries. So it was not possible to
express the configuration "label A for all resource types, and
additionally label B for this specific resource type".

Fix by merging the wildcard and resource-specific discovered labels.

Fixes kubernetes#2488
@ringerc ringerc force-pushed the fix-allowlist-wildcard-clobber branch from 984fa34 to afe5397 Compare May 19, 2026 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

Status: Needs Triage

Development

Successfully merging this pull request may close these issues.

labels_allow_list and annotations_allow_list wildcards clobber resource specific configuration

2 participants