Skip to content

Commit f270644

Browse files
committed
Align and remove omitempty from databaseInstance
For adoption testing a ctlplane with disabled manila gets applied: ~~~ manila: enabled: false template: manilaAPI: {} manilaScheduler: {} manilaShares: {} ~~~ This fails with because the manila databaseInstance parameter has omitempty specified: ~~~ $ oc apply -f ./test_deployment.yaml The OpenStackControlPlane "openstack" is invalid: * spec.manila.template.databaseInstance: Required value * <nil>: Invalid value: "null": some validation rules were not checked because the object was invalid; correct the existing errors to complete validation ~~~ This aligns the databaseInstance parameter and removes the omitempty like it is speficied in all other service operators. Signed-off-by: Martin Schuppert <mschuppert@redhat.com>
1 parent 789370f commit f270644

3 files changed

Lines changed: 3 additions & 1 deletion

File tree

api/bases/manila.openstack.org_manilas.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1780,6 +1780,7 @@ spec:
17801780
type: string
17811781
type: object
17821782
required:
1783+
- databaseInstance
17831784
- manilaAPI
17841785
- manilaScheduler
17851786
- memcachedInstance

api/v1beta1/manila_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ type ManilaSpecBase struct {
7474
// MariaDB instance name
7575
// Right now required by the maridb-operator to get the credentials from the instance to create the DB
7676
// Might not be required in future
77-
DatabaseInstance string `json:"databaseInstance,omitempty"`
77+
DatabaseInstance string `json:"databaseInstance"`
7878

7979
// +kubebuilder:validation:Required
8080
// +kubebuilder:default=rabbitmq

config/crd/bases/manila.openstack.org_manilas.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1780,6 +1780,7 @@ spec:
17801780
type: string
17811781
type: object
17821782
required:
1783+
- databaseInstance
17831784
- manilaAPI
17841785
- manilaScheduler
17851786
- memcachedInstance

0 commit comments

Comments
 (0)