hubble-relay: relax podAffinity to preferred so Karpenter can drain the last node#459
hubble-relay: relax podAffinity to preferred so Karpenter can drain the last node#459luca-rui wants to merge 2 commits into
Conversation
Karpenter cannot drain the last cilium-agent-bearing node during cluster upgrades / consolidation because the upstream chart requires hubble-relay to be co-located with a cilium agent. With Karpenter trying to remove the final node, the drain hangs. Switching to preferredDuringSchedulingIgnoredDuringExecution keeps the co-location preference under normal operation but lets the scheduler place hubble-relay elsewhere when the only cilium-agent node is being drained. Observed on multiple workload clusters since the Karpenter migration.
ad88023 to
14675b4
Compare
Applied straight from validate-sync-diffs CI output; equivalent to running `cd ./helm && make` locally.
|
/run app-test-suites |
|
From human review (not agent involved) the change is fine and I dont see any problem changing to |
|
I'm not sure if I understand what the problem is, it'd be nice to have more context and the discussions concluding that this is the right solution.
This describes an scenario that in our clusters (unless it's cluster deletion) it would never happen. There's no
Does this mean that the E2E tests are not covering this scenario (Upgrade+Karpenter)? I think we would have caught this in such test. Now, regarding the problem please consider:
|
Summary
Switches
hubble-relay'spodAffinityfromrequiredDuringSchedulingIgnoredDuringExecutiontopreferredDuringSchedulingIgnoredDuringExecution. The upstream chart hard-requires hubble-relay to co-locate with acilium-agentpod, which blocks Karpenter from draining the last cilium-agent-bearing node during cluster upgrades or consolidation.Why
Since the Karpenter migration, cluster upgrades on several workload clusters have been hanging on the final node — SREs have had to manually drain it (or kill the hubble-relay pod) to let the upgrade complete.
Discussed internally with team-cabbage; no apparent reason for the affinity to be hard-required.
preferredkeeps the co-location intent under normal operation but lets the scheduler place relay elsewhere when the only remaining cilium-agent node is being drained.Change
In
sync/patches/values/values.yaml.tmpl(and the syncedhelm/cilium/values.yaml.tmpl/ renderedhelm/cilium/values.yaml):diffs/helm__cilium__values.yaml.tmpl.patchregenerated against the existing vendored upstream (verified by reverse-applying the old patch to reconstruct the upstream, then re-diffing).Test plan
validate-sync-diffspasses (regenerated diffs match committed)