Skip to content

Commit 01fb1aa

Browse files
committed
[processor/k8sattributes] move k8sattr.labelsAnnotationsSingular.allow feature gate to beta
Signed-off-by: odubajDT <[email protected]>
1 parent 095de6b commit 01fb1aa

File tree

3 files changed

+29
-2
lines changed

3 files changed

+29
-2
lines changed

.chloggen/k8sattr-singular.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Use this changelog template to create an entry for release notes.
2+
3+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
4+
change_type: 'breaking'
5+
6+
# The name of the component, or a single word describing the area of concern, (e.g. receiver/filelog)
7+
component: processor/k8sattributes
8+
9+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
10+
note: "Changed default behavior of Kubernetes label and annotation attribute keys to be singular (e.g. `k8s.pod.label.<label_key>`) instead of plural (e.g. `k8s.pod.labels.<label_key>`). This change is controlled by a feature gate which is enabled by default. To revert to the previous plural behavior, disable the `k8sattr.labelsAnnotationsSingular.allow` feature gate."
11+
12+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
13+
issues: [44693]
14+
15+
# (Optional) One or more lines of additional information to render under the primary note.
16+
# These lines will be padded with 2 spaces and then inserted directly into the document.
17+
# Use pipe (|) for multiline entries.
18+
subtext:
19+
20+
# If your change doesn't affect end users or the exported elements of any package,
21+
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
22+
# Optional: The change log or logs in which this entry should be included.
23+
# e.g. '[user]' or '[user, api]'
24+
# Include 'user' if the change is relevant to end users.
25+
# Include 'api' if there is a change to a library API.
26+
# Default: '[user]'
27+
change_logs: []

processor/k8sattributesprocessor/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ can be converted with the usage of `ExtractPatterns` function:
571571

572572
### `k8sattr.labelsAnnotationsSingular.allow`
573573

574-
The `k8sattr.labelsAnnotationsSingular.allow` feature gate, when enabled, changes the default resource attribute key format from `k8s.<workload>.labels.<label-key>` to `k8s.<workload>.label.<label-key>` and `k8s.<workload>.annotations.<annotation-key>` to `k8s.<workload>.annotation.<annotation-key>`.
574+
The `k8sattr.labelsAnnotationsSingular.allow` feature gate is currently at beta stage and enabled by default. When enabled, it changes the default resource attribute key format from `k8s.<workload>.labels.<label-key>` to `k8s.<workload>.label.<label-key>` and `k8s.<workload>.annotations.<annotation-key>` to `k8s.<workload>.annotation.<annotation-key>`.
575575

576576
The reason behind this change is to align the Kubernetes related resource attribute keys with the latest semantic conventions.
577577

processor/k8sattributesprocessor/internal/kube/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ const (
6767

6868
var allowLabelsAnnotationsSingular = featuregate.GlobalRegistry().MustRegister(
6969
"k8sattr.labelsAnnotationsSingular.allow",
70-
featuregate.StageAlpha,
70+
featuregate.StageBeta,
7171
featuregate.WithRegisterDescription("When enabled, default k8s label and annotation resource attribute keys will be singular, instead of plural"),
7272
featuregate.WithRegisterFromVersion("v0.125.0"),
7373
)

0 commit comments

Comments
 (0)