diff --git a/infrastructure/networking/cilium/hubble-ui-httproute.yaml b/infrastructure/networking/cilium/hubble-ui-httproute.yaml new file mode 100644 index 0000000..2ed9984 --- /dev/null +++ b/infrastructure/networking/cilium/hubble-ui-httproute.yaml @@ -0,0 +1,24 @@ +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: hubble-ui + namespace: kube-system + labels: + app.kubernetes.io/name: hubble-ui + app.kubernetes.io/part-of: cilium +spec: + parentRefs: + - name: internal + namespace: internal + sectionName: http-internal + hostnames: + - hubble.lab.internal + rules: + - matches: + - path: + type: PathPrefix + value: / + backendRefs: + # hubble-ui Service (frontend nginx, which proxies /api to the backend) + - name: hubble-ui + port: 80 diff --git a/infrastructure/networking/cilium/kustomization.yaml b/infrastructure/networking/cilium/kustomization.yaml index 1c91239..df3c83d 100644 --- a/infrastructure/networking/cilium/kustomization.yaml +++ b/infrastructure/networking/cilium/kustomization.yaml @@ -4,6 +4,7 @@ namespace: kube-system resources: - repository.yaml - release.yaml + - hubble-ui-httproute.yaml configMapGenerator: - name: cilium-values files: diff --git a/infrastructure/networking/cilium/values.yaml b/infrastructure/networking/cilium/values.yaml index 083e9a0..9081c7f 100644 --- a/infrastructure/networking/cilium/values.yaml +++ b/infrastructure/networking/cilium/values.yaml @@ -39,6 +39,92 @@ operator: - --leader-election-lease-duration=60s - --leader-election-renew-deadline=45s - --leader-election-resource-lock-timeout=20s + # Scrape the operator (:9963). Enabling the ServiceMonitor also renders the + # `cilium-operator` Service that backs it. The `release` label is what the + # kube-prometheus-stack Prometheus CR selects on (serviceMonitorSelector). + prometheus: + enabled: true + serviceMonitor: + enabled: true + labels: + release: kube-prometheus-stack + +# The ServiceMonitors below are rendered from this chart (hubble + operator). +# The chart refuses to render them unless either the monitoring.coreos.com/v1 +# CRDs are detected at install time or this flag is set; the CRDs come from the +# `monitoring` Flux Kustomization, which is a separate release with its own +# ordering, so assert them rather than depend on reconcile order. +prometheus: + serviceMonitor: + trustCRDsExist: true + +hubble: + # Flow/Forensics UI is reachable over WireGuard only via the internal Gateway + # (hostname hubble.lab.internal, port 8081) — see docs/internal-wireguard-services.md. + # Neither relay nor UI gets a public hostname or a tunnel ingress entry. + relay: + enabled: true + replicas: 1 + nodeSelector: + kubernetes.io/hostname: siriussec + resources: + requests: + cpu: 25m + memory: 64Mi + limits: + cpu: 200m + memory: 256Mi + prometheus: + enabled: true + serviceMonitor: + enabled: true + labels: + release: kube-prometheus-stack + ui: + enabled: true + replicas: 1 + nodeSelector: + kubernetes.io/hostname: siriussec + backend: + resources: + requests: + cpu: 10m + memory: 32Mi + limits: + cpu: 100m + memory: 128Mi + frontend: + resources: + requests: + cpu: 10m + memory: 32Mi + limits: + cpu: 100m + memory: 128Mi + metrics: + # Agent-side hubble_* counters on :9965. `enabled` is a LIST in the 1.20 + # chart schema (not a boolean): the metric names to enable. flow/drop carry + # the policy-verdict labels because hubble-network-policy-correlation is on. + # hostPort on every node — metrics only, no UI. + enabled: + - flow + - drop + - tcp + - port-distribution + - icmp + - httpV2 + - dns + serviceMonitor: + enabled: true + labels: + release: kube-prometheus-stack + dashboards: + # Chart's own "Hubble Metrics and Monitoring" dashboard (38 panels: + # flows, drops, policy verdicts, TCP, DNS). Loaded by the Grafana + # dashboard sidecar (NAMESPACE=ALL, label grafana_dashboard). + enabled: true + label: grafana_dashboard + labelValue: "1" ipam: mode: cluster-pool