Skip to content

Commit 844d789

Browse files
Merge pull request openstack-k8s-operators#348 from zzzeek/integrate_oo_accounts
migrate from databaseUsername to databaseAccount and fully use MariaDBAccount
2 parents bff75c1 + c63b424 commit 844d789

20 files changed

+176
-117
lines changed

api/bases/cinder.openstack.org_cinderapis.yaml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ spec:
4848
items:
4949
type: string
5050
type: array
51-
databaseHostname:
52-
type: string
53-
databaseUser:
51+
databaseAccount:
5452
default: cinder
5553
type: string
54+
databaseHostname:
55+
type: string
5656
extraMounts:
5757
items:
5858
properties:
@@ -870,12 +870,8 @@ spec:
870870
type: object
871871
passwordSelectors:
872872
default:
873-
database: CinderDatabasePassword
874873
service: CinderPassword
875874
properties:
876-
database:
877-
default: CinderDatabasePassword
878-
type: string
879875
service:
880876
default: CinderPassword
881877
type: string

api/bases/cinder.openstack.org_cinderbackups.yaml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ spec:
4848
items:
4949
type: string
5050
type: array
51-
databaseHostname:
52-
type: string
53-
databaseUser:
51+
databaseAccount:
5452
default: cinder
5553
type: string
54+
databaseHostname:
55+
type: string
5656
extraMounts:
5757
items:
5858
properties:
@@ -819,12 +819,8 @@ spec:
819819
type: object
820820
passwordSelectors:
821821
default:
822-
database: CinderDatabasePassword
823822
service: CinderPassword
824823
properties:
825-
database:
826-
default: CinderDatabasePassword
827-
type: string
828824
service:
829825
default: CinderPassword
830826
type: string

api/bases/cinder.openstack.org_cinders.yaml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -338,11 +338,11 @@ spec:
338338
type: object
339339
customServiceConfig:
340340
type: string
341-
databaseInstance:
342-
type: string
343-
databaseUser:
341+
databaseAccount:
344342
default: cinder
345343
type: string
344+
databaseInstance:
345+
type: string
346346
dbPurge:
347347
properties:
348348
age:
@@ -1124,12 +1124,8 @@ spec:
11241124
type: object
11251125
passwordSelectors:
11261126
default:
1127-
database: CinderDatabasePassword
11281127
service: CinderPassword
11291128
properties:
1130-
database:
1131-
default: CinderDatabasePassword
1132-
type: string
11331129
service:
11341130
default: CinderPassword
11351131
type: string

api/bases/cinder.openstack.org_cinderschedulers.yaml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ spec:
4848
items:
4949
type: string
5050
type: array
51-
databaseHostname:
52-
type: string
53-
databaseUser:
51+
databaseAccount:
5452
default: cinder
5553
type: string
54+
databaseHostname:
55+
type: string
5656
extraMounts:
5757
items:
5858
properties:
@@ -819,12 +819,8 @@ spec:
819819
type: object
820820
passwordSelectors:
821821
default:
822-
database: CinderDatabasePassword
823822
service: CinderPassword
824823
properties:
825-
database:
826-
default: CinderDatabasePassword
827-
type: string
828824
service:
829825
default: CinderPassword
830826
type: string

api/bases/cinder.openstack.org_cindervolumes.yaml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ spec:
4848
items:
4949
type: string
5050
type: array
51-
databaseHostname:
52-
type: string
53-
databaseUser:
51+
databaseAccount:
5452
default: cinder
5553
type: string
54+
databaseHostname:
55+
type: string
5656
extraMounts:
5757
items:
5858
properties:
@@ -819,12 +819,8 @@ spec:
819819
type: object
820820
passwordSelectors:
821821
default:
822-
database: CinderDatabasePassword
823822
service: CinderPassword
824823
properties:
825-
database:
826-
default: CinderDatabasePassword
827-
type: string
828824
service:
829825
default: CinderPassword
830826
type: string

api/v1beta1/common_types.go

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,16 @@ type CinderTemplate struct {
2929

3030
// +kubebuilder:validation:Optional
3131
// +kubebuilder:default=cinder
32-
// DatabaseUser - optional username used for cinder DB, defaults to cinder
33-
// TODO: -> implement needs work in mariadb-operator, right now only cinder
34-
DatabaseUser string `json:"databaseUser"`
32+
// DatabaseAccount - optional MariaDBAccount used for cinder DB, defaults to cinder
33+
DatabaseAccount string `json:"databaseAccount"`
3534

3635
// +kubebuilder:validation:Required
37-
// Secret containing OpenStack password information for CinderDatabasePassword
36+
// Secret containing OpenStack password information
3837
Secret string `json:"secret"`
3938

4039
// +kubebuilder:validation:Optional
41-
// +kubebuilder:default={database: CinderDatabasePassword, service: CinderPassword}
42-
// PasswordSelectors - Selectors to identify the DB and ServiceUser password from the Secret
40+
// +kubebuilder:default={service: CinderPassword}
41+
// PasswordSelectors - Selectors to identify the ServiceUser password from the Secret
4342
PasswordSelectors PasswordSelector `json:"passwordSelectors"`
4443
}
4544

@@ -79,11 +78,6 @@ type CinderServiceTemplate struct {
7978

8079
// PasswordSelector to identify the DB and AdminUser password from the Secret
8180
type PasswordSelector struct {
82-
// +kubebuilder:validation:Optional
83-
// +kubebuilder:default="CinderDatabasePassword"
84-
// Database - Selector to get the cinder database user password from the Secret
85-
// TODO: not used, need change in mariadb-operator
86-
Database string `json:"database"`
8781
// +kubebuilder:validation:Optional
8882
// +kubebuilder:default="CinderPassword"
8983
// Service - Selector to get the cinder service password from the Secret

config/crd/bases/cinder.openstack.org_cinderapis.yaml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ spec:
4848
items:
4949
type: string
5050
type: array
51-
databaseHostname:
52-
type: string
53-
databaseUser:
51+
databaseAccount:
5452
default: cinder
5553
type: string
54+
databaseHostname:
55+
type: string
5656
extraMounts:
5757
items:
5858
properties:
@@ -870,12 +870,8 @@ spec:
870870
type: object
871871
passwordSelectors:
872872
default:
873-
database: CinderDatabasePassword
874873
service: CinderPassword
875874
properties:
876-
database:
877-
default: CinderDatabasePassword
878-
type: string
879875
service:
880876
default: CinderPassword
881877
type: string

config/crd/bases/cinder.openstack.org_cinderbackups.yaml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ spec:
4848
items:
4949
type: string
5050
type: array
51-
databaseHostname:
52-
type: string
53-
databaseUser:
51+
databaseAccount:
5452
default: cinder
5553
type: string
54+
databaseHostname:
55+
type: string
5656
extraMounts:
5757
items:
5858
properties:
@@ -819,12 +819,8 @@ spec:
819819
type: object
820820
passwordSelectors:
821821
default:
822-
database: CinderDatabasePassword
823822
service: CinderPassword
824823
properties:
825-
database:
826-
default: CinderDatabasePassword
827-
type: string
828824
service:
829825
default: CinderPassword
830826
type: string

config/crd/bases/cinder.openstack.org_cinders.yaml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -338,11 +338,11 @@ spec:
338338
type: object
339339
customServiceConfig:
340340
type: string
341-
databaseInstance:
342-
type: string
343-
databaseUser:
341+
databaseAccount:
344342
default: cinder
345343
type: string
344+
databaseInstance:
345+
type: string
346346
dbPurge:
347347
properties:
348348
age:
@@ -1124,12 +1124,8 @@ spec:
11241124
type: object
11251125
passwordSelectors:
11261126
default:
1127-
database: CinderDatabasePassword
11281127
service: CinderPassword
11291128
properties:
1130-
database:
1131-
default: CinderDatabasePassword
1132-
type: string
11331129
service:
11341130
default: CinderPassword
11351131
type: string

config/crd/bases/cinder.openstack.org_cinderschedulers.yaml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ spec:
4848
items:
4949
type: string
5050
type: array
51-
databaseHostname:
52-
type: string
53-
databaseUser:
51+
databaseAccount:
5452
default: cinder
5553
type: string
54+
databaseHostname:
55+
type: string
5656
extraMounts:
5757
items:
5858
properties:
@@ -819,12 +819,8 @@ spec:
819819
type: object
820820
passwordSelectors:
821821
default:
822-
database: CinderDatabasePassword
823822
service: CinderPassword
824823
properties:
825-
database:
826-
default: CinderDatabasePassword
827-
type: string
828824
service:
829825
default: CinderPassword
830826
type: string

0 commit comments

Comments
 (0)