@@ -106,11 +106,16 @@ func ReconcileManila(ctx context.Context, instance *corev1beta1.OpenStackControl
106106 instance .Spec .Manila .Template .ManilaAPI .TLS .API .Internal .SecretName = endpointDetails .GetEndptCertSecret (service .EndpointInternal )
107107 }
108108
109+ if instance .Spec .Manila .Template .NodeSelector == nil {
110+ instance .Spec .Manila .Template .NodeSelector = & instance .Spec .NodeSelector
111+ }
112+
109113 Log .Info ("Reconciling Manila" , "Manila.Namespace" , instance .Namespace , "Manila.Name" , "manila" )
110114 op , err := controllerutil .CreateOrPatch (ctx , helper .GetClient (), manila , func () error {
111115 instance .Spec .Manila .Template .ManilaSpecBase .DeepCopyInto (& manila .Spec .ManilaSpecBase )
112116 instance .Spec .Manila .Template .ManilaAPI .DeepCopyInto (& manila .Spec .ManilaAPI .ManilaAPITemplateCore )
113117 instance .Spec .Manila .Template .ManilaScheduler .DeepCopyInto (& manila .Spec .ManilaScheduler .ManilaSchedulerTemplateCore )
118+ manila .Spec .NodeSelector = instance .Spec .Manila .Template .NodeSelector
114119
115120 manila .Spec .ManilaAPI .ContainerImage = * version .Status .ContainerImages .ManilaAPIImage
116121 manila .Spec .ManilaScheduler .ContainerImage = * version .Status .ContainerImages .ManilaSchedulerImage
@@ -137,9 +142,6 @@ func ReconcileManila(ctx context.Context, instance *corev1beta1.OpenStackControl
137142 if manila .Spec .Secret == "" {
138143 manila .Spec .Secret = instance .Spec .Secret
139144 }
140- if manila .Spec .NodeSelector == nil && instance .Spec .NodeSelector != nil {
141- manila .Spec .NodeSelector = instance .Spec .NodeSelector
142- }
143145 if manila .Spec .DatabaseInstance == "" {
144146 //manila.Spec.DatabaseInstance = instance.Name // name of MariaDB we create here
145147 manila .Spec .DatabaseInstance = "openstack" //FIXME: see above
0 commit comments