diff --git a/cluster/applications/monitoring/httproute.yaml b/cluster/applications/monitoring/httproute.yaml index 6a64e36..374d898 100644 --- a/cluster/applications/monitoring/httproute.yaml +++ b/cluster/applications/monitoring/httproute.yaml @@ -1,6 +1,5 @@ # ------------------------------------------------------------------------------ # HTTPRoute — Grafana via Cilium Gateway -# Cert issued per-service via cert-manager annotation on the Certificate # ------------------------------------------------------------------------------ apiVersion: cert-manager.io/v1 kind: Certificate @@ -25,12 +24,21 @@ metadata: external-dns.alpha.kubernetes.io/target: "10.1.71.90" spec: parentRefs: - - name: fastpass-gateway + - group: gateway.networking.k8s.io + kind: Gateway + name: fastpass-gateway namespace: gateway sectionName: https hostnames: - grafana.local.mk-labs.cloud rules: - - backendRefs: - - name: monitoring-grafana + - matches: + - path: + type: PathPrefix + value: / + backendRefs: + - group: "" + kind: Service + name: monitoring-grafana port: 80 + weight: 1 diff --git a/cluster/bootstrap/README.md b/cluster/bootstrap/README.md index 0b9f001..3e44971 100644 --- a/cluster/bootstrap/README.md +++ b/cluster/bootstrap/README.md @@ -307,22 +307,40 @@ cluster/applications// ### 3. HTTPRoute pattern -Every HTTPRoute needs two annotations for DNS and routing to work: - -```yaml -annotations: - external-dns.alpha.kubernetes.io/hostname: .local.mk-labs.cloud - external-dns.alpha.kubernetes.io/target: "10.1.71.90" -``` - -And a parentRef pointing at the platform Gateway: +Always include all fields explicitly — Cilium defaults `group`, `kind`, `weight`, +and `matches` at reconcile time, causing ArgoCD out-of-sync if omitted. + +Full HTTPRoute template: ```yaml +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: + namespace: + annotations: + external-dns.alpha.kubernetes.io/hostname: .local.mk-labs.cloud + external-dns.alpha.kubernetes.io/target: "10.1.71.90" spec: parentRefs: - - name: fastpass-gateway + - group: gateway.networking.k8s.io + kind: Gateway + name: fastpass-gateway namespace: gateway sectionName: https + hostnames: + - .local.mk-labs.cloud + rules: + - matches: + - path: + type: PathPrefix + value: / + backendRefs: + - group: "" + kind: Service + name: + port: + weight: 1 ``` ### 4. Per-service certificate