Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

migrate from databaseUsername to databaseAccount and fully use MariaDBAccount #348

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions api/bases/cinder.openstack.org_cinderapis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ spec:
items:
type: string
type: array
databaseHostname:
type: string
databaseUser:
databaseAccount:
default: cinder
type: string
databaseHostname:
type: string
extraMounts:
items:
properties:
Expand Down Expand Up @@ -870,12 +870,8 @@ spec:
type: object
passwordSelectors:
default:
database: CinderDatabasePassword
service: CinderPassword
properties:
database:
default: CinderDatabasePassword
type: string
service:
default: CinderPassword
type: string
Expand Down
10 changes: 3 additions & 7 deletions api/bases/cinder.openstack.org_cinderbackups.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ spec:
items:
type: string
type: array
databaseHostname:
type: string
databaseUser:
databaseAccount:
default: cinder
type: string
databaseHostname:
type: string
extraMounts:
items:
properties:
Expand Down Expand Up @@ -819,12 +819,8 @@ spec:
type: object
passwordSelectors:
default:
database: CinderDatabasePassword
service: CinderPassword
properties:
database:
default: CinderDatabasePassword
type: string
service:
default: CinderPassword
type: string
Expand Down
10 changes: 3 additions & 7 deletions api/bases/cinder.openstack.org_cinders.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -338,11 +338,11 @@ spec:
type: object
customServiceConfig:
type: string
databaseInstance:
type: string
databaseUser:
databaseAccount:
default: cinder
type: string
databaseInstance:
type: string
dbPurge:
properties:
age:
Expand Down Expand Up @@ -1124,12 +1124,8 @@ spec:
type: object
passwordSelectors:
default:
database: CinderDatabasePassword
service: CinderPassword
properties:
database:
default: CinderDatabasePassword
type: string
service:
default: CinderPassword
type: string
Expand Down
10 changes: 3 additions & 7 deletions api/bases/cinder.openstack.org_cinderschedulers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ spec:
items:
type: string
type: array
databaseHostname:
type: string
databaseUser:
databaseAccount:
default: cinder
type: string
databaseHostname:
type: string
extraMounts:
items:
properties:
Expand Down Expand Up @@ -819,12 +819,8 @@ spec:
type: object
passwordSelectors:
default:
database: CinderDatabasePassword
service: CinderPassword
properties:
database:
default: CinderDatabasePassword
type: string
service:
default: CinderPassword
type: string
Expand Down
10 changes: 3 additions & 7 deletions api/bases/cinder.openstack.org_cindervolumes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ spec:
items:
type: string
type: array
databaseHostname:
type: string
databaseUser:
databaseAccount:
default: cinder
type: string
databaseHostname:
type: string
extraMounts:
items:
properties:
Expand Down Expand Up @@ -819,12 +819,8 @@ spec:
type: object
passwordSelectors:
default:
database: CinderDatabasePassword
service: CinderPassword
properties:
database:
default: CinderDatabasePassword
type: string
service:
default: CinderPassword
type: string
Expand Down
1 change: 1 addition & 0 deletions api/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ require (
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/onsi/ginkgo/v2 v2.15.0 // indirect
github.com/onsi/gomega v1.31.1 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/prometheus/client_golang v1.16.0 // indirect
github.com/prometheus/client_model v0.4.0 // indirect
Expand Down
3 changes: 2 additions & 1 deletion api/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
github.com/onsi/ginkgo/v2 v2.15.0 h1:79HwNRBAZHOEwrczrgSOPy+eFTTlIGELKy5as+ClttY=
github.com/onsi/ginkgo/v2 v2.15.0/go.mod h1:HlxMHtYF57y6Dpf+mc5529KKmSq9h2FpCF+/ZkwUxKM=
github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8=
github.com/onsi/gomega v1.31.1 h1:KYppCUK+bUgAZwHOu7EXVBKyQA6ILvOESHkn/tgoqvo=
github.com/onsi/gomega v1.31.1/go.mod h1:y40C95dwAD1Nz36SsEnxvfFe8FFfNxzI5eJ0EYGyAy0=
github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20240216173409-86913e6d5885 h1:o7KZaxKt8Dr97ZJIBPW0P482gLyFEURKF89fizcJCBQ=
github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20240216173409-86913e6d5885/go.mod h1:bQwzyQtWCR9F0+IvWZ30J9d1lB6tcX3CNJ0Ten1smDw=
github.com/openstack-k8s-operators/lib-common/modules/storage v0.3.1-0.20240216173409-86913e6d5885 h1:sMO+IYsZ91Nho0FV6y03J0NTGd8+ZWB4KmKJJU94gTU=
Expand Down
16 changes: 5 additions & 11 deletions api/v1beta1/common_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,16 @@ type CinderTemplate struct {

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

// +kubebuilder:validation:Required
// Secret containing OpenStack password information for CinderDatabasePassword
// Secret containing OpenStack password information
Secret string `json:"secret"`

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

Expand Down Expand Up @@ -79,11 +78,6 @@ type CinderServiceTemplate struct {

// PasswordSelector to identify the DB and AdminUser password from the Secret
type PasswordSelector struct {
// +kubebuilder:validation:Optional
// +kubebuilder:default="CinderDatabasePassword"
// Database - Selector to get the cinder database user password from the Secret
// TODO: not used, need change in mariadb-operator
Database string `json:"database"`
// +kubebuilder:validation:Optional
// +kubebuilder:default="CinderPassword"
// Service - Selector to get the cinder service password from the Secret
Expand Down
10 changes: 3 additions & 7 deletions config/crd/bases/cinder.openstack.org_cinderapis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ spec:
items:
type: string
type: array
databaseHostname:
type: string
databaseUser:
databaseAccount:
default: cinder
type: string
databaseHostname:
type: string
extraMounts:
items:
properties:
Expand Down Expand Up @@ -870,12 +870,8 @@ spec:
type: object
passwordSelectors:
default:
database: CinderDatabasePassword
service: CinderPassword
properties:
database:
default: CinderDatabasePassword
type: string
service:
default: CinderPassword
type: string
Expand Down
10 changes: 3 additions & 7 deletions config/crd/bases/cinder.openstack.org_cinderbackups.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ spec:
items:
type: string
type: array
databaseHostname:
type: string
databaseUser:
databaseAccount:
default: cinder
type: string
databaseHostname:
type: string
extraMounts:
items:
properties:
Expand Down Expand Up @@ -819,12 +819,8 @@ spec:
type: object
passwordSelectors:
default:
database: CinderDatabasePassword
service: CinderPassword
properties:
database:
default: CinderDatabasePassword
type: string
service:
default: CinderPassword
type: string
Expand Down
10 changes: 3 additions & 7 deletions config/crd/bases/cinder.openstack.org_cinders.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -338,11 +338,11 @@ spec:
type: object
customServiceConfig:
type: string
databaseInstance:
type: string
databaseUser:
databaseAccount:
default: cinder
type: string
databaseInstance:
type: string
dbPurge:
properties:
age:
Expand Down Expand Up @@ -1124,12 +1124,8 @@ spec:
type: object
passwordSelectors:
default:
database: CinderDatabasePassword
service: CinderPassword
properties:
database:
default: CinderDatabasePassword
type: string
service:
default: CinderPassword
type: string
Expand Down
10 changes: 3 additions & 7 deletions config/crd/bases/cinder.openstack.org_cinderschedulers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ spec:
items:
type: string
type: array
databaseHostname:
type: string
databaseUser:
databaseAccount:
default: cinder
type: string
databaseHostname:
type: string
extraMounts:
items:
properties:
Expand Down Expand Up @@ -819,12 +819,8 @@ spec:
type: object
passwordSelectors:
default:
database: CinderDatabasePassword
service: CinderPassword
properties:
database:
default: CinderDatabasePassword
type: string
service:
default: CinderPassword
type: string
Expand Down
10 changes: 3 additions & 7 deletions config/crd/bases/cinder.openstack.org_cindervolumes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ spec:
items:
type: string
type: array
databaseHostname:
type: string
databaseUser:
databaseAccount:
default: cinder
type: string
databaseHostname:
type: string
extraMounts:
items:
properties:
Expand Down Expand Up @@ -819,12 +819,8 @@ spec:
type: object
passwordSelectors:
default:
database: CinderDatabasePassword
service: CinderPassword
properties:
database:
default: CinderDatabasePassword
type: string
service:
default: CinderPassword
type: string
Expand Down
2 changes: 1 addition & 1 deletion config/samples/cinder_v1beta1_cinder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ spec:
[DEFAULT]
debug = true
databaseInstance: openstack
databaseUser: cinder
databaseAccount: cinder
rabbitMqClusterName: rabbitmq
cinderAPI: {}
cinderScheduler: {}
Expand Down
2 changes: 1 addition & 1 deletion config/samples/cinder_v1beta1_cinder_tls.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ spec:
[DEFAULT]
debug = true
databaseInstance: openstack
databaseUser: cinder
databaseAccount: cinder
rabbitMqClusterName: rabbitmq
cinderAPI:
tls:
Expand Down
Loading
Loading