Skip to content

Commit be15c75

Browse files
authored
[CONTP-1051] hide pod and node labels/annotations as tags in a collapsed legacy configuration section (#33089)
* hide pod and node labels/annotations as tags in a collapsed legacy configuration section * respond to review
1 parent 5dbeb07 commit be15c75

File tree

1 file changed

+16
-15
lines changed
  • content/en/containers/kubernetes

1 file changed

+16
-15
lines changed

content/en/containers/kubernetes/tag.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ spec:
326326
baz: qux
327327
```
328328

329-
For Agent v7.24.0+, use the following environment variable configuration to add all resource annotations as tags to your metrics, except those from KSM (`kubernetes_state.*`). In this example, pod tag names are prefixed with `<PREFIX>_`:
329+
For Agent v7.24.0+, use the following environment variable configuration to add all resource annotations as tags to your metrics. In this example, pod tag names are prefixed with `<PREFIX>_`:
330330

331331
```yaml
332332
apiVersion: datadoghq.com/v2alpha1
@@ -337,7 +337,7 @@ spec:
337337
global:
338338
kubernetesResourcesAnnotationsAsTags:
339339
pods:
340-
"*": <PREFIX>_%%annotation%%
340+
"*": <PREFIX>_%%annotation%% #
341341
```
342342

343343
{{% /tab %}}
@@ -438,8 +438,8 @@ bar: quuz
438438
</div>
439439

440440

441-
442-
### Node labels as tags
441+
{{% collapse-content title="Legacy Configuration" level="h4" expanded=false id="legacy-configuration" %}}
442+
#### Node labels as tags
443443

444444
<div class="alert alert-info">
445445

@@ -476,7 +476,7 @@ spec:
476476
kubernetes.io/arch: arch
477477
```
478478

479-
For Agent v7.24.0+, use the following environment variable configuration to add all node labels as tags to your metrics, except those from KSM (`kubernetes_state.*`). In this example, the tag' names are prefixed with `<PREFIX>_`:
479+
For Agent v7.24.0+, use the following environment variable configuration to add all node labels as tags to your metrics. In this example, the tag' names are prefixed with `<PREFIX>_`:
480480

481481
```yaml
482482
apiVersion: datadoghq.com/v2alpha1
@@ -486,7 +486,7 @@ metadata:
486486
spec:
487487
global:
488488
nodeLabelsAsTags:
489-
"*": <PREFIX>_%%label%% # Note: wildcards do not work for KSM metrics
489+
"*": <PREFIX>_%%label%% # Note: wildcards do not work for KSM metrics before version 7.73
490490
```
491491
{{% /tab %}}
492492

@@ -506,13 +506,13 @@ datadog:
506506
kubernetes.io/arch: arch
507507
```
508508

509-
For Agent v7.24.0+, use the following environment variable configuration to add all node labels as tags to your metrics, except those from KSM (`kubernetes_state.*`). In this example, the tags' names are prefixed with `<PREFIX>_`:
509+
For Agent v7.24.0+, use the following environment variable configuration to add all node labels as tags to your metrics. In this example, the tags' names are prefixed with `<PREFIX>_`:
510510

511511

512512
```yaml
513513
datadog:
514514
nodeLabelsAsTags:
515-
"*": <PREFIX>_%%label%% # Note: wildcards do not work for KSM metrics
515+
"*": <PREFIX>_%%label%% # Note: wildcards do not work for KSM metrics before version 7.73
516516
```
517517
{{% /tab %}}
518518

@@ -529,17 +529,17 @@ For example, you could set up:
529529
DD_KUBERNETES_NODE_LABELS_AS_TAGS='{"kubernetes.io/arch":"arch"}'
530530
```
531531

532-
For Agent v7.24.0+, use the following environment variable configuration to add all node labels as tags to your metrics, except those from KSM (`kubernetes_state.*`). In this example, the tags' tag names are prefixed with `<PREFIX>_`:
532+
For Agent v7.24.0+, use the following environment variable configuration to add all node labels as tags to your metrics. In this example, the tags' tag names are prefixed with `<PREFIX>_`:
533533

534534
```bash
535-
DD_KUBERNETES_NODE_LABELS_AS_TAGS='{"*":"<PREFIX>_%%label%%"}'
535+
DD_KUBERNETES_NODE_LABELS_AS_TAGS='{"*":"<PREFIX>_%%label%%"}' # Note: wildcards do not work for KSM metrics before version 7.73
536536
```
537537
{{% /tab %}}
538538
{{< /tabs >}}
539539

540540
**Note**: Custom metrics may impact billing. See the [custom metrics billing page][3] for more information.
541541

542-
### Pod labels as tags
542+
#### Pod labels as tags
543543

544544
<div class="alert alert-info">
545545

@@ -576,7 +576,7 @@ spec:
576576
app: kube_app
577577
```
578578

579-
For Agent v7.24.0+, use the following environment variable configuration to add all pod labels as tags to your metrics, except those from KSM (`kubernetes_state.*`). In this example, the tags' names are prefixed with `<PREFIX>_`:
579+
For Agent v7.24.0+, use the following environment variable configuration to add all pod labels as tags to your metrics In this example, the tags' names are prefixed with `<PREFIX>_`:
580580

581581
```yaml
582582
apiVersion: datadoghq.com/v2alpha1
@@ -586,7 +586,7 @@ metadata:
586586
spec:
587587
global:
588588
podLabelsAsTags:
589-
"*": <PREFIX>_%%label%% # Note: wildcards do not work for KSM metrics
589+
"*": <PREFIX>_%%label%% # Note: wildcards do not work for KSM metrics before version 7.73
590590
```
591591
{{% /tab %}}
592592

@@ -638,7 +638,7 @@ DD_KUBERNETES_POD_LABELS_AS_TAGS='{"*":"<PREFIX>_%%label%%"}'
638638

639639
**Note**: Custom metrics may impact billing. See the [custom metrics billing page][3] for more information.
640640

641-
### Pod annotations as tags
641+
#### Pod annotations as tags
642642

643643
<div class="alert alert-info">
644644

@@ -737,7 +737,7 @@ DD_KUBERNETES_POD_ANNOTATIONS_AS_TAGS='{"*":"<PREFIX>_%%annotation%%"}'
737737

738738
**Note**: Custom metrics may impact billing. See the [custom metrics billing page][3] for more information.
739739

740-
### Namespace labels as tags
740+
#### Namespace labels as tags
741741

742742
<div class="alert alert-info">
743743

@@ -835,6 +835,7 @@ DD_KUBERNETES_NAMESPACE_LABELS_AS_TAGS='{"*":"<PREFIX>_%%label%%"}'
835835
{{< /tabs >}}
836836

837837
**Note**: Custom metrics may impact billing. See the [custom metrics billing page][3] for more information.
838+
{{% /collapse-content %}}
838839

839840
### Container environment variables as tags
840841

0 commit comments

Comments
 (0)