Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: yaroslavborbat <[email protected]>
  • Loading branch information
yaroslavborbat committed Jan 16, 2025
1 parent a066a9d commit 25832fe
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions images/virtualization-artifact/pkg/controller/kvbuilder/kvvm.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,14 @@ func (b *KVVM) SetNodeSelector(vmNodeSelector, classNodeSelector map[string]stri
}

func (b *KVVM) SetTolerations(vmTolerations, classTolerations []corev1.Toleration) {
b.Resource.Spec.Template.Spec.Tolerations = append(b.Resource.Spec.Template.Spec.Tolerations, classTolerations...)
b.Resource.Spec.Template.Spec.Tolerations = append(b.Resource.Spec.Template.Spec.Tolerations, vmTolerations...)
tolerations := make([]corev1.Toleration, 0, len(vmTolerations)+len(classTolerations))
tolerations = append(tolerations, vmTolerations...)
tolerations = append(tolerations, classTolerations...)
if len(tolerations) == 0 {
b.Resource.Spec.Template.Spec.Tolerations = nil
return
}
b.Resource.Spec.Template.Spec.Tolerations = tolerations
}

func (b *KVVM) SetPriorityClassName(priorityClassName string) {
Expand Down

0 comments on commit 25832fe

Please sign in to comment.