Repository navigation
Labels
effort/lowEffort Low: little workpriority/p3-lowPriority P3: a small improvementscope/k8sKubernetes commands, Helm charts, pods, services, and policiestype/bugType bug: the code does not do what it mustvalue/lowValue Low: the delivery of the item matters little
Description
Problem
k8s/cloudflared/deployment.yaml:11 runs 2 replicas with no topologySpreadConstraints or pod anti-affinity, and the cloudflared namespace has no PodDisruptionBudget. Both tunnel connectors can land on one node, and losing or draining that node cuts all external ingress. Today the pods happen to sit on two nodes. kube-linter's no-anti-affinity check flagged it in every branch review on 2026-10-02 (S1 to S6), and S5 verified it (.data/review-evaluation-20261002-s5.md, section 6.3).
Acceptance criteria
- The Deployment has a
topologySpreadConstraintsentry onkubernetes.io/hostnamewithmaxSkew: 1andwhenUnsatisfiable: ScheduleAnyway, so a rollout does not block while a node is offline. - A PodDisruptionBudget with
minAvailable: 1selects the cloudflared pods. - An offline test parses the manifests and asserts both.
- kube-linter's anti-affinity check is clean on the file.
-
uv run devops cipasses. - (person-run) After
kubectl apply,kubectl -n cloudflared get pods -o wideshows the two pods on different nodes, and akubectl drain --dry-run=serverof one node leaves a pod running.
Key questions
requiredDuringSchedulinganti-affinity instead? (proposed) No. With a node offline (workhorse is), a hard rule would leave a replica Pending. A soft spread keeps both running.
Depends on: none.
Order: any time.
Related: #953 (network policies in the same stack).
Update 2026-10-08: refinement
Measured with kube-linter 0.8.3: a topologySpreadConstraints entry still fails no-anti-affinity; a preferred podAntiAffinity term passes and stays soft.
- (replaces the first criterion) The Deployment has a preferred
podAntiAffinityterm onkubernetes.io/hostnameselecting the cloudflared pods; the test asserts it and the PodDisruptionBudget.
Metadata
Metadata
Assignees
Labels
effort/lowEffort Low: little workpriority/p3-lowPriority P3: a small improvementscope/k8sKubernetes commands, Helm charts, pods, services, and policiestype/bugType bug: the code does not do what it mustvalue/lowValue Low: the delivery of the item matters little
Type
Projects
- StatusShow more project fieldsReady
- StatusShow more project fieldsReady
Activity
chore(main): release 0.11.0 (#2501)