From 6f4bb339af0dcf89f87617beaf7f7f06e62a9b30 Mon Sep 17 00:00:00 2001 From: 0xFEEDC0DE64 Date: Mon, 31 Aug 2026 13:00:31 +0200 Subject: [PATCH] Enable monitoring and high-availability --- README.md | 5 ++++- cilium-alerts.yaml | 35 +++++++++++++++++++++++++++++++++++ install.sh | 6 ++++++ values.yaml | 8 +++++++- 4 files changed, 52 insertions(+), 2 deletions(-) create mode 100644 cilium-alerts.yaml diff --git a/README.md b/README.md index 06b06f1..09fa57a 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,10 @@ cilium-cli upgrade --version v1.20.0 --dry-run-helm-values ``` They preserve the Kubernetes API endpoint, VXLAN tunnel routing, -kube-proxy replacement, one operator replica, and Hubble Relay/UI. +kube-proxy replacement, two operator replicas, and Hubble Relay/UI. The +operator replicas are restricted to Odroid workers, use required pod +anti-affinity so they run on different nodes, and have a disruption budget +that keeps at least one available during voluntary disruptions. ## Hubble TLS diff --git a/cilium-alerts.yaml b/cilium-alerts.yaml new file mode 100644 index 0000000..0ad0143 --- /dev/null +++ b/cilium-alerts.yaml @@ -0,0 +1,35 @@ +apiVersion: monitoring.coreos.com/v1 +kind: PrometheusRule +metadata: + name: cilium-availability + namespace: prometheus +spec: + groups: + - name: cilium.availability + rules: + - alert: CiliumAgentDown + expr: | + kube_daemonset_status_desired_number_scheduled{namespace="kube-system", daemonset="cilium"} + - + kube_daemonset_status_number_ready{namespace="kube-system", daemonset="cilium"} + > 0 + for: 5m + labels: + namespace: kube-system + severity: critical + annotations: + summary: One or more Cilium agents are unavailable + description: >- + Only {{ $value }} fewer Cilium agents are ready than desired. + Affected nodes may lose pod networking or service connectivity. + - alert: CiliumOperatorDown + expr: | + kube_deployment_status_replicas_available{namespace="kube-system", deployment="cilium-operator"} < 1 + for: 5m + labels: + namespace: kube-system + severity: critical + annotations: + summary: The Cilium operator is unavailable + description: >- + No Cilium operator replica has been available for at least five minutes. diff --git a/install.sh b/install.sh index 3268360..9d96616 100755 --- a/install.sh +++ b/install.sh @@ -73,3 +73,9 @@ kubectl rollout status deployment/hubble-relay \ --namespace "$NAMESPACE" --timeout=5m cilium-cli status --wait + +# Install availability alerts when Prometheus Operator is present. This keeps +# a fresh Cilium-only bootstrap independent from the monitoring install order. +if kubectl get customresourcedefinition prometheusrules.monitoring.coreos.com >/dev/null 2>&1; then + kubectl apply --filename "$SCRIPT_DIR/cilium-alerts.yaml" +fi diff --git a/values.yaml b/values.yaml index 05ed1f5..bf038c6 100644 --- a/values.yaml +++ b/values.yaml @@ -22,7 +22,13 @@ k8sServicePort: 6443 kubeProxyReplacement: true operator: - replicas: 1 + replicas: 2 + nodeSelector: + kubernetes.io/os: linux + odroid-h3: enabled + podDisruptionBudget: + enabled: true + maxUnavailable: 1 routingMode: tunnel tunnelProtocol: vxlan