Skip to content

Commit

Permalink
Merge pull request #1172 from karelyatin/OSPRH-10843
Browse files Browse the repository at this point in the history
Set Neutron route annotations
  • Loading branch information
openshift-merge-bot[bot] authored Nov 6, 2024
2 parents b977d2e + 7eb0887 commit 5637f8d
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 7 deletions.
4 changes: 4 additions & 0 deletions apis/bases/core.openstack.org_openstackcontrolplanes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7314,6 +7314,10 @@ spec:
type: boolean
template:
properties:
apiTimeout:
default: 120
minimum: 1
type: integer
corePlugin:
default: ml2
type: string
Expand Down
3 changes: 2 additions & 1 deletion apis/core/v1beta1/openstackcontrolplane_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion apis/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions apis/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7314,6 +7314,10 @@ spec:
type: boolean
template:
properties:
apiTimeout:
default: 120
minimum: 1
type: integer
corePlugin:
default: ml2
type: string
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down Expand Up @@ -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"))
Expand Down

0 comments on commit 5637f8d

Please sign in to comment.