Skip to content

Commit 402df97

Browse files
fix: use otel selector labels instead of regular labels for proper trace wiring (#40)
1 parent 03fe98e commit 402df97

7 files changed

Lines changed: 62 additions & 10 deletions

File tree

‎charts/ctrlplane/Chart.lock‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ dependencies:
44
version: 0.1.6
55
- name: otel
66
repository: file://charts/otel
7-
version: 0.2.0
7+
version: 0.2.1
88
- name: wandb-base
99
repository: https://charts.wandb.ai
1010
version: 0.11.11
@@ -14,5 +14,5 @@ dependencies:
1414
- name: wandb-base
1515
repository: https://charts.wandb.ai
1616
version: 0.11.11
17-
digest: sha256:11be9c366718847a7f76355f54f3816cd7223e2d9feb63a28d90e6397ad0cc50
18-
generated: "2026-04-13T16:19:18.331308-05:00"
17+
digest: sha256:03b431cdd1b20c20d969b0eacb90e33dec92599d877dde63f801f2fa926b8d86
18+
generated: "2026-05-04T13:22:49.464936-04:00"

‎charts/ctrlplane/Chart.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: ctrlplane
33
description: Ctrlplane Helm chart for Kubernetes
44
type: application
5-
version: 1.1.1
5+
version: 1.1.2
66
appVersion: 1.0.0
77

88
maintainers:

‎charts/ctrlplane/charts/otel/Chart.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ name: otel
33
type: application
44
description: A Helm chart for Kubernetes
55

6-
version: 0.2.0
6+
version: 0.2.1
77
appVersion: "0.109.0"

‎charts/ctrlplane/charts/otel/templates/daemonset.yaml‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ metadata:
1515
spec:
1616
selector:
1717
matchLabels:
18-
{{- include "ctrlplane.selectorLabels" $ | nindent 6 }}
19-
{{- include "otel.labels" . | nindent 6 }}
18+
{{- include "otel.selectorLabels" . | nindent 6 }}
2019
template:
2120
{{ include "otel.podTemplate" . }}
2221
{{- end }}

‎charts/ctrlplane/charts/otel/templates/deployment.yaml‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ spec:
2222
{{- end }}
2323
selector:
2424
matchLabels:
25-
{{- include "ctrlplane.selectorLabels" $ | nindent 6 }}
26-
{{- include "otel.labels" . | nindent 6 }}
25+
{{- include "otel.selectorLabels" . | nindent 6 }}
2726
template:
2827
{{ include "otel.podTemplate" . }}
2928
{{- end }}

‎charts/ctrlplane/charts/otel/templates/service.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ spec:
3232
protocol: TCP
3333
name: otlp-http
3434
selector:
35-
{{- include "otel.labels" . | nindent 4 }}
35+
{{- include "otel.selectorLabels" . | nindent 4 }}
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
suite: otel selectors are stable across chart versions
2+
templates:
3+
- charts/otel/templates/daemonset.yaml
4+
- charts/otel/templates/deployment.yaml
5+
- charts/otel/templates/service.yaml
6+
- charts/otel/templates/configmap.yaml
7+
release:
8+
name: ctrlplane
9+
10+
tests:
11+
- it: daemonset selector contains only stable identity labels
12+
template: charts/otel/templates/daemonset.yaml
13+
asserts:
14+
- equal:
15+
path: spec.selector.matchLabels
16+
value:
17+
app.kubernetes.io/name: otel
18+
app.kubernetes.io/instance: ctrlplane
19+
20+
- it: daemonset pod labels still include chart-version labels
21+
template: charts/otel/templates/daemonset.yaml
22+
asserts:
23+
- equal:
24+
path: spec.template.metadata.labels["app.kubernetes.io/name"]
25+
value: otel
26+
- equal:
27+
path: spec.template.metadata.labels["app.kubernetes.io/instance"]
28+
value: ctrlplane
29+
- exists:
30+
path: spec.template.metadata.labels["helm.sh/chart"]
31+
- exists:
32+
path: spec.template.metadata.labels["ctrlplane.com/app-name"]
33+
34+
- it: deployment selector contains only stable identity labels
35+
template: charts/otel/templates/deployment.yaml
36+
set:
37+
otel:
38+
workload:
39+
kind: Deployment
40+
asserts:
41+
- equal:
42+
path: spec.selector.matchLabels
43+
value:
44+
app.kubernetes.io/name: otel
45+
app.kubernetes.io/instance: ctrlplane
46+
47+
- it: service selector contains only stable identity labels
48+
template: charts/otel/templates/service.yaml
49+
asserts:
50+
- equal:
51+
path: spec.selector
52+
value:
53+
app.kubernetes.io/name: otel
54+
app.kubernetes.io/instance: ctrlplane

0 commit comments

Comments
 (0)