From 873673444d435b2c0bf4683f297ac8336b1f217e Mon Sep 17 00:00:00 2001 From: Jeroen Soeters Date: Mon, 3 Aug 2026 10:51:13 -0700 Subject: [PATCH] fix(examples): set pod template labels on lgtm workloads 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. --- examples/apps/lgtm/grafana.pkl | 2 +- examples/apps/lgtm/minio.pkl | 2 +- examples/apps/lgtm/otel.pkl | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/apps/lgtm/grafana.pkl b/examples/apps/lgtm/grafana.pkl index 5959de08..d028ac84 100644 --- a/examples/apps/lgtm/grafana.pkl +++ b/examples/apps/lgtm/grafana.pkl @@ -165,7 +165,7 @@ function grafanaDeployment(k8sTarget: formae.Target, appNs: ns.Namespace, enable replicas = 1 selector = new k8s.LabelSelector { matchLabels = grafanaLabels } template = new k8s.PodTemplateSpec { - + metadata = new k8s.PodTemplateMetadata { labels = grafanaLabels } spec = new k8s.PodSpec { containers = new Listing { new k8s.Container { diff --git a/examples/apps/lgtm/minio.pkl b/examples/apps/lgtm/minio.pkl index 3fd1cc37..b905e67b 100644 --- a/examples/apps/lgtm/minio.pkl +++ b/examples/apps/lgtm/minio.pkl @@ -37,7 +37,7 @@ function minioStatefulSet( replicas = 1 selector = new k8s.LabelSelector { matchLabels = minioLabels } template = new k8s.PodTemplateSpec { - + metadata = new k8s.PodTemplateMetadata { labels = minioLabels } spec = new k8s.PodSpec { containers = new Listing { new k8s.Container { diff --git a/examples/apps/lgtm/otel.pkl b/examples/apps/lgtm/otel.pkl index 364fe9e6..ccc4155b 100644 --- a/examples/apps/lgtm/otel.pkl +++ b/examples/apps/lgtm/otel.pkl @@ -102,7 +102,7 @@ function gatewayDeployment(k8sTarget: formae.Target, appNs: ns.Namespace): dep.D replicas = 2 selector = new k8s.LabelSelector { matchLabels = gatewayLabels } template = new k8s.PodTemplateSpec { - + metadata = new k8s.PodTemplateMetadata { labels = gatewayLabels } spec = new k8s.PodSpec { containers = new Listing { new k8s.Container { @@ -294,7 +294,7 @@ function agentDaemonSet(k8sTarget: formae.Target, appNs: ns.Namespace): ds.Daemo spec = new ds.DaemonSetSpec { selector = new k8s.LabelSelector { matchLabels = agentLabels } template = new k8s.PodTemplateSpec { - + metadata = new k8s.PodTemplateMetadata { labels = agentLabels } spec = new k8s.PodSpec { serviceAccountName = agentServiceAccount containers = new Listing {