Skip to content

Commit e22049d

Browse files
committed
optional labels + adapt examples
Signed-off-by: odubajDT <[email protected]>
1 parent 1149575 commit e22049d

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

docs/attributes-registry/k8s.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ Kubernetes resource attributes.
2121
| <a id="k8s-cronjob-uid" href="#k8s-cronjob-uid">`k8s.cronjob.uid`</a> | string | The UID of the CronJob. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` | ![Development](https://img.shields.io/badge/-development-blue) |
2222
| <a id="k8s-daemonset-name" href="#k8s-daemonset-name">`k8s.daemonset.name`</a> | string | The name of the DaemonSet. | `opentelemetry` | ![Development](https://img.shields.io/badge/-development-blue) |
2323
| <a id="k8s-daemonset-uid" href="#k8s-daemonset-uid">`k8s.daemonset.uid`</a> | string | The UID of the DaemonSet. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` | ![Development](https://img.shields.io/badge/-development-blue) |
24-
| <a id="k8s-deployment-annotation" href="#k8s-deployment-annotation">`k8s.deployment.annotation.<key>`</a> | string | The annotation key-value pairs placed on the Deployment. [2] | `k8s.deployment.annotation.replicas=1`; `k8s.deployment.annotation.data=` | ![Development](https://img.shields.io/badge/-development-blue) |
25-
| <a id="k8s-deployment-label" href="#k8s-deployment-label">`k8s.deployment.label.<key>`</a> | string | The label key-value pairs placed on the Deployment. [3] | `k8s.deployment.label.app=guestbook`; `k8s.deployment.label.injected=` | ![Development](https://img.shields.io/badge/-development-blue) |
24+
| <a id="k8s-deployment-annotation" href="#k8s-deployment-annotation">`k8s.deployment.annotation.<key>`</a> | string | The annotation key-value pairs placed on the Deployment. [2] | `loadbalancer`; `` | ![Development](https://img.shields.io/badge/-development-blue) |
25+
| <a id="k8s-deployment-label" href="#k8s-deployment-label">`k8s.deployment.label.<key>`</a> | string | The label key-value pairs placed on the Deployment. [3] | `guestbook`; `` | ![Development](https://img.shields.io/badge/-development-blue) |
2626
| <a id="k8s-deployment-name" href="#k8s-deployment-name">`k8s.deployment.name`</a> | string | The name of the Deployment. | `opentelemetry` | ![Development](https://img.shields.io/badge/-development-blue) |
2727
| <a id="k8s-deployment-uid" href="#k8s-deployment-uid">`k8s.deployment.uid`</a> | string | The UID of the Deployment. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` | ![Development](https://img.shields.io/badge/-development-blue) |
2828
| <a id="k8s-hpa-name" href="#k8s-hpa-name">`k8s.hpa.name`</a> | string | The name of the horizontal pod autoscaler. | `opentelemetry` | ![Development](https://img.shields.io/badge/-development-blue) |

docs/resource/k8s.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,14 +237,14 @@ distributed among the nodes of a cluster.
237237

238238
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
239239
|---|---|---|---|---|---|
240-
| [`k8s.deployment.label.<key>`](/docs/attributes-registry/k8s.md) | string | The label key-value pairs placed on the Deployment. [1] | `k8s.deployment.label.app=guestbook`; `k8s.deployment.label.injected=` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
241240
| [`k8s.deployment.name`](/docs/attributes-registry/k8s.md) | string | The name of the Deployment. | `opentelemetry` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
242241
| [`k8s.deployment.uid`](/docs/attributes-registry/k8s.md) | string | The UID of the Deployment. | `275ecb36-5aa8-4c2a-9c47-d8bb681b9aff` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
243-
| [`k8s.deployment.annotation.<key>`](/docs/attributes-registry/k8s.md) | string | The annotation key-value pairs placed on the Deployment. [2] | `k8s.deployment.annotation.replicas=1`; `k8s.deployment.annotation.data=` | `Opt-In` | ![Development](https://img.shields.io/badge/-development-blue) |
242+
| [`k8s.deployment.annotation.<key>`](/docs/attributes-registry/k8s.md) | string | The annotation key-value pairs placed on the Deployment. [1] | `loadbalancer`; `` | `Opt-In` | ![Development](https://img.shields.io/badge/-development-blue) |
243+
| [`k8s.deployment.label.<key>`](/docs/attributes-registry/k8s.md) | string | The label key-value pairs placed on the Deployment. [2] | `guestbook`; `` | `Opt-In` | ![Development](https://img.shields.io/badge/-development-blue) |
244244

245-
**[1] `k8s.deployment.label`:** The `<key>` being the label name, the value being the label value, even if the value is empty.
245+
**[1] `k8s.deployment.annotation`:** The `<key>` being the annotation name, the value being the annotation value, even if the value is empty.
246246

247-
**[2] `k8s.deployment.annotation`:** The `<key>` being the annotation name, the value being the annotation value, even if the value is empty.
247+
**[2] `k8s.deployment.label`:** The `<key>` being the label name, the value being the label value, even if the value is empty.
248248

249249
<!-- markdownlint-restore -->
250250
<!-- prettier-ignore-end -->

model/k8s/registry.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,15 +176,15 @@ groups:
176176
The label key-value pairs placed on the Deployment.
177177
note: |
178178
The `<key>` being the label name, the value being the label value, even if the value is empty.
179-
examples: ['k8s.deployment.label.app=guestbook', 'k8s.deployment.label.injected=']
179+
examples: ['guestbook', '']
180180
- id: k8s.deployment.annotation
181181
type: template[string]
182182
stability: development
183183
brief: >
184184
The annotation key-value pairs placed on the Deployment.
185185
note: |
186186
The `<key>` being the annotation name, the value being the annotation value, even if the value is empty.
187-
examples: [ 'k8s.deployment.annotation.replicas=1', 'k8s.deployment.annotation.data=' ]
187+
examples: [ 'loadbalancer', '' ]
188188
- id: k8s.statefulset.uid
189189
type: string
190190
stability: development

model/k8s/resources.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ groups:
7575
- ref: k8s.deployment.uid
7676
- ref: k8s.deployment.name
7777
- ref: k8s.deployment.label
78+
requirement_level: opt_in
7879
- ref: k8s.deployment.annotation
7980
requirement_level: opt_in
8081

0 commit comments

Comments
 (0)