Skip to content

Commit b102a94

Browse files
Merge pull request #1305 from dprince/drop_nova_images
Switch Nova to use *Core* spec
2 parents be08a93 + 5485f72 commit b102a94

File tree

6 files changed

+6
-42
lines changed

6 files changed

+6
-42
lines changed

apis/bases/core.openstack.org_openstackcontrolplanes.yaml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8790,8 +8790,6 @@ spec:
87908790
type: boolean
87918791
template:
87928792
properties:
8793-
apiContainerImageURL:
8794-
type: string
87958793
apiDatabaseAccount:
87968794
default: nova-api
87978795
type: string
@@ -9361,18 +9359,12 @@ spec:
93619359
cellMessageBusInstance: rabbitmq-cell1
93629360
hasAPIAccess: true
93639361
type: object
9364-
computeContainerImageURL:
9365-
type: string
9366-
conductorContainerImageURL:
9367-
type: string
93689362
keystoneInstance:
93699363
default: keystone
93709364
type: string
93719365
memcachedInstance:
93729366
default: memcached
93739367
type: string
9374-
metadataContainerImageURL:
9375-
type: string
93769368
metadataServiceTemplate:
93779369
default:
93789370
enabled: true
@@ -9497,8 +9489,6 @@ spec:
94979489
additionalProperties:
94989490
type: string
94999491
type: object
9500-
novncproxyContainerImageURL:
9501-
type: string
95029492
passwordSelectors:
95039493
default:
95049494
service: NovaPassword
@@ -9516,8 +9506,6 @@ spec:
95169506
preserveJobs:
95179507
default: false
95189508
type: boolean
9519-
schedulerContainerImageURL:
9520-
type: string
95219509
schedulerServiceTemplate:
95229510
default:
95239511
replicas: 1
@@ -9590,12 +9578,6 @@ spec:
95909578
type: string
95919579
type: object
95929580
required:
9593-
- apiContainerImageURL
9594-
- computeContainerImageURL
9595-
- conductorContainerImageURL
9596-
- metadataContainerImageURL
9597-
- novncproxyContainerImageURL
9598-
- schedulerContainerImageURL
95999581
- secret
96009582
type: object
96019583
type: object

apis/core/v1beta1/openstackcontrolplane_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ type NovaSection struct {
564564
// +kubebuilder:validation:Optional
565565
// +operator-sdk:csv:customresourcedefinitions:type=spec
566566
// Template - Overrides to use when creating the Nova services
567-
Template *novav1.NovaSpec `json:"template,omitempty"`
567+
Template *novav1.NovaSpecCore `json:"template,omitempty"`
568568

569569
// +kubebuilder:validation:Optional
570570
// +operator-sdk:csv:customresourcedefinitions:type=spec

apis/core/v1beta1/openstackcontrolplane_webhook.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ func (r *OpenStackControlPlane) ValidateUpdateServices(old OpenStackControlPlane
418418

419419
if r.Spec.Nova.Enabled {
420420
if old.Nova.Template == nil {
421-
old.Nova.Template = &novav1.NovaSpec{}
421+
old.Nova.Template = &novav1.NovaSpecCore{}
422422
}
423423
errors = append(errors, r.Spec.Nova.Template.ValidateUpdate(*old.Nova.Template, basePath.Child("nova").Child("template"), r.Namespace)...)
424424
errors = append(errors, validateTLSOverrideSpec(&r.Spec.Nova.APIOverride.Route, basePath.Child("nova").Child("apiOverride").Child("route"))...)
@@ -836,7 +836,7 @@ func (r *OpenStackControlPlane) DefaultServices() {
836836
// Nova
837837
if r.Spec.Nova.Enabled || r.Spec.Nova.Template != nil {
838838
if r.Spec.Nova.Template == nil {
839-
r.Spec.Nova.Template = &novav1.NovaSpec{}
839+
r.Spec.Nova.Template = &novav1.NovaSpecCore{}
840840
}
841841
r.Spec.Nova.Template.Default()
842842
}

apis/core/v1beta1/zz_generated.deepcopy.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/core.openstack.org_openstackcontrolplanes.yaml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8790,8 +8790,6 @@ spec:
87908790
type: boolean
87918791
template:
87928792
properties:
8793-
apiContainerImageURL:
8794-
type: string
87958793
apiDatabaseAccount:
87968794
default: nova-api
87978795
type: string
@@ -9361,18 +9359,12 @@ spec:
93619359
cellMessageBusInstance: rabbitmq-cell1
93629360
hasAPIAccess: true
93639361
type: object
9364-
computeContainerImageURL:
9365-
type: string
9366-
conductorContainerImageURL:
9367-
type: string
93689362
keystoneInstance:
93699363
default: keystone
93709364
type: string
93719365
memcachedInstance:
93729366
default: memcached
93739367
type: string
9374-
metadataContainerImageURL:
9375-
type: string
93769368
metadataServiceTemplate:
93779369
default:
93789370
enabled: true
@@ -9497,8 +9489,6 @@ spec:
94979489
additionalProperties:
94989490
type: string
94999491
type: object
9500-
novncproxyContainerImageURL:
9501-
type: string
95029492
passwordSelectors:
95039493
default:
95049494
service: NovaPassword
@@ -9516,8 +9506,6 @@ spec:
95169506
preserveJobs:
95179507
default: false
95189508
type: boolean
9519-
schedulerContainerImageURL:
9520-
type: string
95219509
schedulerServiceTemplate:
95229510
default:
95239511
replicas: 1
@@ -9590,12 +9578,6 @@ spec:
95909578
type: string
95919579
type: object
95929580
required:
9593-
- apiContainerImageURL
9594-
- computeContainerImageURL
9595-
- conductorContainerImageURL
9596-
- metadataContainerImageURL
9597-
- novncproxyContainerImageURL
9598-
- schedulerContainerImageURL
95999581
- secret
96009582
type: object
96019583
type: object

pkg/openstack/nova.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ func ReconcileNova(ctx context.Context, instance *corev1beta1.OpenStackControlPl
6565
}
6666

6767
if instance.Spec.Nova.Template == nil {
68-
instance.Spec.Nova.Template = &novav1.NovaSpec{}
68+
instance.Spec.Nova.Template = &novav1.NovaSpecCore{}
6969
}
7070

7171
if instance.Spec.Nova.Template.NodeSelector == nil {
@@ -346,7 +346,7 @@ func ReconcileNova(ctx context.Context, instance *corev1beta1.OpenStackControlPl
346346
// cell0 but cell0 should not have compute nodes registered. Eventually
347347
// we need to support either rabbitmq vhosts or deploy a separate
348348
// RabbitMQCluster per nova cell.
349-
instance.Spec.Nova.Template.DeepCopyInto(&nova.Spec)
349+
instance.Spec.Nova.Template.DeepCopyInto(&nova.Spec.NovaSpecCore)
350350

351351
nova.Spec.NovaImages.APIContainerImageURL = *version.Status.ContainerImages.NovaAPIImage
352352
nova.Spec.NovaImages.NovaComputeContainerImageURL = *version.Status.ContainerImages.NovaComputeImage

0 commit comments

Comments
 (0)