From 39b184263925a5aa8faa9388b4c9dadcc2001378 Mon Sep 17 00:00:00 2001 From: Oliver Walsh Date: Fri, 15 Nov 2024 18:54:20 +0000 Subject: [PATCH 1/3] Inherit top-level nodeSelector in placement template --- apis/go.mod | 2 +- apis/go.sum | 4 ++-- go.mod | 2 +- go.sum | 4 ++-- pkg/openstack/placement.go | 7 ++++--- 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/apis/go.mod b/apis/go.mod index bc49aec74..fbeeb8b85 100644 --- a/apis/go.mod +++ b/apis/go.mod @@ -25,7 +25,7 @@ require ( github.com/openstack-k8s-operators/octavia-operator/api v0.5.1-0.20241115111947-2336829c2d73 github.com/openstack-k8s-operators/openstack-baremetal-operator/api v0.5.1-0.20241118111717-a1d460a6d81f github.com/openstack-k8s-operators/ovn-operator/api v0.5.1-0.20241118072048-45d5df9ad730 - github.com/openstack-k8s-operators/placement-operator/api v0.5.1-0.20241114101059-9566e1fd30de + github.com/openstack-k8s-operators/placement-operator/api v0.5.1-0.20241119131546-e4c1ba679d22 github.com/openstack-k8s-operators/swift-operator/api v0.5.1-0.20241114094619-107d1aac9458 github.com/openstack-k8s-operators/telemetry-operator/api v0.5.1-0.20241118203716-9550c8740911 github.com/rabbitmq/cluster-operator/v2 v2.11.0 diff --git a/apis/go.sum b/apis/go.sum index 603caef52..230e4a7f0 100644 --- a/apis/go.sum +++ b/apis/go.sum @@ -132,8 +132,8 @@ github.com/openstack-k8s-operators/openstack-baremetal-operator/api v0.5.1-0.202 github.com/openstack-k8s-operators/openstack-baremetal-operator/api v0.5.1-0.20241118111717-a1d460a6d81f/go.mod h1:G9nampuSFs/9i2Ldx3OasU6oehWchwYuhBu1qMWktMg= github.com/openstack-k8s-operators/ovn-operator/api v0.5.1-0.20241118072048-45d5df9ad730 h1:unZ61c7+dUAALmQHRAVuqqmaTU0Ga5QeU53a4VXwtQU= github.com/openstack-k8s-operators/ovn-operator/api v0.5.1-0.20241118072048-45d5df9ad730/go.mod h1:q5nvyCqRoCM9y6s/n8GfrBUzsGJltCEy8C1usKtkeJA= -github.com/openstack-k8s-operators/placement-operator/api v0.5.1-0.20241114101059-9566e1fd30de h1:DPSV/DNXGlevgssV0POKZqRXKels5/Y+xQ8EOtw+eHE= -github.com/openstack-k8s-operators/placement-operator/api v0.5.1-0.20241114101059-9566e1fd30de/go.mod h1:3XfvmllEbmTSFzX44Smpq5Ec5nzNAU+aiMgrYKwiXs4= +github.com/openstack-k8s-operators/placement-operator/api v0.5.1-0.20241119131546-e4c1ba679d22 h1:/53HgWuy6ZeqDVHevrv8dINctLF5/NY94LG+lKtDP08= +github.com/openstack-k8s-operators/placement-operator/api v0.5.1-0.20241119131546-e4c1ba679d22/go.mod h1:3XfvmllEbmTSFzX44Smpq5Ec5nzNAU+aiMgrYKwiXs4= github.com/openstack-k8s-operators/rabbitmq-cluster-operator/v2 v2.6.1-0.20241017142550-a3524acedd49 h1:/7SnnHfGCH/dwuZFNUx54zw4cnwv2w6hjONq16aoowM= github.com/openstack-k8s-operators/rabbitmq-cluster-operator/v2 v2.6.1-0.20241017142550-a3524acedd49/go.mod h1:6Mq2N/KtNFW20L+PQC5qkeK8R8UGadmGBXL8HDY6lcg= github.com/openstack-k8s-operators/swift-operator/api v0.5.1-0.20241114094619-107d1aac9458 h1:jLM1a3sClYUKfWHdZzTZI9RIpJGA+H8XQh321CbO0D0= diff --git a/go.mod b/go.mod index 54d5f2a86..0eebad55e 100644 --- a/go.mod +++ b/go.mod @@ -35,7 +35,7 @@ require ( github.com/openstack-k8s-operators/openstack-baremetal-operator/api v0.5.1-0.20241118111717-a1d460a6d81f github.com/openstack-k8s-operators/openstack-operator/apis v0.0.0-20240531084739-3b4c0451297c github.com/openstack-k8s-operators/ovn-operator/api v0.5.1-0.20241118072048-45d5df9ad730 - github.com/openstack-k8s-operators/placement-operator/api v0.5.1-0.20241114101059-9566e1fd30de + github.com/openstack-k8s-operators/placement-operator/api v0.5.1-0.20241119131546-e4c1ba679d22 github.com/openstack-k8s-operators/swift-operator/api v0.5.1-0.20241114094619-107d1aac9458 github.com/openstack-k8s-operators/telemetry-operator/api v0.5.1-0.20241118203716-9550c8740911 github.com/openstack-k8s-operators/test-operator/api v0.5.1-0.20241118150825-cd41d06be047 diff --git a/go.sum b/go.sum index 42821ec1a..4fad1ac85 100644 --- a/go.sum +++ b/go.sum @@ -144,8 +144,8 @@ github.com/openstack-k8s-operators/openstack-baremetal-operator/api v0.5.1-0.202 github.com/openstack-k8s-operators/openstack-baremetal-operator/api v0.5.1-0.20241118111717-a1d460a6d81f/go.mod h1:G9nampuSFs/9i2Ldx3OasU6oehWchwYuhBu1qMWktMg= github.com/openstack-k8s-operators/ovn-operator/api v0.5.1-0.20241118072048-45d5df9ad730 h1:unZ61c7+dUAALmQHRAVuqqmaTU0Ga5QeU53a4VXwtQU= github.com/openstack-k8s-operators/ovn-operator/api v0.5.1-0.20241118072048-45d5df9ad730/go.mod h1:q5nvyCqRoCM9y6s/n8GfrBUzsGJltCEy8C1usKtkeJA= -github.com/openstack-k8s-operators/placement-operator/api v0.5.1-0.20241114101059-9566e1fd30de h1:DPSV/DNXGlevgssV0POKZqRXKels5/Y+xQ8EOtw+eHE= -github.com/openstack-k8s-operators/placement-operator/api v0.5.1-0.20241114101059-9566e1fd30de/go.mod h1:3XfvmllEbmTSFzX44Smpq5Ec5nzNAU+aiMgrYKwiXs4= +github.com/openstack-k8s-operators/placement-operator/api v0.5.1-0.20241119131546-e4c1ba679d22 h1:/53HgWuy6ZeqDVHevrv8dINctLF5/NY94LG+lKtDP08= +github.com/openstack-k8s-operators/placement-operator/api v0.5.1-0.20241119131546-e4c1ba679d22/go.mod h1:3XfvmllEbmTSFzX44Smpq5Ec5nzNAU+aiMgrYKwiXs4= github.com/openstack-k8s-operators/rabbitmq-cluster-operator/v2 v2.6.1-0.20241017142550-a3524acedd49 h1:/7SnnHfGCH/dwuZFNUx54zw4cnwv2w6hjONq16aoowM= github.com/openstack-k8s-operators/rabbitmq-cluster-operator/v2 v2.6.1-0.20241017142550-a3524acedd49/go.mod h1:6Mq2N/KtNFW20L+PQC5qkeK8R8UGadmGBXL8HDY6lcg= github.com/openstack-k8s-operators/swift-operator/api v0.5.1-0.20241114094619-107d1aac9458 h1:jLM1a3sClYUKfWHdZzTZI9RIpJGA+H8XQh321CbO0D0= diff --git a/pkg/openstack/placement.go b/pkg/openstack/placement.go index db0848fa8..6c6381227 100644 --- a/pkg/openstack/placement.go +++ b/pkg/openstack/placement.go @@ -41,6 +41,10 @@ func ReconcilePlacementAPI(ctx context.Context, instance *corev1beta1.OpenStackC instance.Spec.Placement.Template = &placementv1.PlacementAPISpecCore{} } + if instance.Spec.Placement.Template.NodeSelector == nil { + instance.Spec.Placement.Template.NodeSelector = &instance.Spec.NodeSelector + } + // add selector to service overrides for _, endpointType := range []service.Endpoint{service.EndpointPublic, service.EndpointInternal} { if instance.Spec.Placement.Template.Override.Service == nil { @@ -108,9 +112,6 @@ func ReconcilePlacementAPI(ctx context.Context, instance *corev1beta1.OpenStackC if placementAPI.Spec.Secret == "" { placementAPI.Spec.Secret = instance.Spec.Secret } - if placementAPI.Spec.NodeSelector == nil && instance.Spec.NodeSelector != nil { - placementAPI.Spec.NodeSelector = instance.Spec.NodeSelector - } if placementAPI.Spec.DatabaseInstance == "" { placementAPI.Spec.DatabaseInstance = "openstack" } From 3cb8e4488ffa636b4106d12f6a289b01288ad6b1 Mon Sep 17 00:00:00 2001 From: Oliver Walsh Date: Tue, 19 Nov 2024 17:33:52 +0000 Subject: [PATCH 2/3] Inherit top-level nodeSelector in horizon template --- apis/go.mod | 2 +- apis/go.sum | 4 ++-- go.mod | 2 +- go.sum | 4 ++-- pkg/openstack/horizon.go | 4 ++++ 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/apis/go.mod b/apis/go.mod index fbeeb8b85..1c29104a1 100644 --- a/apis/go.mod +++ b/apis/go.mod @@ -12,7 +12,7 @@ require ( github.com/openstack-k8s-operators/designate-operator/api v0.5.1-0.20241114094900-9ce3c64786da github.com/openstack-k8s-operators/glance-operator/api v0.5.1-0.20241114111414-1fdd7f486264 github.com/openstack-k8s-operators/heat-operator/api v0.5.1-0.20241118124230-6202fa6a0fee - github.com/openstack-k8s-operators/horizon-operator/api v0.5.1-0.20241114094043-66396cca1abf + github.com/openstack-k8s-operators/horizon-operator/api v0.5.1-0.20241119161147-c38568cb3fb0 github.com/openstack-k8s-operators/infra-operator/apis v0.5.1-0.20241118112815-d52a058b34a8 github.com/openstack-k8s-operators/ironic-operator/api v0.5.1-0.20241114211630-5b4dcbed9b37 github.com/openstack-k8s-operators/keystone-operator/api v0.5.1-0.20241114094330-6d9f1d45f991 diff --git a/apis/go.sum b/apis/go.sum index 230e4a7f0..ec78d8153 100644 --- a/apis/go.sum +++ b/apis/go.sum @@ -104,8 +104,8 @@ github.com/openstack-k8s-operators/glance-operator/api v0.5.1-0.20241114111414-1 github.com/openstack-k8s-operators/glance-operator/api v0.5.1-0.20241114111414-1fdd7f486264/go.mod h1:bRqpa/WUQ7D99SAOXEPItxBobRP1oVUo93PWQukChIs= github.com/openstack-k8s-operators/heat-operator/api v0.5.1-0.20241118124230-6202fa6a0fee h1:bQzR5hdF/5KN/HVD73i0vrQSlsdBCg1eOXfKeJtXfTE= github.com/openstack-k8s-operators/heat-operator/api v0.5.1-0.20241118124230-6202fa6a0fee/go.mod h1:PuXjq4bV3/mYo4OAD/4tTon0N7E9YYXZHWiZLeZFVek= -github.com/openstack-k8s-operators/horizon-operator/api v0.5.1-0.20241114094043-66396cca1abf h1:ZNttb7z+8vPXpmqsintXxxNSP1s8PWukND2oLPepJ4w= -github.com/openstack-k8s-operators/horizon-operator/api v0.5.1-0.20241114094043-66396cca1abf/go.mod h1:ezxV+6xd12IRKespGaDlJCUQ301yxrBlQUCEbeYQgSA= +github.com/openstack-k8s-operators/horizon-operator/api v0.5.1-0.20241119161147-c38568cb3fb0 h1:YtC+hqGKx9M8B6fHgA1eFlq1yjEiOWwp1zZqyFtjSbA= +github.com/openstack-k8s-operators/horizon-operator/api v0.5.1-0.20241119161147-c38568cb3fb0/go.mod h1:ezxV+6xd12IRKespGaDlJCUQ301yxrBlQUCEbeYQgSA= github.com/openstack-k8s-operators/infra-operator/apis v0.5.1-0.20241118112815-d52a058b34a8 h1:mmnunGX3tnIT4ErxFjYcKb38VLjnfe9JcIcU9LaW9rE= github.com/openstack-k8s-operators/infra-operator/apis v0.5.1-0.20241118112815-d52a058b34a8/go.mod h1:6x5zgJJBjrOhsTtNALYrM2ecUH92kIoZbZ6w1fKHPfs= github.com/openstack-k8s-operators/ironic-operator/api v0.5.1-0.20241114211630-5b4dcbed9b37 h1:k++YKQetyZqG6t+kWLhVUclgwLRKspCEyxeEWCeDgjM= diff --git a/go.mod b/go.mod index 0eebad55e..e39130a9b 100644 --- a/go.mod +++ b/go.mod @@ -18,7 +18,7 @@ require ( github.com/openstack-k8s-operators/designate-operator/api v0.5.1-0.20241114094900-9ce3c64786da github.com/openstack-k8s-operators/glance-operator/api v0.5.1-0.20241114111414-1fdd7f486264 github.com/openstack-k8s-operators/heat-operator/api v0.5.1-0.20241118124230-6202fa6a0fee - github.com/openstack-k8s-operators/horizon-operator/api v0.5.1-0.20241114094043-66396cca1abf + github.com/openstack-k8s-operators/horizon-operator/api v0.5.1-0.20241119161147-c38568cb3fb0 github.com/openstack-k8s-operators/infra-operator/apis v0.5.1-0.20241118112815-d52a058b34a8 github.com/openstack-k8s-operators/ironic-operator/api v0.5.1-0.20241114211630-5b4dcbed9b37 github.com/openstack-k8s-operators/keystone-operator/api v0.5.1-0.20241114094330-6d9f1d45f991 diff --git a/go.sum b/go.sum index 4fad1ac85..2ac379e50 100644 --- a/go.sum +++ b/go.sum @@ -110,8 +110,8 @@ github.com/openstack-k8s-operators/glance-operator/api v0.5.1-0.20241114111414-1 github.com/openstack-k8s-operators/glance-operator/api v0.5.1-0.20241114111414-1fdd7f486264/go.mod h1:bRqpa/WUQ7D99SAOXEPItxBobRP1oVUo93PWQukChIs= github.com/openstack-k8s-operators/heat-operator/api v0.5.1-0.20241118124230-6202fa6a0fee h1:bQzR5hdF/5KN/HVD73i0vrQSlsdBCg1eOXfKeJtXfTE= github.com/openstack-k8s-operators/heat-operator/api v0.5.1-0.20241118124230-6202fa6a0fee/go.mod h1:PuXjq4bV3/mYo4OAD/4tTon0N7E9YYXZHWiZLeZFVek= -github.com/openstack-k8s-operators/horizon-operator/api v0.5.1-0.20241114094043-66396cca1abf h1:ZNttb7z+8vPXpmqsintXxxNSP1s8PWukND2oLPepJ4w= -github.com/openstack-k8s-operators/horizon-operator/api v0.5.1-0.20241114094043-66396cca1abf/go.mod h1:ezxV+6xd12IRKespGaDlJCUQ301yxrBlQUCEbeYQgSA= +github.com/openstack-k8s-operators/horizon-operator/api v0.5.1-0.20241119161147-c38568cb3fb0 h1:YtC+hqGKx9M8B6fHgA1eFlq1yjEiOWwp1zZqyFtjSbA= +github.com/openstack-k8s-operators/horizon-operator/api v0.5.1-0.20241119161147-c38568cb3fb0/go.mod h1:ezxV+6xd12IRKespGaDlJCUQ301yxrBlQUCEbeYQgSA= github.com/openstack-k8s-operators/infra-operator/apis v0.5.1-0.20241118112815-d52a058b34a8 h1:mmnunGX3tnIT4ErxFjYcKb38VLjnfe9JcIcU9LaW9rE= github.com/openstack-k8s-operators/infra-operator/apis v0.5.1-0.20241118112815-d52a058b34a8/go.mod h1:6x5zgJJBjrOhsTtNALYrM2ecUH92kIoZbZ6w1fKHPfs= github.com/openstack-k8s-operators/ironic-operator/api v0.5.1-0.20241114211630-5b4dcbed9b37 h1:k++YKQetyZqG6t+kWLhVUclgwLRKspCEyxeEWCeDgjM= diff --git a/pkg/openstack/horizon.go b/pkg/openstack/horizon.go index ff0b288e5..0a433254d 100644 --- a/pkg/openstack/horizon.go +++ b/pkg/openstack/horizon.go @@ -50,6 +50,10 @@ func ReconcileHorizon(ctx context.Context, instance *corev1beta1.OpenStackContro instance.Spec.Horizon.Template = &horizonv1.HorizonSpecCore{} } + if instance.Spec.Horizon.Template.NodeSelector == nil { + instance.Spec.Horizon.Template.NodeSelector = &instance.Spec.NodeSelector + } + // add selector to service overrides serviceOverrides := map[service.Endpoint]service.RoutedOverrideSpec{} if instance.Spec.Horizon.Template.Override.Service != nil { From ef1043962d9185f48cb31b012801315eabe7473d Mon Sep 17 00:00:00 2001 From: Oliver Walsh Date: Tue, 19 Nov 2024 17:38:14 +0000 Subject: [PATCH 3/3] Inherit top-level nodeSelector in keystone template --- apis/go.mod | 2 +- apis/go.sum | 4 ++-- go.mod | 2 +- go.sum | 4 ++-- pkg/openstack/keystone.go | 7 ++++--- 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/apis/go.mod b/apis/go.mod index 1c29104a1..5b9740bfb 100644 --- a/apis/go.mod +++ b/apis/go.mod @@ -15,7 +15,7 @@ require ( github.com/openstack-k8s-operators/horizon-operator/api v0.5.1-0.20241119161147-c38568cb3fb0 github.com/openstack-k8s-operators/infra-operator/apis v0.5.1-0.20241118112815-d52a058b34a8 github.com/openstack-k8s-operators/ironic-operator/api v0.5.1-0.20241114211630-5b4dcbed9b37 - github.com/openstack-k8s-operators/keystone-operator/api v0.5.1-0.20241114094330-6d9f1d45f991 + github.com/openstack-k8s-operators/keystone-operator/api v0.5.1-0.20241119162247-18b741090348 github.com/openstack-k8s-operators/lib-common/modules/common v0.5.1-0.20241114091812-6dc9fd0961dc github.com/openstack-k8s-operators/lib-common/modules/storage v0.5.1-0.20241114091812-6dc9fd0961dc github.com/openstack-k8s-operators/manila-operator/api v0.5.1-0.20241117150431-21b7f58d9ddf diff --git a/apis/go.sum b/apis/go.sum index ec78d8153..65af26406 100644 --- a/apis/go.sum +++ b/apis/go.sum @@ -110,8 +110,8 @@ github.com/openstack-k8s-operators/infra-operator/apis v0.5.1-0.20241118112815-d github.com/openstack-k8s-operators/infra-operator/apis v0.5.1-0.20241118112815-d52a058b34a8/go.mod h1:6x5zgJJBjrOhsTtNALYrM2ecUH92kIoZbZ6w1fKHPfs= github.com/openstack-k8s-operators/ironic-operator/api v0.5.1-0.20241114211630-5b4dcbed9b37 h1:k++YKQetyZqG6t+kWLhVUclgwLRKspCEyxeEWCeDgjM= github.com/openstack-k8s-operators/ironic-operator/api v0.5.1-0.20241114211630-5b4dcbed9b37/go.mod h1:nKeZBXFCwbYxTpIW9mPs/SK+4cODkEZgs+yOytvafBo= -github.com/openstack-k8s-operators/keystone-operator/api v0.5.1-0.20241114094330-6d9f1d45f991 h1:NnE6zREsZ2bYKNdt5Ds8tNv5YOtvUpNFwy7sjzoqoKw= -github.com/openstack-k8s-operators/keystone-operator/api v0.5.1-0.20241114094330-6d9f1d45f991/go.mod h1:AZhHY6dZzGyG9iVOf1poD7pTS9c7ZG/f99Fg+GdFVEk= +github.com/openstack-k8s-operators/keystone-operator/api v0.5.1-0.20241119162247-18b741090348 h1:mJeXL6JpNWe7d8wA8UZ1EI5T70f8HIgE2ecNjfPFIq4= +github.com/openstack-k8s-operators/keystone-operator/api v0.5.1-0.20241119162247-18b741090348/go.mod h1:AZhHY6dZzGyG9iVOf1poD7pTS9c7ZG/f99Fg+GdFVEk= github.com/openstack-k8s-operators/lib-common/modules/common v0.5.1-0.20241114091812-6dc9fd0961dc h1:Ufa/q/nC9wmKblvsc0kJppsXHOJoY4fbUamb3ItWCOk= github.com/openstack-k8s-operators/lib-common/modules/common v0.5.1-0.20241114091812-6dc9fd0961dc/go.mod h1:YpNTuJhDWhbXM50O3qBkhO7M+OOyRmWkNVmJ4y3cyFs= github.com/openstack-k8s-operators/lib-common/modules/openstack v0.5.1-0.20241114091812-6dc9fd0961dc h1:q68lNZwCrKgLgcakrDu5VtpiWuC1pzQZKlb1M33EPMI= diff --git a/go.mod b/go.mod index e39130a9b..844659c47 100644 --- a/go.mod +++ b/go.mod @@ -21,7 +21,7 @@ require ( github.com/openstack-k8s-operators/horizon-operator/api v0.5.1-0.20241119161147-c38568cb3fb0 github.com/openstack-k8s-operators/infra-operator/apis v0.5.1-0.20241118112815-d52a058b34a8 github.com/openstack-k8s-operators/ironic-operator/api v0.5.1-0.20241114211630-5b4dcbed9b37 - github.com/openstack-k8s-operators/keystone-operator/api v0.5.1-0.20241114094330-6d9f1d45f991 + github.com/openstack-k8s-operators/keystone-operator/api v0.5.1-0.20241119162247-18b741090348 github.com/openstack-k8s-operators/lib-common/modules/ansible v0.5.0 github.com/openstack-k8s-operators/lib-common/modules/certmanager v0.5.1-0.20241114091812-6dc9fd0961dc github.com/openstack-k8s-operators/lib-common/modules/common v0.5.1-0.20241114091812-6dc9fd0961dc diff --git a/go.sum b/go.sum index 2ac379e50..6b68187e0 100644 --- a/go.sum +++ b/go.sum @@ -116,8 +116,8 @@ github.com/openstack-k8s-operators/infra-operator/apis v0.5.1-0.20241118112815-d github.com/openstack-k8s-operators/infra-operator/apis v0.5.1-0.20241118112815-d52a058b34a8/go.mod h1:6x5zgJJBjrOhsTtNALYrM2ecUH92kIoZbZ6w1fKHPfs= github.com/openstack-k8s-operators/ironic-operator/api v0.5.1-0.20241114211630-5b4dcbed9b37 h1:k++YKQetyZqG6t+kWLhVUclgwLRKspCEyxeEWCeDgjM= github.com/openstack-k8s-operators/ironic-operator/api v0.5.1-0.20241114211630-5b4dcbed9b37/go.mod h1:nKeZBXFCwbYxTpIW9mPs/SK+4cODkEZgs+yOytvafBo= -github.com/openstack-k8s-operators/keystone-operator/api v0.5.1-0.20241114094330-6d9f1d45f991 h1:NnE6zREsZ2bYKNdt5Ds8tNv5YOtvUpNFwy7sjzoqoKw= -github.com/openstack-k8s-operators/keystone-operator/api v0.5.1-0.20241114094330-6d9f1d45f991/go.mod h1:AZhHY6dZzGyG9iVOf1poD7pTS9c7ZG/f99Fg+GdFVEk= +github.com/openstack-k8s-operators/keystone-operator/api v0.5.1-0.20241119162247-18b741090348 h1:mJeXL6JpNWe7d8wA8UZ1EI5T70f8HIgE2ecNjfPFIq4= +github.com/openstack-k8s-operators/keystone-operator/api v0.5.1-0.20241119162247-18b741090348/go.mod h1:AZhHY6dZzGyG9iVOf1poD7pTS9c7ZG/f99Fg+GdFVEk= github.com/openstack-k8s-operators/lib-common/modules/ansible v0.5.0 h1:M6tou1UD+en6fcZtV64RPsDVdHH5up6oqtENDU8dRyE= github.com/openstack-k8s-operators/lib-common/modules/ansible v0.5.0/go.mod h1:FxA/2ChDnVKgbZAyiiRLDGZB7WMcrHlOMBZYUQGgRf0= github.com/openstack-k8s-operators/lib-common/modules/certmanager v0.5.1-0.20241114091812-6dc9fd0961dc h1:HrpfpMSk8mnb/fC6TswLxL0RK7u6dw9LbXsFdH+1DCo= diff --git a/pkg/openstack/keystone.go b/pkg/openstack/keystone.go index b74223e36..8b10b103f 100644 --- a/pkg/openstack/keystone.go +++ b/pkg/openstack/keystone.go @@ -103,6 +103,10 @@ func ReconcileKeystoneAPI(ctx context.Context, instance *corev1beta1.OpenStackCo instance.Spec.Keystone.Template.TLS.API.Internal.SecretName = endpointDetails.GetEndptCertSecret(service.EndpointInternal) } + if instance.Spec.Keystone.Template.NodeSelector == nil { + instance.Spec.Keystone.Template.NodeSelector = &instance.Spec.NodeSelector + } + Log.Info("Reconciling KeystoneAPI", "KeystoneAPI.Namespace", instance.Namespace, "KeystoneAPI.Name", "keystone") op, err := controllerutil.CreateOrPatch(ctx, helper.GetClient(), keystoneAPI, func() error { instance.Spec.Keystone.Template.DeepCopyInto(&keystoneAPI.Spec.KeystoneAPISpecCore) @@ -111,9 +115,6 @@ func ReconcileKeystoneAPI(ctx context.Context, instance *corev1beta1.OpenStackCo if keystoneAPI.Spec.Secret == "" { keystoneAPI.Spec.Secret = instance.Spec.Secret } - if keystoneAPI.Spec.NodeSelector == nil && instance.Spec.NodeSelector != nil { - keystoneAPI.Spec.NodeSelector = instance.Spec.NodeSelector - } if keystoneAPI.Spec.DatabaseInstance == "" { //keystoneAPI.Spec.DatabaseInstance = instance.Name // name of MariaDB we create here keystoneAPI.Spec.DatabaseInstance = "openstack" //FIXME: see above