feat(traefik): make workload ingress highly available and Burstable#340
feat(traefik): make workload ingress highly available and Burstable#340timtalbot wants to merge 1 commit into
Conversation
Workload Traefik ran a single BestEffort replica, making it a SPOF and the first pod evicted under node pressure - a saturated node could take a workload's entire edge offline. Harden both the EKS (helm_aws) and AKS (clusters_azure) paths: - deployment.replicas defaults to 3, configurable per workload via traefik_deployment_replicas (mirrors the control-room knob) - resource requests/limits move Traefik into Burstable QoS - topologySpreadConstraints spread replicas across hosts (soft) - podDisruptionBudget keeps >=2 replicas up during drains - dedicated cluster-scoped traefik-critical PriorityClass Traefik is stateless here (certs come from cert-manager secrets, no local ACME), so multiple replicas need no coordination.
|
@claude review |
|
Claude finished @timtalbot's task in 3m 21s —— View job PR Review:
|
|
Verified on internal AWS and Azure workloads. |
Motivation
Workload Traefik ingress ran a single
BestEffortreplica. That combination made it both a single point of failure and the first pod evicted under node pressure: when a node saturated, the lone Traefik pod crash-looped/rescheduled and the LoadBalancer briefly had zero backends, taking a workload's entire external edge offline.The control-room Traefik already runs HA with resource requests; the workload path was a straight port that never got the same treatment.
Changes
Hardens both the EKS (
helm_aws.go) and AKS (clusters_azure.go) Traefik paths:traefik_deployment_replicas(mirrors the control-room knob). Defaults to 3 when unset.200m/256Mi, lim1000m/512Mi) move Traefik out ofBestEffortinto Burstable QoS.topologySpreadConstraintsspread replicas across hosts (maxSkew: 1,ScheduleAnyway— soft, so a temporarily single-schedulable cluster still schedules and drains cleanly).podDisruptionBudget(maxUnavailable: 1) keeps ≥2 replicas up during node drains.traefik-criticalPriorityClass (value below the reservedsystem-*range) so ingress pods resist eviction.system-cluster-criticalis admission-restricted tokube-system, so it can't be reused.Traefik is stateless here — certs come from cert-manager K8s secrets, there is no local ACME/
acme.json— so running multiple replicas needs zero coordination.Reviewer notes
traefik_deployment_replicasknob is added to both the AWS (AWSWorkloadClusterComponents) and Azure (AzureWorkloadClusterComponentConfig) component structs, since the two clouds have separate config types.traefik_deployment_replicas: Nundercomponents.Testing
go build ./...,go vet,gofmt— clean.go test ./steps/... ./types/...passes.Rollout (pending — not done in this PR)
3/3ready, pods on distinct nodes, 3 endpoint backends, QoSBurstable, PDB present, edge probe stays green across a rolling pod delete.