Skip to content

Commit cbd102e

Browse files
Merge pull request #2054 from karelyatin/OSPRH-33114
Enable WSGI deployment strategy for neutron by default
2 parents a4f3cf7 + 0bcb321 commit cbd102e

7 files changed

Lines changed: 29 additions & 0 deletions

File tree

‎api/bases/core.openstack.org_openstackversions.yaml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,8 @@ spec:
258258
type: string
259259
manilaSharev1:
260260
type: string
261+
neutronWsgi:
262+
type: string
261263
rabbitmqVersion:
262264
type: string
263265
type: object
@@ -699,6 +701,8 @@ spec:
699701
type: string
700702
manilaSharev1:
701703
type: string
704+
neutronWsgi:
705+
type: string
702706
rabbitmqVersion:
703707
type: string
704708
type: object

‎api/core/v1beta1/openstackversion_types.go‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,7 @@ type ServiceDefaults struct {
303303
RabbitmqVersion *string `json:"rabbitmqVersion,omitempty"`
304304
GlanceLocationAPI *string `json:"glanceLocationAPI,omitempty"`
305305
ManilaSharev1 *string `json:"manilaSharev1,omitempty"`
306+
NeutronWsgi *string `json:"neutronWsgi,omitempty"`
306307
}
307308

308309
// OpenStackVersionStatus defines the observed state of OpenStackVersion

‎api/core/v1beta1/zz_generated.deepcopy.go‎

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎bindata/crds/crds.yaml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22620,6 +22620,8 @@ spec:
2262022620
type: string
2262122621
manilaSharev1:
2262222622
type: string
22623+
neutronWsgi:
22624+
type: string
2262322625
rabbitmqVersion:
2262422626
type: string
2262522627
type: object
@@ -23061,6 +23063,8 @@ spec:
2306123063
type: string
2306223064
manilaSharev1:
2306323065
type: string
23066+
neutronWsgi:
23067+
type: string
2306423068
rabbitmqVersion:
2306523069
type: string
2306623070
type: object

‎config/crd/bases/core.openstack.org_openstackversions.yaml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,8 @@ spec:
258258
type: string
259259
manilaSharev1:
260260
type: string
261+
neutronWsgi:
262+
type: string
261263
rabbitmqVersion:
262264
type: string
263265
type: object
@@ -699,6 +701,8 @@ spec:
699701
type: string
700702
manilaSharev1:
701703
type: string
704+
neutronWsgi:
705+
type: string
702706
rabbitmqVersion:
703707
type: string
704708
type: object

‎internal/openstack/neutron.go‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,15 @@ func ReconcileNeutron(ctx context.Context, instance *corev1beta1.OpenStackContro
229229
neutronAPI.Spec.DatabaseInstance = "openstack"
230230
}
231231

232+
if neutronAPI.GetAnnotations() == nil {
233+
neutronAPI.SetAnnotations(make(map[string]string))
234+
}
235+
if version.Status.ServiceDefaults.NeutronWsgi != nil && *version.Status.ServiceDefaults.NeutronWsgi == "true" {
236+
neutronAPI.GetAnnotations()[neutronv1.NeutronWSGILabel] = "true"
237+
} else {
238+
neutronAPI.GetAnnotations()[neutronv1.NeutronWSGILabel] = "false"
239+
}
240+
232241
// Append globally defined extraMounts to the service's own list.
233242
for _, ev := range instance.Spec.ExtraMounts {
234243
neutronAPI.Spec.ExtraMounts = append(neutronAPI.Spec.ExtraMounts, neutronv1.NeutronExtraVolMounts{

‎internal/openstack/version.go‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,8 @@ func InitializeOpenStackVersionServiceDefaults(ctx context.Context) *corev1beta1
241241
versionString := "4.2"
242242
defaults.RabbitmqVersion = &versionString // all new rabbitmq deployments will have rabbitmq-server 4.2 (FR5)
243243

244+
defaults.NeutronWsgi = &trueString // enable WSGI (httpd/mod_wsgi + split neutron-rpc/neutron-worker Deployments) for neutron
245+
244246
return defaults
245247
}
246248

0 commit comments

Comments
 (0)