fix(examples): set pod template labels on lgtm workloads - #65
Open
JeroenSoeters wants to merge 1 commit into
Open
fix(examples): set pod template labels on lgtm workloads#65JeroenSoeters wants to merge 1 commit into
JeroenSoeters wants to merge 1 commit into
Conversation
The grafana Deployment, otel gateway Deployment + agent DaemonSet, and minio StatefulSet declared a selector but left their pod template metadata.labels unset, so the Kubernetes API rejected them with "selector does not match template labels". Set the template labels to match each selector, mirroring the loki/tempo/mimir workloads that already do.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The lgtm-observability example's Grafana
Deployment, OTel gatewayDeployment+ agentDaemonSet, and MinIOStatefulSeteach declare aselectorbut leave their pod templatemetadata.labelsunset. The Kubernetes API rejects such workloads:So applying the lgtm example fails to create Grafana, MinIO, and the OTel collectors (and everything that depends on them — the in-cluster Grafana never comes up, MinIO storage is missing so Tempo/Mimir/Loki degrade).
Fix
Set each workload's
template.metadata.labelsto match its selector, viak8s.PodTemplateMetadata { labels = ... }— mirroring the loki/tempo/mimir workloads in the same example that already do this.Testing
pkl evalofexamples/lgtm-observability/local.pklis clean; applying the example against a local cluster now creates the previously-rejected workloads.