-
Notifications
You must be signed in to change notification settings - Fork 3
fix: use otel selector labels instead of regular labels for proper trace wiring #40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,8 +22,7 @@ spec: | |
| {{- end }} | ||
| selector: | ||
| matchLabels: | ||
| {{- include "ctrlplane.selectorLabels" $ | nindent 6 }} | ||
| {{- include "otel.labels" . | nindent 6 }} | ||
| {{- include "otel.selectorLabels" . | nindent 6 }} | ||
|
Comment on lines
23
to
+25
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same immutable selector breaking change applies to Deployment.
🤖 Prompt for AI Agents |
||
| template: | ||
| {{ include "otel.podTemplate" . }} | ||
| {{- end }} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| suite: otel selectors are stable across chart versions | ||
| templates: | ||
| - charts/otel/templates/daemonset.yaml | ||
| - charts/otel/templates/deployment.yaml | ||
| - charts/otel/templates/service.yaml | ||
| - charts/otel/templates/configmap.yaml | ||
| release: | ||
| name: ctrlplane | ||
|
|
||
| tests: | ||
| - it: daemonset selector contains only stable identity labels | ||
| template: charts/otel/templates/daemonset.yaml | ||
| asserts: | ||
| - equal: | ||
| path: spec.selector.matchLabels | ||
| value: | ||
| app.kubernetes.io/name: otel | ||
| app.kubernetes.io/instance: ctrlplane | ||
|
|
||
| - it: daemonset pod labels still include chart-version labels | ||
| template: charts/otel/templates/daemonset.yaml | ||
| asserts: | ||
| - equal: | ||
| path: spec.template.metadata.labels["app.kubernetes.io/name"] | ||
| value: otel | ||
| - equal: | ||
| path: spec.template.metadata.labels["app.kubernetes.io/instance"] | ||
| value: ctrlplane | ||
| - exists: | ||
| path: spec.template.metadata.labels["helm.sh/chart"] | ||
| - exists: | ||
| path: spec.template.metadata.labels["ctrlplane.com/app-name"] | ||
|
|
||
| - it: deployment selector contains only stable identity labels | ||
| template: charts/otel/templates/deployment.yaml | ||
| set: | ||
| otel: | ||
| workload: | ||
| kind: Deployment | ||
| asserts: | ||
| - equal: | ||
| path: spec.selector.matchLabels | ||
| value: | ||
| app.kubernetes.io/name: otel | ||
| app.kubernetes.io/instance: ctrlplane | ||
|
|
||
| - it: service selector contains only stable identity labels | ||
| template: charts/otel/templates/service.yaml | ||
| asserts: | ||
| - equal: | ||
| path: spec.selector | ||
| value: | ||
| app.kubernetes.io/name: otel | ||
| app.kubernetes.io/instance: ctrlplane |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Breaking upgrade:
spec.selector.matchLabelsis immutable on DaemonSet.spec.selectoris an immutable field on Kubernetes DaemonSets (and Deployments) after initial creation. Ahelm upgradefrom the previous chart version will fail with:This affects any cluster currently running the prior chart version. Required pre-upgrade action (one of):
helm upgrade --force— triggers delete + re-create (causes brief downtime/pod disruption).kubectl delete daemonset <name> --cascade=orphanbefore runninghelm upgrade.This should be called out in
NOTES.txt, aCHANGELOG, or upgrade documentation to prevent operators from being caught off-guard.🤖 Prompt for AI Agents