diff --git a/apis/bases/core.openstack.org_openstackcontrolplanes.yaml b/apis/bases/core.openstack.org_openstackcontrolplanes.yaml index 539631006..37712ac54 100644 --- a/apis/bases/core.openstack.org_openstackcontrolplanes.yaml +++ b/apis/bases/core.openstack.org_openstackcontrolplanes.yaml @@ -7314,6 +7314,10 @@ spec: type: boolean template: properties: + apiTimeout: + default: 120 + minimum: 1 + type: integer corePlugin: default: ml2 type: string diff --git a/apis/core/v1beta1/openstackcontrolplane_webhook.go b/apis/core/v1beta1/openstackcontrolplane_webhook.go index e68a7fb11..da2db86c8 100644 --- a/apis/core/v1beta1/openstackcontrolplane_webhook.go +++ b/apis/core/v1beta1/openstackcontrolplane_webhook.go @@ -802,7 +802,8 @@ func (r *OpenStackControlPlane) DefaultServices() { r.Spec.Neutron.Template = &neutronv1.NeutronAPISpecCore{} } r.Spec.Neutron.Template.Default() - setOverrideSpec(&r.Spec.Neutron.APIOverride.Route, r.Spec.Neutron.Template.GetDefaultRouteAnnotations()) + initializeOverrideSpec(&r.Spec.Neutron.APIOverride.Route, true) + r.Spec.Neutron.Template.SetDefaultRouteAnnotations(r.Spec.Neutron.APIOverride.Route.Annotations) } // Nova diff --git a/apis/go.mod b/apis/go.mod index 0af5884a0..46ae2a8d7 100644 --- a/apis/go.mod +++ b/apis/go.mod @@ -20,7 +20,7 @@ require ( github.com/openstack-k8s-operators/lib-common/modules/storage v0.5.1-0.20241104140916-71a0e9d9766d github.com/openstack-k8s-operators/manila-operator/api v0.5.1-0.20241030155040-53b0e879c1b9 github.com/openstack-k8s-operators/mariadb-operator/api v0.5.1-0.20241030161252-c847254d0ef7 - github.com/openstack-k8s-operators/neutron-operator/api v0.5.1-0.20241030084711-739df01d36eb + github.com/openstack-k8s-operators/neutron-operator/api v0.5.1-0.20241106150939-8108068a452f github.com/openstack-k8s-operators/nova-operator/api v0.5.1-0.20241104074041-7dbaa3fa5388 github.com/openstack-k8s-operators/octavia-operator/api v0.5.1-0.20241031152308-76ee47d5a779 github.com/openstack-k8s-operators/openstack-baremetal-operator/api v0.5.1-0.20241030042838-d69076bd6a9d diff --git a/apis/go.sum b/apis/go.sum index 514883995..5267a45cc 100644 --- a/apis/go.sum +++ b/apis/go.sum @@ -122,8 +122,8 @@ github.com/openstack-k8s-operators/manila-operator/api v0.5.1-0.20241030155040-5 github.com/openstack-k8s-operators/manila-operator/api v0.5.1-0.20241030155040-53b0e879c1b9/go.mod h1:+UlfJ++3erHFkwd0dwTiN3dz5b1Hh3cMnkc1G1jYTy0= github.com/openstack-k8s-operators/mariadb-operator/api v0.5.1-0.20241030161252-c847254d0ef7 h1:C8U9D6ieJLrLAd8qf7oBVDs42scDAMSsuf4EyaJ7bU8= github.com/openstack-k8s-operators/mariadb-operator/api v0.5.1-0.20241030161252-c847254d0ef7/go.mod h1:348EPtAdpE2LxHAH4bHdCMNP7HyX6DevwEsF9DQ0S2k= -github.com/openstack-k8s-operators/neutron-operator/api v0.5.1-0.20241030084711-739df01d36eb h1:Cp/nSCEjN4sAA+oP1hFu7dRdM9lP3i19bytBm8ljHHQ= -github.com/openstack-k8s-operators/neutron-operator/api v0.5.1-0.20241030084711-739df01d36eb/go.mod h1:fjxrxNHWe9Q7UytFOAD7HtK20wlR+30vRBXLw+yr8Ug= +github.com/openstack-k8s-operators/neutron-operator/api v0.5.1-0.20241106150939-8108068a452f h1:gujVUgZi1dtIInqps6NHl12H/G+MSGgzm5F1RIzXjhA= +github.com/openstack-k8s-operators/neutron-operator/api v0.5.1-0.20241106150939-8108068a452f/go.mod h1:LFsG8CyB7La/55IFsa/TGK+LxJ3PrfgLv77FM9xiGOY= github.com/openstack-k8s-operators/nova-operator/api v0.5.1-0.20241104074041-7dbaa3fa5388 h1:ZYoH3yaAs/xtw1IryLaUeaJ4usS9yvJ7lZPx9wAbgYc= github.com/openstack-k8s-operators/nova-operator/api v0.5.1-0.20241104074041-7dbaa3fa5388/go.mod h1:lfMDfS0ROyH3mGnPhfdn2zus1wbhqYDIWN2tXYnnWAQ= github.com/openstack-k8s-operators/octavia-operator/api v0.5.1-0.20241031152308-76ee47d5a779 h1:sUBugxtcUDyg4iFRyF8N+LE3nXT1bazLeAfFVxpp2Yo= diff --git a/config/crd/bases/core.openstack.org_openstackcontrolplanes.yaml b/config/crd/bases/core.openstack.org_openstackcontrolplanes.yaml index 539631006..37712ac54 100644 --- a/config/crd/bases/core.openstack.org_openstackcontrolplanes.yaml +++ b/config/crd/bases/core.openstack.org_openstackcontrolplanes.yaml @@ -7314,6 +7314,10 @@ spec: type: boolean template: properties: + apiTimeout: + default: 120 + minimum: 1 + type: integer corePlugin: default: ml2 type: string diff --git a/go.mod b/go.mod index 7134c6800..2a75bb2d5 100644 --- a/go.mod +++ b/go.mod @@ -28,7 +28,7 @@ require ( github.com/openstack-k8s-operators/lib-common/modules/test v0.5.1-0.20241025164019-30baa23bf6f1 github.com/openstack-k8s-operators/manila-operator/api v0.5.1-0.20241030155040-53b0e879c1b9 github.com/openstack-k8s-operators/mariadb-operator/api v0.5.1-0.20241030161252-c847254d0ef7 - github.com/openstack-k8s-operators/neutron-operator/api v0.5.1-0.20241030084711-739df01d36eb + github.com/openstack-k8s-operators/neutron-operator/api v0.5.1-0.20241106150939-8108068a452f github.com/openstack-k8s-operators/nova-operator/api v0.5.1-0.20241104074041-7dbaa3fa5388 github.com/openstack-k8s-operators/octavia-operator/api v0.5.1-0.20241031152308-76ee47d5a779 github.com/openstack-k8s-operators/openstack-baremetal-operator/api v0.5.1-0.20241030042838-d69076bd6a9d diff --git a/go.sum b/go.sum index a4981e2e4..5b0c4df97 100644 --- a/go.sum +++ b/go.sum @@ -134,8 +134,8 @@ github.com/openstack-k8s-operators/manila-operator/api v0.5.1-0.20241030155040-5 github.com/openstack-k8s-operators/manila-operator/api v0.5.1-0.20241030155040-53b0e879c1b9/go.mod h1:+UlfJ++3erHFkwd0dwTiN3dz5b1Hh3cMnkc1G1jYTy0= github.com/openstack-k8s-operators/mariadb-operator/api v0.5.1-0.20241030161252-c847254d0ef7 h1:C8U9D6ieJLrLAd8qf7oBVDs42scDAMSsuf4EyaJ7bU8= github.com/openstack-k8s-operators/mariadb-operator/api v0.5.1-0.20241030161252-c847254d0ef7/go.mod h1:348EPtAdpE2LxHAH4bHdCMNP7HyX6DevwEsF9DQ0S2k= -github.com/openstack-k8s-operators/neutron-operator/api v0.5.1-0.20241030084711-739df01d36eb h1:Cp/nSCEjN4sAA+oP1hFu7dRdM9lP3i19bytBm8ljHHQ= -github.com/openstack-k8s-operators/neutron-operator/api v0.5.1-0.20241030084711-739df01d36eb/go.mod h1:fjxrxNHWe9Q7UytFOAD7HtK20wlR+30vRBXLw+yr8Ug= +github.com/openstack-k8s-operators/neutron-operator/api v0.5.1-0.20241106150939-8108068a452f h1:gujVUgZi1dtIInqps6NHl12H/G+MSGgzm5F1RIzXjhA= +github.com/openstack-k8s-operators/neutron-operator/api v0.5.1-0.20241106150939-8108068a452f/go.mod h1:LFsG8CyB7La/55IFsa/TGK+LxJ3PrfgLv77FM9xiGOY= github.com/openstack-k8s-operators/nova-operator/api v0.5.1-0.20241104074041-7dbaa3fa5388 h1:ZYoH3yaAs/xtw1IryLaUeaJ4usS9yvJ7lZPx9wAbgYc= github.com/openstack-k8s-operators/nova-operator/api v0.5.1-0.20241104074041-7dbaa3fa5388/go.mod h1:lfMDfS0ROyH3mGnPhfdn2zus1wbhqYDIWN2tXYnnWAQ= github.com/openstack-k8s-operators/octavia-operator/api v0.5.1-0.20241031152308-76ee47d5a779 h1:sUBugxtcUDyg4iFRyF8N+LE3nXT1bazLeAfFVxpp2Yo= diff --git a/tests/functional/ctlplane/openstackoperator_controller_test.go b/tests/functional/ctlplane/openstackoperator_controller_test.go index 2af202508..ddcf8853e 100644 --- a/tests/functional/ctlplane/openstackoperator_controller_test.go +++ b/tests/functional/ctlplane/openstackoperator_controller_test.go @@ -565,6 +565,7 @@ var _ = Describe("OpenStackOperator controller", func() { Expect(OSCtlplane).Should(Not(BeNil())) Expect(OSCtlplane.Spec.Neutron.APIOverride.Route).Should(Not(BeNil())) Expect(OSCtlplane.Spec.Neutron.APIOverride.Route.Annotations).Should(HaveKeyWithValue("haproxy.router.openshift.io/timeout", "120s")) + Expect(OSCtlplane.Spec.Neutron.APIOverride.Route.Annotations).Should(HaveKeyWithValue("api.neutron.openstack.org/timeout", "120s")) Expect(OSCtlplane.Spec.Cinder.APIOverride.Route).Should(Not(BeNil())) Expect(OSCtlplane.Spec.Cinder.APIOverride.Route.Annotations).Should(HaveKeyWithValue("haproxy.router.openshift.io/timeout", "60s")) Expect(OSCtlplane.Spec.Cinder.APIOverride.Route.Annotations).Should(HaveKeyWithValue("api.cinder.openstack.org/timeout", "60s")) @@ -849,6 +850,7 @@ var _ = Describe("OpenStackOperator controller", func() { Expect(OSCtlplane).Should(Not(BeNil())) Expect(OSCtlplane.Spec.Neutron.APIOverride.Route).Should(Not(BeNil())) Expect(OSCtlplane.Spec.Neutron.APIOverride.Route.Annotations).Should(HaveKeyWithValue("haproxy.router.openshift.io/timeout", "120s")) + Expect(OSCtlplane.Spec.Neutron.APIOverride.Route.Annotations).Should(HaveKeyWithValue("api.neutron.openstack.org/timeout", "120s")) Expect(OSCtlplane.Spec.Heat.APIOverride.Route).Should(Not(BeNil())) Expect(OSCtlplane.Spec.Heat.APIOverride.Route.Annotations).Should(HaveKeyWithValue("haproxy.router.openshift.io/timeout", "600s")) Expect(OSCtlplane.Spec.Heat.APIOverride.Route.Annotations).Should(HaveKeyWithValue("api.heat.openstack.org/timeout", "600s"))