Skip to content

Commit

Permalink
Inherit top-level nodeSelector in horizon template
Browse files Browse the repository at this point in the history
  • Loading branch information
olliewalsh committed Nov 19, 2024
1 parent 55fedef commit 4d0fdea
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion apis/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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.20241112060409-5e91380094e6
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.20241114093759-47b4c2e6639e
github.com/openstack-k8s-operators/ironic-operator/api v0.5.1-0.20241114095146-fcfd1c985034
github.com/openstack-k8s-operators/keystone-operator/api v0.5.1-0.20241114094330-6d9f1d45f991
Expand Down
4 changes: 2 additions & 2 deletions apis/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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.20241112060409-5e91380094e6 h1:vxFlYgZD6jXGdGumhzyKRVgPwzBd4YxBOU0YrF9fxr8=
github.com/openstack-k8s-operators/heat-operator/api v0.5.1-0.20241112060409-5e91380094e6/go.mod h1:+CUPkPcR8P4wpTlURPPsE9AD1uNYvvk0JsoIn5JLADM=
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.20241114093759-47b4c2e6639e h1:IzKbAe3kIWXi9ZyBtMLOrQY5UTytf7RrA+bFQCdoKDc=
github.com/openstack-k8s-operators/infra-operator/apis v0.5.1-0.20241114093759-47b4c2e6639e/go.mod h1:6x5zgJJBjrOhsTtNALYrM2ecUH92kIoZbZ6w1fKHPfs=
github.com/openstack-k8s-operators/ironic-operator/api v0.5.1-0.20241114095146-fcfd1c985034 h1:PtGZ55Oq58Ivt0dBJ0YNybcBe4Pwxc8jT+NbI3QIhnE=
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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.20241112060409-5e91380094e6
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.20241114093759-47b4c2e6639e
github.com/openstack-k8s-operators/ironic-operator/api v0.5.1-0.20241114095146-fcfd1c985034
github.com/openstack-k8s-operators/keystone-operator/api v0.5.1-0.20241114094330-6d9f1d45f991
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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.20241112060409-5e91380094e6 h1:vxFlYgZD6jXGdGumhzyKRVgPwzBd4YxBOU0YrF9fxr8=
github.com/openstack-k8s-operators/heat-operator/api v0.5.1-0.20241112060409-5e91380094e6/go.mod h1:+CUPkPcR8P4wpTlURPPsE9AD1uNYvvk0JsoIn5JLADM=
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.20241114093759-47b4c2e6639e h1:IzKbAe3kIWXi9ZyBtMLOrQY5UTytf7RrA+bFQCdoKDc=
github.com/openstack-k8s-operators/infra-operator/apis v0.5.1-0.20241114093759-47b4c2e6639e/go.mod h1:6x5zgJJBjrOhsTtNALYrM2ecUH92kIoZbZ6w1fKHPfs=
github.com/openstack-k8s-operators/ironic-operator/api v0.5.1-0.20241114095146-fcfd1c985034 h1:PtGZ55Oq58Ivt0dBJ0YNybcBe4Pwxc8jT+NbI3QIhnE=
Expand Down
4 changes: 4 additions & 0 deletions pkg/openstack/horizon.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 4d0fdea

Please sign in to comment.