Skip to content

Commit

Permalink
migrate von databaseUsername to databaseAccount and fully use
Browse files Browse the repository at this point in the history
MariaDBAccount
  • Loading branch information
weinimo committed Feb 20, 2024
1 parent dabf070 commit 718da2e
Show file tree
Hide file tree
Showing 19 changed files with 194 additions and 154 deletions.
16 changes: 9 additions & 7 deletions api/bases/octavia.openstack.org_octaviaamphoracontrollers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,15 @@ spec:
added to to /etc/<service>/<service>.conf.d directory as custom.conf
file.
type: string
databaseAccount:
default: octavia
description: DatabaseAccount - name of MariaDBAccount which will be
used to connect. As an interim solution, octavia-controller will
generate the MariaDBAccount object of the given name if it's not
present in the cluster. Later, openstack-operator will perform
this generation and also populate this field for the Octavia objects
it creates
type: string
databaseHostname:
description: DatabaseHostname - Octavia DB hostname
type: string
Expand All @@ -78,12 +87,6 @@ spec:
to get the credentials from the instance to create the DB Might
not be required in future
type: string
databaseUser:
default: octavia
description: 'DatabaseUser - optional username used for octavia DB,
defaults to octavia TODO: -> implement needs work in mariadb-operator,
right now only octavia'
type: string
defaultConfigOverwrite:
additionalProperties:
type: string
Expand Down Expand Up @@ -121,7 +124,6 @@ spec:
type: object
passwordSelectors:
default:
database: OctaviaDatabasePassword
service: OctaviaPassword
description: PasswordSelectors - Selectors to identify the DB and
AdminUser password from the Secret
Expand Down
16 changes: 9 additions & 7 deletions api/bases/octavia.openstack.org_octaviaapis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,15 @@ spec:
added to to /etc/<service>/<service>.conf.d directory as custom.conf
file.
type: string
databaseAccount:
default: octavia
description: DatabaseAccount - name of MariaDBAccount which will be
used to connect. As an interim solution, octavia-controller will
generate the MariaDBAccount object of the given name if it's not
present in the cluster. Later, openstack-operator will perform
this generation and also populate this field for the Octavia objects
it creates
type: string
databaseHostname:
description: DatabaseHostname - Octavia DB hostname
type: string
Expand All @@ -67,12 +76,6 @@ spec:
to get the credentials from the instance to create the DB Might
not be required in future
type: string
databaseUser:
default: octavia
description: 'DatabaseUser - optional username used for octavia DB,
defaults to octavia TODO: -> implement needs work in mariadb-operator,
right now only octavia'
type: string
defaultConfigOverwrite:
additionalProperties:
type: string
Expand Down Expand Up @@ -269,7 +272,6 @@ spec:
type: object
passwordSelectors:
default:
database: OctaviaDatabasePassword
service: OctaviaPassword
description: PasswordSelectors - Selectors to identify the DB and
ServiceUser password from the Secret
Expand Down
82 changes: 46 additions & 36 deletions api/bases/octavia.openstack.org_octavias.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,20 @@ spec:
added to to /etc/<service>/<service>.conf.d directory as custom.conf
file.
type: string
databaseAccount:
default: octavia
description: DatabaseAccount - name of MariaDBAccount which will be
used to connect. As an interim solution, octavia-controller will
generate the MariaDBAccount object of the given name if it's not
present in the cluster. Later, openstack-operator will perform
this generation and also populate this field for the Octavia objects
it creates
type: string
databaseInstance:
description: MariaDB instance name Right now required by the maridb-operator
to get the credentials from the instance to create the DB Might
not be required in future
type: string
databaseUser:
default: octavia
description: 'DatabaseUser - optional username used for octavia DB,
defaults to octavia TODO: -> implement needs work in mariadb-operator,
right now only octavia'
type: string
defaultConfigOverwrite:
additionalProperties:
type: string
Expand Down Expand Up @@ -112,6 +115,15 @@ spec:
content gets added to to /etc/<service>/<service>.conf.d directory
as custom.conf file.
type: string
databaseAccount:
default: octavia
description: DatabaseAccount - name of MariaDBAccount which will
be used to connect. As an interim solution, octavia-controller
will generate the MariaDBAccount object of the given name if
it's not present in the cluster. Later, openstack-operator
will perform this generation and also populate this field for
the Octavia objects it creates
type: string
databaseHostname:
description: DatabaseHostname - Octavia DB hostname
type: string
Expand All @@ -120,12 +132,6 @@ spec:
to get the credentials from the instance to create the DB Might
not be required in future
type: string
databaseUser:
default: octavia
description: 'DatabaseUser - optional username used for octavia
DB, defaults to octavia TODO: -> implement needs work in mariadb-operator,
right now only octavia'
type: string
defaultConfigOverwrite:
additionalProperties:
type: string
Expand Down Expand Up @@ -330,7 +336,6 @@ spec:
type: object
passwordSelectors:
default:
database: OctaviaDatabasePassword
service: OctaviaPassword
description: PasswordSelectors - Selectors to identify the DB
and ServiceUser password from the Secret
Expand Down Expand Up @@ -455,6 +460,15 @@ spec:
content gets added to to /etc/<service>/<service>.conf.d directory
as custom.conf file.
type: string
databaseAccount:
default: octavia
description: DatabaseAccount - name of MariaDBAccount which will
be used to connect. As an interim solution, octavia-controller
will generate the MariaDBAccount object of the given name if
it's not present in the cluster. Later, openstack-operator
will perform this generation and also populate this field for
the Octavia objects it creates
type: string
databaseHostname:
description: DatabaseHostname - Octavia DB hostname
type: string
Expand All @@ -463,12 +477,6 @@ spec:
to get the credentials from the instance to create the DB Might
not be required in future
type: string
databaseUser:
default: octavia
description: 'DatabaseUser - optional username used for octavia
DB, defaults to octavia TODO: -> implement needs work in mariadb-operator,
right now only octavia'
type: string
defaultConfigOverwrite:
additionalProperties:
type: string
Expand Down Expand Up @@ -506,7 +514,6 @@ spec:
type: object
passwordSelectors:
default:
database: OctaviaDatabasePassword
service: OctaviaPassword
description: PasswordSelectors - Selectors to identify the DB
and AdminUser password from the Secret
Expand Down Expand Up @@ -640,6 +647,15 @@ spec:
content gets added to to /etc/<service>/<service>.conf.d directory
as custom.conf file.
type: string
databaseAccount:
default: octavia
description: DatabaseAccount - name of MariaDBAccount which will
be used to connect. As an interim solution, octavia-controller
will generate the MariaDBAccount object of the given name if
it's not present in the cluster. Later, openstack-operator
will perform this generation and also populate this field for
the Octavia objects it creates
type: string
databaseHostname:
description: DatabaseHostname - Octavia DB hostname
type: string
Expand All @@ -648,12 +664,6 @@ spec:
to get the credentials from the instance to create the DB Might
not be required in future
type: string
databaseUser:
default: octavia
description: 'DatabaseUser - optional username used for octavia
DB, defaults to octavia TODO: -> implement needs work in mariadb-operator,
right now only octavia'
type: string
defaultConfigOverwrite:
additionalProperties:
type: string
Expand Down Expand Up @@ -691,7 +701,6 @@ spec:
type: object
passwordSelectors:
default:
database: OctaviaDatabasePassword
service: OctaviaPassword
description: PasswordSelectors - Selectors to identify the DB
and AdminUser password from the Secret
Expand Down Expand Up @@ -825,6 +834,15 @@ spec:
content gets added to to /etc/<service>/<service>.conf.d directory
as custom.conf file.
type: string
databaseAccount:
default: octavia
description: DatabaseAccount - name of MariaDBAccount which will
be used to connect. As an interim solution, octavia-controller
will generate the MariaDBAccount object of the given name if
it's not present in the cluster. Later, openstack-operator
will perform this generation and also populate this field for
the Octavia objects it creates
type: string
databaseHostname:
description: DatabaseHostname - Octavia DB hostname
type: string
Expand All @@ -833,12 +851,6 @@ spec:
to get the credentials from the instance to create the DB Might
not be required in future
type: string
databaseUser:
default: octavia
description: 'DatabaseUser - optional username used for octavia
DB, defaults to octavia TODO: -> implement needs work in mariadb-operator,
right now only octavia'
type: string
defaultConfigOverwrite:
additionalProperties:
type: string
Expand Down Expand Up @@ -876,7 +888,6 @@ spec:
type: object
passwordSelectors:
default:
database: OctaviaDatabasePassword
service: OctaviaPassword
description: PasswordSelectors - Selectors to identify the DB
and AdminUser password from the Secret
Expand Down Expand Up @@ -987,7 +998,6 @@ spec:
type: object
passwordSelectors:
default:
database: OctaviaDatabasePassword
service: OctaviaPassword
description: PasswordSelectors - Selectors to identify the DB and
ServiceUser password from the Secret
Expand Down Expand Up @@ -1016,7 +1026,7 @@ spec:
type: string
secret:
description: Secret containing OpenStack password information for
octavia OctaviaDatabasePassword, AdminPassword
octavia's keystone password; no longer used for database password
type: string
serviceUser:
default: octavia
Expand Down
11 changes: 7 additions & 4 deletions api/v1beta1/amphoracontroller_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,12 @@ type OctaviaAmphoraControllerSpec struct {

// +kubebuilder:validation:Optional
// +kubebuilder:default=octavia
// DatabaseUser - optional username used for octavia DB, defaults to octavia
// TODO: -> implement needs work in mariadb-operator, right now only octavia
DatabaseUser string `json:"databaseUser"`
// DatabaseAccount - name of MariaDBAccount which will be used to connect.
// As an interim solution, octavia-controller will
// generate the MariaDBAccount object of the given name if it's not
// present in the cluster. Later, openstack-operator will perform this
// generation and also populate this field for the Octavia objects it creates
DatabaseAccount string `json:"databaseAccount"`

// +kubebuilder:validation:Optional
// DatabaseHostname - Octavia DB hostname
Expand Down Expand Up @@ -91,7 +94,7 @@ type OctaviaAmphoraControllerSpec struct {
LoadBalancerSSHPrivKey string `json:"sshPrivkeySecret,omitempty"`

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

Expand Down
14 changes: 9 additions & 5 deletions api/v1beta1/octavia_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,12 @@ type OctaviaSpec struct {

// +kubebuilder:validation:Optional
// +kubebuilder:default=octavia
// DatabaseUser - optional username used for octavia DB, defaults to octavia
// TODO: -> implement needs work in mariadb-operator, right now only octavia
DatabaseUser string `json:"databaseUser"`
// DatabaseAccount - name of MariaDBAccount which will be used to connect.
// As an interim solution, octavia-controller will
// generate the MariaDBAccount object of the given name if it's not
// present in the cluster. Later, openstack-operator will perform this
// generation and also populate this field for the Octavia objects it creates
DatabaseAccount string `json:"databaseAccount"`

// +kubebuilder:validation:Required
// +kubebuilder:default=rabbitmq
Expand All @@ -67,11 +70,12 @@ type OctaviaSpec struct {
ServiceUser string `json:"serviceUser"`

// +kubebuilder:validation:Required
// Secret containing OpenStack password information for octavia OctaviaDatabasePassword, AdminPassword
// Secret containing OpenStack password information for octavia's keystone
// password; no longer used for database password
Secret string `json:"secret"`

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

Expand Down
11 changes: 7 additions & 4 deletions api/v1beta1/octaviaapi_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,12 @@ type OctaviaAPISpec struct {

// +kubebuilder:validation:Optional
// +kubebuilder:default=octavia
// DatabaseUser - optional username used for octavia DB, defaults to octavia
// TODO: -> implement needs work in mariadb-operator, right now only octavia
DatabaseUser string `json:"databaseUser"`
// DatabaseAccount - name of MariaDBAccount which will be used to connect.
// As an interim solution, octavia-controller will
// generate the MariaDBAccount object of the given name if it's not
// present in the cluster. Later, openstack-operator will perform this
// generation and also populate this field for the Octavia objects it creates
DatabaseAccount string `json:"databaseAccount"`

// +kubebuilder:validation:Optional
// DatabaseHostname - Octavia DB hostname
Expand Down Expand Up @@ -79,7 +82,7 @@ type OctaviaAPISpec struct {
Secret string `json:"secret"`

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,15 @@ spec:
added to to /etc/<service>/<service>.conf.d directory as custom.conf
file.
type: string
databaseAccount:
default: octavia
description: DatabaseAccount - name of MariaDBAccount which will be
used to connect. As an interim solution, octavia-controller will
generate the MariaDBAccount object of the given name if it's not
present in the cluster. Later, openstack-operator will perform
this generation and also populate this field for the Octavia objects
it creates
type: string
databaseHostname:
description: DatabaseHostname - Octavia DB hostname
type: string
Expand All @@ -78,12 +87,6 @@ spec:
to get the credentials from the instance to create the DB Might
not be required in future
type: string
databaseUser:
default: octavia
description: 'DatabaseUser - optional username used for octavia DB,
defaults to octavia TODO: -> implement needs work in mariadb-operator,
right now only octavia'
type: string
defaultConfigOverwrite:
additionalProperties:
type: string
Expand Down Expand Up @@ -121,7 +124,6 @@ spec:
type: object
passwordSelectors:
default:
database: OctaviaDatabasePassword
service: OctaviaPassword
description: PasswordSelectors - Selectors to identify the DB and
AdminUser password from the Secret
Expand Down
Loading

0 comments on commit 718da2e

Please sign in to comment.