Skip to content

[kube-prometheus-stack] set explicit HTTPRoute backendRef defaults#6719

Merged
jkroepke merged 3 commits intoprometheus-community:mainfrom
firasmosbehi:codex/6441-kps-explicit-httproute-backendrefs
Mar 15, 2026
Merged

[kube-prometheus-stack] set explicit HTTPRoute backendRef defaults#6719
jkroepke merged 3 commits intoprometheus-community:mainfrom
firasmosbehi:codex/6441-kps-explicit-httproute-backendrefs

Conversation

@firasmosbehi
Copy link
Contributor

Summary

This PR explicitly sets default backendRef fields (group, kind, weight) in kube-prometheus-stack HTTPRoute templates, addressing #6441.

Problem

Gateway API defaulting adds backendRef fields server-side. Because the chart omitted these fields, GitOps tools (for example Argo CD) can observe perpetual diff churn: desired manifests omit fields while live objects include defaulted values.

Root cause

Route templates only rendered backendRef name and port for Prometheus, Alertmanager, and Thanos Ruler HTTPRoutes.

Fix

Updated all three route templates to explicitly render:

  • group: ""
  • kind: Service
  • weight: 1
    alongside existing name and port.

Files updated:

  • templates/prometheus/route.yaml
  • templates/alertmanager/route.yaml
  • templates/thanos-ruler/route.yaml
  • chart version bump 82.9.0 -> 82.9.1

Validation

  • helm lint charts/kube-prometheus-stack
  • helm template test charts/kube-prometheus-stack --set prometheus.route.main.enabled=true
  • Verified rendered HTTPRoute backendRefs include explicit group, kind, and weight.

Compatibility

No functional behavior change for routing semantics; this aligns rendered manifests with Kubernetes-defaulted live state.

Signed-off-by: Firas Mosbehi <firas.mosbehi@insat.ucar.tn>
@firasmosbehi firasmosbehi changed the title [codex] [kube-prometheus-stack] set explicit HTTPRoute backendRef defaults [kube-prometheus-stack] set explicit HTTPRoute backendRef defaults Mar 6, 2026
@firasmosbehi firasmosbehi changed the title [kube-prometheus-stack] set explicit HTTPRoute backendRef defaults [codex] [kube-prometheus-stack] set explicit HTTPRoute backendRef defaults Mar 6, 2026
@firasmosbehi firasmosbehi marked this pull request as ready for review March 6, 2026 09:44
@firasmosbehi firasmosbehi changed the title [codex] [kube-prometheus-stack] set explicit HTTPRoute backendRef defaults [kube-prometheus-stack] set explicit HTTPRoute backendRef defaults Mar 6, 2026
jkroepke
jkroepke previously approved these changes Mar 6, 2026
Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
@jkroepke jkroepke enabled auto-merge (squash) March 6, 2026 23:15
Signed-off-by: Ilia Lazebnik <Ilia.lazebnik@gmail.com>
@jkroepke jkroepke merged commit 42949fa into prometheus-community:main Mar 15, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants