Skip to content

Commit

Permalink
Support manila setting route annotations
Browse files Browse the repository at this point in the history
This patch allows Manila to set its route annotations.

Depends-On: openstack-k8s-operators/manila-operator#282
  • Loading branch information
Akrog authored and abays committed Jun 10, 2024
1 parent 1361437 commit f144a99
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 6 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 @@ -7172,6 +7172,10 @@ spec:
type: boolean
template:
properties:
apiTimeout:
default: 60
minimum: 10
type: integer
customServiceConfig:
default: '# add your customization here'
type: string
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 @@ -479,6 +479,8 @@ func (r *OpenStackControlPlane) DefaultServices() {

// Manila
r.Spec.Manila.Template.Default()
initializeOverrideSpec(&r.Spec.Manila.APIOverride.Route, true)
r.Spec.Manila.Template.SetDefaultRouteAnnotations(r.Spec.Manila.APIOverride.Route.Annotations)

// Memcached
for key, template := range r.Spec.Memcached.Templates {
Expand Down
2 changes: 1 addition & 1 deletion apis/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ require (
github.com/openstack-k8s-operators/keystone-operator/api v0.3.1-0.20240605055850-8ee0ece70906
github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20240606071226-62abb00585ce
github.com/openstack-k8s-operators/lib-common/modules/storage v0.3.1-0.20240603143707-f5c5fe030fdd
github.com/openstack-k8s-operators/manila-operator/api v0.3.1-0.20240602180119-bb1bd220b0ff
github.com/openstack-k8s-operators/manila-operator/api v0.3.1-0.20240607065123-84eee5519cb5
github.com/openstack-k8s-operators/mariadb-operator/api v0.3.1-0.20240604125710-954ab886bb52
github.com/openstack-k8s-operators/neutron-operator/api v0.3.1-0.20240603080833-afe415667bba
github.com/openstack-k8s-operators/nova-operator/api v0.3.1-0.20240604091821-40e0e3428930
Expand Down
4 changes: 2 additions & 2 deletions apis/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ github.com/openstack-k8s-operators/lib-common/modules/openstack v0.3.1-0.2024060
github.com/openstack-k8s-operators/lib-common/modules/openstack v0.3.1-0.20240603143707-f5c5fe030fdd/go.mod h1:TMUocGLbCA0t/wR418+Y+KpyASgk4Ng/EwZu41rpGck=
github.com/openstack-k8s-operators/lib-common/modules/storage v0.3.1-0.20240603143707-f5c5fe030fdd h1:+5pEzyWRQEb6ijtXgqzTkJFY8sU324Iz+TJ4q1GxtIs=
github.com/openstack-k8s-operators/lib-common/modules/storage v0.3.1-0.20240603143707-f5c5fe030fdd/go.mod h1:HnATO+h6spGXATZ8fdOc+CJ47BiTV3ML1ZtGZa6yj3I=
github.com/openstack-k8s-operators/manila-operator/api v0.3.1-0.20240602180119-bb1bd220b0ff h1:tRMcOm8K2tG7EY5UECwzwbIKSyo/jC4jrC44amBte1U=
github.com/openstack-k8s-operators/manila-operator/api v0.3.1-0.20240602180119-bb1bd220b0ff/go.mod h1:47/hHuGGXHZx7eWJpsPzwW9tem0Ghod85PSnlBasT0Y=
github.com/openstack-k8s-operators/manila-operator/api v0.3.1-0.20240607065123-84eee5519cb5 h1:ai9dfLRdVAQygCrPBNvRnjiQN+DLfg+IsO+gC5Pt6pk=
github.com/openstack-k8s-operators/manila-operator/api v0.3.1-0.20240607065123-84eee5519cb5/go.mod h1:47/hHuGGXHZx7eWJpsPzwW9tem0Ghod85PSnlBasT0Y=
github.com/openstack-k8s-operators/mariadb-operator/api v0.3.1-0.20240604125710-954ab886bb52 h1:kLUdkStYxfle2pufyluxrRZViAc+yZ7MTKGu4PEYaHA=
github.com/openstack-k8s-operators/mariadb-operator/api v0.3.1-0.20240604125710-954ab886bb52/go.mod h1:MyDbpztq0ZB0X5sIR+SrXTmfKqBswztAz2AmdKOiHV4=
github.com/openstack-k8s-operators/neutron-operator/api v0.3.1-0.20240603080833-afe415667bba h1:Q9fQSjOpUwMnFenEU6eGMcZXaRw6VVQSQlU0llfNm74=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7172,6 +7172,10 @@ spec:
type: boolean
template:
properties:
apiTimeout:
default: 60
minimum: 10
type: integer
customServiceConfig:
default: '# add your customization here'
type: string
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ require (
github.com/openstack-k8s-operators/lib-common/modules/certmanager v0.0.0-20240603143707-f5c5fe030fdd
github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20240606071226-62abb00585ce
github.com/openstack-k8s-operators/lib-common/modules/test v0.3.1-0.20240603143707-f5c5fe030fdd
github.com/openstack-k8s-operators/manila-operator/api v0.3.1-0.20240602180119-bb1bd220b0ff
github.com/openstack-k8s-operators/manila-operator/api v0.3.1-0.20240607065123-84eee5519cb5
github.com/openstack-k8s-operators/mariadb-operator/api v0.3.1-0.20240604125710-954ab886bb52
github.com/openstack-k8s-operators/neutron-operator/api v0.3.1-0.20240603080833-afe415667bba
github.com/openstack-k8s-operators/nova-operator/api v0.3.1-0.20240604091821-40e0e3428930
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ github.com/openstack-k8s-operators/lib-common/modules/storage v0.3.1-0.202406031
github.com/openstack-k8s-operators/lib-common/modules/storage v0.3.1-0.20240603143707-f5c5fe030fdd/go.mod h1:HnATO+h6spGXATZ8fdOc+CJ47BiTV3ML1ZtGZa6yj3I=
github.com/openstack-k8s-operators/lib-common/modules/test v0.3.1-0.20240603143707-f5c5fe030fdd h1:ft+A4J0/arwsD3FQeDTI8zl++XFb6ybm3WY5orjVZjw=
github.com/openstack-k8s-operators/lib-common/modules/test v0.3.1-0.20240603143707-f5c5fe030fdd/go.mod h1:0h76CxD9g0z2Hk7fGFOZcjnzT1tQQ/yRNv3OXng+S/A=
github.com/openstack-k8s-operators/manila-operator/api v0.3.1-0.20240602180119-bb1bd220b0ff h1:tRMcOm8K2tG7EY5UECwzwbIKSyo/jC4jrC44amBte1U=
github.com/openstack-k8s-operators/manila-operator/api v0.3.1-0.20240602180119-bb1bd220b0ff/go.mod h1:47/hHuGGXHZx7eWJpsPzwW9tem0Ghod85PSnlBasT0Y=
github.com/openstack-k8s-operators/manila-operator/api v0.3.1-0.20240607065123-84eee5519cb5 h1:ai9dfLRdVAQygCrPBNvRnjiQN+DLfg+IsO+gC5Pt6pk=
github.com/openstack-k8s-operators/manila-operator/api v0.3.1-0.20240607065123-84eee5519cb5/go.mod h1:47/hHuGGXHZx7eWJpsPzwW9tem0Ghod85PSnlBasT0Y=
github.com/openstack-k8s-operators/mariadb-operator/api v0.3.1-0.20240604125710-954ab886bb52 h1:kLUdkStYxfle2pufyluxrRZViAc+yZ7MTKGu4PEYaHA=
github.com/openstack-k8s-operators/mariadb-operator/api v0.3.1-0.20240604125710-954ab886bb52/go.mod h1:MyDbpztq0ZB0X5sIR+SrXTmfKqBswztAz2AmdKOiHV4=
github.com/openstack-k8s-operators/neutron-operator/api v0.3.1-0.20240603080833-afe415667bba h1:Q9fQSjOpUwMnFenEU6eGMcZXaRw6VVQSQlU0llfNm74=
Expand Down
7 changes: 7 additions & 0 deletions tests/functional/base_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,9 @@ func GetDefaultOpenStackControlPlaneSpec() map[string]interface{} {
glanceTemplate := map[string]interface{}{
"apiTimeout": 60,
}
manilaTemplate := map[string]interface{}{
"apiTimeout": 60,
}

return map[string]interface{}{
"secret": "osp-secret",
Expand Down Expand Up @@ -382,6 +385,10 @@ func GetDefaultOpenStackControlPlaneSpec() map[string]interface{} {
"enabled": false,
"template": glanceTemplate,
},
"manila": map[string]interface{}{
"enabled": false,
"template": manilaTemplate,
},
"horizon": map[string]interface{}{
"enabled": true,
},
Expand Down
2 changes: 2 additions & 0 deletions tests/functional/openstackoperator_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,8 @@ var _ = Describe("OpenStackOperator controller", func() {
Expect(OSCtlplane.Spec.Glance.APIOverride[name].Route.Annotations).Should(HaveKeyWithValue("haproxy.router.openshift.io/timeout", "60s"))
Expect(OSCtlplane.Spec.Glance.APIOverride[name].Route.Annotations).Should(HaveKeyWithValue("api.glance.openstack.org/timeout", "60s"))
}
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"))
})

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

0 comments on commit f144a99

Please sign in to comment.