diff --git a/pkg/placement/dbsync.go b/pkg/placement/dbsync.go index 8de09fa..667b1fc 100644 --- a/pkg/placement/dbsync.go +++ b/pkg/placement/dbsync.go @@ -83,7 +83,7 @@ func DbSyncJob( }, } - if instance.Spec.NodeSelector != nil && len(*instance.Spec.NodeSelector) > 0 { + if instance.Spec.NodeSelector != nil { job.Spec.Template.Spec.NodeSelector = *instance.Spec.NodeSelector } diff --git a/pkg/placement/deployment.go b/pkg/placement/deployment.go index e839b56..179b001 100644 --- a/pkg/placement/deployment.go +++ b/pkg/placement/deployment.go @@ -174,7 +174,7 @@ func Deployment( }, corev1.LabelHostname, ) - if instance.Spec.NodeSelector != nil && len(*instance.Spec.NodeSelector) > 0 { + if instance.Spec.NodeSelector != nil { deployment.Spec.Template.Spec.NodeSelector = *instance.Spec.NodeSelector }