update gateway spec
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# HTTPRoute — Grafana via Cilium Gateway
|
# HTTPRoute — Grafana via Cilium Gateway
|
||||||
# Cert issued per-service via cert-manager annotation on the Certificate
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
apiVersion: cert-manager.io/v1
|
apiVersion: cert-manager.io/v1
|
||||||
kind: Certificate
|
kind: Certificate
|
||||||
@@ -25,12 +24,21 @@ metadata:
|
|||||||
external-dns.alpha.kubernetes.io/target: "10.1.71.90"
|
external-dns.alpha.kubernetes.io/target: "10.1.71.90"
|
||||||
spec:
|
spec:
|
||||||
parentRefs:
|
parentRefs:
|
||||||
- name: fastpass-gateway
|
- group: gateway.networking.k8s.io
|
||||||
|
kind: Gateway
|
||||||
|
name: fastpass-gateway
|
||||||
namespace: gateway
|
namespace: gateway
|
||||||
sectionName: https
|
sectionName: https
|
||||||
hostnames:
|
hostnames:
|
||||||
- grafana.local.mk-labs.cloud
|
- grafana.local.mk-labs.cloud
|
||||||
rules:
|
rules:
|
||||||
- backendRefs:
|
- matches:
|
||||||
- name: monitoring-grafana
|
- path:
|
||||||
|
type: PathPrefix
|
||||||
|
value: /
|
||||||
|
backendRefs:
|
||||||
|
- group: ""
|
||||||
|
kind: Service
|
||||||
|
name: monitoring-grafana
|
||||||
port: 80
|
port: 80
|
||||||
|
weight: 1
|
||||||
|
|||||||
@@ -307,22 +307,40 @@ cluster/applications/<app-name>/
|
|||||||
|
|
||||||
### 3. HTTPRoute pattern
|
### 3. HTTPRoute pattern
|
||||||
|
|
||||||
Every HTTPRoute needs two annotations for DNS and routing to work:
|
Always include all fields explicitly — Cilium defaults `group`, `kind`, `weight`,
|
||||||
|
and `matches` at reconcile time, causing ArgoCD out-of-sync if omitted.
|
||||||
```yaml
|
|
||||||
annotations:
|
Full HTTPRoute template:
|
||||||
external-dns.alpha.kubernetes.io/hostname: <service>.local.mk-labs.cloud
|
|
||||||
external-dns.alpha.kubernetes.io/target: "10.1.71.90"
|
|
||||||
```
|
|
||||||
|
|
||||||
And a parentRef pointing at the platform Gateway:
|
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
apiVersion: gateway.networking.k8s.io/v1
|
||||||
|
kind: HTTPRoute
|
||||||
|
metadata:
|
||||||
|
name: <service>
|
||||||
|
namespace: <app-namespace>
|
||||||
|
annotations:
|
||||||
|
external-dns.alpha.kubernetes.io/hostname: <service>.local.mk-labs.cloud
|
||||||
|
external-dns.alpha.kubernetes.io/target: "10.1.71.90"
|
||||||
spec:
|
spec:
|
||||||
parentRefs:
|
parentRefs:
|
||||||
- name: fastpass-gateway
|
- group: gateway.networking.k8s.io
|
||||||
|
kind: Gateway
|
||||||
|
name: fastpass-gateway
|
||||||
namespace: gateway
|
namespace: gateway
|
||||||
sectionName: https
|
sectionName: https
|
||||||
|
hostnames:
|
||||||
|
- <service>.local.mk-labs.cloud
|
||||||
|
rules:
|
||||||
|
- matches:
|
||||||
|
- path:
|
||||||
|
type: PathPrefix
|
||||||
|
value: /
|
||||||
|
backendRefs:
|
||||||
|
- group: ""
|
||||||
|
kind: Service
|
||||||
|
name: <service>
|
||||||
|
port: <port>
|
||||||
|
weight: 1
|
||||||
```
|
```
|
||||||
|
|
||||||
### 4. Per-service certificate
|
### 4. Per-service certificate
|
||||||
|
|||||||
Reference in New Issue
Block a user