1
0
mirror of https://github.com/kubernetes-sigs/descheduler.git synced 2026-01-26 05:14:13 +01:00

removepodsviolatingtopologyspreadconstraint: implement explicit constraints

This commit is contained in:
Amir Alavi
2023-06-03 18:58:18 -04:00
parent 5f0edb5f93
commit 7f2f6f2b16
14 changed files with 254 additions and 27 deletions

View File

@@ -22,6 +22,7 @@ limitations under the License.
package removepodsviolatingtopologyspreadconstraint
import (
corev1 "k8s.io/api/core/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
api "sigs.k8s.io/descheduler/pkg/api"
@@ -41,6 +42,11 @@ func (in *RemovePodsViolatingTopologySpreadConstraintArgs) DeepCopyInto(out *Rem
*out = new(v1.LabelSelector)
(*in).DeepCopyInto(*out)
}
if in.Constraints != nil {
in, out := &in.Constraints, &out.Constraints
*out = make([]corev1.UnsatisfiableConstraintAction, len(*in))
copy(*out, *in)
}
if in.TopologyBalanceNodeFit != nil {
in, out := &in.TopologyBalanceNodeFit, &out.TopologyBalanceNodeFit
*out = new(bool)