Skip to content

Commit 5f1df22

Browse files
committed
fix(charts): emit leading document separators in monitoring partials
The routerlib service-monitor and rbac partials open their conditional bodies without a leading '---'. Include sites chain partials on adjacent lines and rely on each partial to separate itself, so with router.monitoring.prometheus.enabled=true the rendered ServiceMonitor continues the preceding EPP Service document, forming one YAML document with duplicate root keys. Helm parses that document last-key-wins as a ServiceMonitor and the Service drops out of the release inventory: an upgrade that enables monitoring deletes the live Service, a fresh install with monitoring enabled never creates it, and Helm reports no error. Observed on GKE with Helm v4.2.0. The rbac partial fails the same way when the service-monitor partial renders empty (prometheus enabled with a provider other than prometheusoperator): its ClusterRole fuses onto the Service. Add a leading '---' inside each conditional, matching _leader-election-rbac.yaml. Signed-off-by: Luke Van Drie <lukevandrie@google.com>
1 parent 800ec0e commit 5f1df22

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

config/charts/routerlib/templates/_rbac.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{{- define "llm-d-router.rbac" -}}
22
{{- if .Values.router.monitoring.prometheus.enabled }}
3+
---
34
kind: ClusterRole
45
apiVersion: rbac.authorization.k8s.io/v1
56
metadata:

config/charts/routerlib/templates/_servicemonitor.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{{- define "llm-d-epp.service-monitor" -}}
22
{{- $monitoringProviderName := include "llm-d-router.monitoring.provider.name" . | lower -}}
33
{{- if and .Values.router.monitoring.prometheus.enabled (eq $monitoringProviderName "prometheusoperator") }}
4+
---
45
apiVersion: monitoring.coreos.com/v1
56
kind: ServiceMonitor
67
metadata:

0 commit comments

Comments
 (0)