Skip to content

Commit

Permalink
This patch allows Octavia to set its route annotations.
Browse files Browse the repository at this point in the history
Depends-On: openstack-k8s-operators/octavia-operator#403
Related-Issue: OSPRH-10959
  • Loading branch information
Fernando Royo committed Nov 13, 2024
1 parent df64f5b commit af4f24a
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 8 deletions.
6 changes: 5 additions & 1 deletion apis/bases/core.openstack.org_openstackcontrolplanes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9130,7 +9130,8 @@ spec:
apacheContainerImage:
type: string
apiTimeout:
type: string
default: 120
type: integer
customServiceConfig:
default: '# add your customization here'
type: string
Expand Down Expand Up @@ -9171,6 +9172,8 @@ spec:
type: object
octaviaAPI:
properties:
apiTimeout:
type: integer
customServiceConfig:
default: '# add your customization here'
type: string
Expand Down Expand Up @@ -9889,6 +9892,7 @@ spec:
type: string
required:
- apacheContainerImage
- apiTimeout
- databaseInstance
- octaviaAPI
- octaviaNetworkAttachment
Expand Down
2 changes: 2 additions & 0 deletions apis/core/v1beta1/openstackcontrolplane_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -896,6 +896,8 @@ func (r *OpenStackControlPlane) DefaultServices() {
}

r.Spec.Octavia.Template.Default()
initializeOverrideSpec(&r.Spec.Octavia.APIOverride.Route, true)
r.Spec.Octavia.Template.SetDefaultRouteAnnotations(r.Spec.Octavia.APIOverride.Route.Annotations)
}

// Barbican
Expand Down
2 changes: 1 addition & 1 deletion apis/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ require (
github.com/openstack-k8s-operators/mariadb-operator/api v0.5.1-0.20241106141725-340c4d78fef0
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.20241105105110-d4bfa598cee7
github.com/openstack-k8s-operators/octavia-operator/api v0.5.1-0.20241105111556-f9cd9b8eefed
github.com/openstack-k8s-operators/octavia-operator/api v0.5.1-0.20241113085513-e5285aabe924
github.com/openstack-k8s-operators/openstack-baremetal-operator/api v0.5.1-0.20241030042838-d69076bd6a9d
github.com/openstack-k8s-operators/ovn-operator/api v0.5.1-0.20241104080525-a1bccc740d33
github.com/openstack-k8s-operators/placement-operator/api v0.5.1-0.20241105102056-1bd39d75b43b
Expand Down
4 changes: 2 additions & 2 deletions apis/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ github.com/openstack-k8s-operators/neutron-operator/api v0.5.1-0.20241106150939-
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.20241105105110-d4bfa598cee7 h1:ztIBhZAChwMSBQfzUgWE1zoPvxVcLuJQanTeS9z43yw=
github.com/openstack-k8s-operators/nova-operator/api v0.5.1-0.20241105105110-d4bfa598cee7/go.mod h1:lfMDfS0ROyH3mGnPhfdn2zus1wbhqYDIWN2tXYnnWAQ=
github.com/openstack-k8s-operators/octavia-operator/api v0.5.1-0.20241105111556-f9cd9b8eefed h1:mpi0WpWIzFVS8nWaCpN6XHMSQ6yohzXZ4f4SAUVWrlM=
github.com/openstack-k8s-operators/octavia-operator/api v0.5.1-0.20241105111556-f9cd9b8eefed/go.mod h1:O8z7OV48TD59UGoOg9FgOjpuNU5brIwGwQ3ObGTIdXg=
github.com/openstack-k8s-operators/octavia-operator/api v0.5.1-0.20241113085513-e5285aabe924 h1:+2eT2YWDkyf4B4qnRwV+QQmnrAJQrrGMgUBsJFrCazE=
github.com/openstack-k8s-operators/octavia-operator/api v0.5.1-0.20241113085513-e5285aabe924/go.mod h1:O8z7OV48TD59UGoOg9FgOjpuNU5brIwGwQ3ObGTIdXg=
github.com/openstack-k8s-operators/openstack-baremetal-operator/api v0.5.1-0.20241030042838-d69076bd6a9d h1:CZUNDTMnekjZ6YqT7gvUF2tixo13VCOGpvKaWk0qQpM=
github.com/openstack-k8s-operators/openstack-baremetal-operator/api v0.5.1-0.20241030042838-d69076bd6a9d/go.mod h1:G9nampuSFs/9i2Ldx3OasU6oehWchwYuhBu1qMWktMg=
github.com/openstack-k8s-operators/ovn-operator/api v0.5.1-0.20241104080525-a1bccc740d33 h1:GDLf1LwguOnUXhHIZupxiJJeOBQTUOUo1IpUWHNI8Rs=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9130,7 +9130,8 @@ spec:
apacheContainerImage:
type: string
apiTimeout:
type: string
default: 120
type: integer
customServiceConfig:
default: '# add your customization here'
type: string
Expand Down Expand Up @@ -9171,6 +9172,8 @@ spec:
type: object
octaviaAPI:
properties:
apiTimeout:
type: integer
customServiceConfig:
default: '# add your customization here'
type: string
Expand Down Expand Up @@ -9889,6 +9892,7 @@ spec:
type: string
required:
- apacheContainerImage
- apiTimeout
- databaseInstance
- octaviaAPI
- octaviaNetworkAttachment
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ require (
github.com/openstack-k8s-operators/mariadb-operator/api v0.5.1-0.20241106141725-340c4d78fef0
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.20241105105110-d4bfa598cee7
github.com/openstack-k8s-operators/octavia-operator/api v0.5.1-0.20241105111556-f9cd9b8eefed
github.com/openstack-k8s-operators/octavia-operator/api v0.5.1-0.20241113085513-e5285aabe924
github.com/openstack-k8s-operators/openstack-baremetal-operator/api v0.5.1-0.20241030042838-d69076bd6a9d
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.20241104080525-a1bccc740d33
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ github.com/openstack-k8s-operators/neutron-operator/api v0.5.1-0.20241106150939-
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.20241105105110-d4bfa598cee7 h1:ztIBhZAChwMSBQfzUgWE1zoPvxVcLuJQanTeS9z43yw=
github.com/openstack-k8s-operators/nova-operator/api v0.5.1-0.20241105105110-d4bfa598cee7/go.mod h1:lfMDfS0ROyH3mGnPhfdn2zus1wbhqYDIWN2tXYnnWAQ=
github.com/openstack-k8s-operators/octavia-operator/api v0.5.1-0.20241105111556-f9cd9b8eefed h1:mpi0WpWIzFVS8nWaCpN6XHMSQ6yohzXZ4f4SAUVWrlM=
github.com/openstack-k8s-operators/octavia-operator/api v0.5.1-0.20241105111556-f9cd9b8eefed/go.mod h1:O8z7OV48TD59UGoOg9FgOjpuNU5brIwGwQ3ObGTIdXg=
github.com/openstack-k8s-operators/octavia-operator/api v0.5.1-0.20241113085513-e5285aabe924 h1:+2eT2YWDkyf4B4qnRwV+QQmnrAJQrrGMgUBsJFrCazE=
github.com/openstack-k8s-operators/octavia-operator/api v0.5.1-0.20241113085513-e5285aabe924/go.mod h1:O8z7OV48TD59UGoOg9FgOjpuNU5brIwGwQ3ObGTIdXg=
github.com/openstack-k8s-operators/openstack-baremetal-operator/api v0.5.1-0.20241030042838-d69076bd6a9d h1:CZUNDTMnekjZ6YqT7gvUF2tixo13VCOGpvKaWk0qQpM=
github.com/openstack-k8s-operators/openstack-baremetal-operator/api v0.5.1-0.20241030042838-d69076bd6a9d/go.mod h1:G9nampuSFs/9i2Ldx3OasU6oehWchwYuhBu1qMWktMg=
github.com/openstack-k8s-operators/ovn-operator/api v0.5.1-0.20241104080525-a1bccc740d33 h1:GDLf1LwguOnUXhHIZupxiJJeOBQTUOUo1IpUWHNI8Rs=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,10 @@ var _ = Describe("OpenStackOperator controller", func() {
Expect(OSCtlplane.Spec.Manila.APIOverride.Route).Should(Not(BeNil()))
Expect(OSCtlplane.Spec.Manila.APIOverride.Route.Annotations).Should(HaveKeyWithValue("haproxy.router.openshift.io/timeout", "60s"))
Expect(OSCtlplane.Spec.Manila.APIOverride.Route.Annotations).Should(HaveKeyWithValue("api.manila.openstack.org/timeout", "60s"))
//TODO (froyo) Enable these tests when Octavia would be enabled on FTs
//Expect(OSCtlplane.Spec.Octavia.APIOverride.Route).Should(Not(BeNil()))
//Expect(OSCtlplane.Spec.Octavia.APIOverride.Route.Annotations).Should(HaveKeyWithValue("haproxy.router.openshift.io/timeout", "120s"))
//Expect(OSCtlplane.Spec.Octavia.APIOverride.Route.Annotations).Should(HaveKeyWithValue("api.octavia.openstack.org/timeout", "120s"))
})

It("should create selfsigned issuer and public+internal CA and issuer", func() {
Expand Down

0 comments on commit af4f24a

Please sign in to comment.