From 356e148045eb2c1ae102a43f1f9c043d757fcc82 Mon Sep 17 00:00:00 2001 From: Jingyuan Liang Date: Wed, 19 Mar 2025 15:46:30 +0000 Subject: [PATCH] fix: comment on preferred PodAntiAffinity --- pkg/apis/core/types.go | 4 ++-- staging/src/k8s.io/api/core/v1/types.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/apis/core/types.go b/pkg/apis/core/types.go index 3f825067ddc..f116511aee4 100644 --- a/pkg/apis/core/types.go +++ b/pkg/apis/core/types.go @@ -3213,8 +3213,8 @@ type PodAntiAffinity struct { // most preferred is the one with the greatest sum of weights, i.e. // for each node that meets all of the scheduling requirements (resource // request, requiredDuringScheduling anti-affinity expressions, etc.), - // compute a sum by iterating through the elements of this field and adding - // "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the + // compute a sum by iterating through the elements of this field and subtracting + // "weight" from the sum if the node has pods which matches the corresponding podAffinityTerm; the // node(s) with the highest sum are the most preferred. // +optional PreferredDuringSchedulingIgnoredDuringExecution []WeightedPodAffinityTerm diff --git a/staging/src/k8s.io/api/core/v1/types.go b/staging/src/k8s.io/api/core/v1/types.go index f0736d11f44..53e7e99baec 100644 --- a/staging/src/k8s.io/api/core/v1/types.go +++ b/staging/src/k8s.io/api/core/v1/types.go @@ -3597,8 +3597,8 @@ type PodAntiAffinity struct { // most preferred is the one with the greatest sum of weights, i.e. // for each node that meets all of the scheduling requirements (resource // request, requiredDuringScheduling anti-affinity expressions, etc.), - // compute a sum by iterating through the elements of this field and adding - // "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the + // compute a sum by iterating through the elements of this field and subtracting + // "weight" from the sum if the node has pods which matches the corresponding podAffinityTerm; the // node(s) with the highest sum are the most preferred. // +optional // +listType=atomic