Skip to content

Commit

Permalink
fix: endless affinity list when there's a DataPlaneAffinity
Browse files Browse the repository at this point in the history
  • Loading branch information
cjc7373 committed Sep 6, 2024
1 parent 4f74673 commit 5d60cde
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/controller/scheduling/scheduling_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ func BuildSchedulingPolicy4Component(clusterName, compName string, affinity *app
}

func buildSchedulingPolicy(cluster *appsv1alpha1.Cluster, compSpec *appsv1alpha1.ClusterComponentSpec) (*appsv1alpha1.SchedulingPolicy, error) {
schedulingPolicy := cluster.Spec.SchedulingPolicy
// make a copy, or it will affect cluster's spec
schedulingPolicy := cluster.Spec.SchedulingPolicy.DeepCopy()
if compSpec != nil && compSpec.SchedulingPolicy != nil {
schedulingPolicy = compSpec.SchedulingPolicy
}
Expand Down

0 comments on commit 5d60cde

Please sign in to comment.