You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add an optional spec.topologySpreadConstraints to VectorAggregator and ClusterVectorAggregator, passed through to the aggregator pod template.
Motivation
Aggregator replicas need to spread across availability zones, for failure isolation
and to keep cross-AZ traffic down. spec.affinity is already passed through, but pod
anti-affinity cannot express this:
preferredDuringSchedulingIgnoredDuringExecution is a soft score. Under a
provisioner like Karpenter, which provisions nodes to fit pending pods, it does not
compel a second node, so replicas end up packed onto one node in one zone.
Summary
Add an optional
spec.topologySpreadConstraintstoVectorAggregatorandClusterVectorAggregator, passed through to the aggregator pod template.Motivation
Aggregator replicas need to spread across availability zones, for failure isolation
and to keep cross-AZ traffic down.
spec.affinityis already passed through, but podanti-affinity cannot express this:
preferredDuringSchedulingIgnoredDuringExecutionis a soft score. Under aprovisioner like Karpenter, which provisions nodes to fit pending pods, it does not
compel a second node, so replicas end up packed onto one node in one zone.
requiredDuringSchedulingIgnoredDuringExecutionhas no count parameter, so it capsat one pod per zone. Any replica count above the zone count leaves the extra pods
Pending, which rules it out for HPA-driven scaling (feat: Add HPA support for VectorAggregator and ClusterVectorAggregator CRDs #225).
topologySpreadConstraintswithmaxSkewandwhenUnsatisfiable: ScheduleAnywayisthe only way to express "spread evenly, but never block scheduling".
Proposed behavior
topologySpreadConstraints []corev1.TopologySpreadConstraintonthe aggregator common spec.
affinity,tolerationsand
schedulerName.aggregatorPodTemplateSpec().Scope / implementation notes
api/v1alpha1/vector_common_types.go: add the field.internal/vector/aggregator/deployment.go: set it inaggregatorPodTemplateSpec().internal/vector/aggregator/event_collector.go: same, for consistency.Happy to open a PR if the approach looks right.