Skip to content

Commit

Permalink
migrate from databaseUsername to databaseAccount and fully use Maria…
Browse files Browse the repository at this point in the history
…DBAccount
  • Loading branch information
zzzeek committed Mar 11, 2024
1 parent 25f01ea commit eb8e5ed
Show file tree
Hide file tree
Showing 17 changed files with 153 additions and 145 deletions.
16 changes: 5 additions & 11 deletions api/bases/telemetry.openstack.org_autoscalings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,16 @@ spec:
content gets added to to /etc/<service>/<service>.conf.d directory
as custom.conf file.
type: string
databaseAccount:
default: aodh
description: DatabaseAccount - optional MariaDBAccount CR name
used for aodh DB, defaults to aodh
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: aodh
description: Database user name Needed to connect to a database
used by aodh
type: string
defaultConfigOverwrite:
additionalProperties:
type: string
Expand Down Expand Up @@ -255,7 +255,6 @@ spec:
passwordSelector:
default:
aodhService: AodhPassword
database: AodhDatabasePassword
description: PasswordSelectors - Selectors to identify the service
from the Secret
properties:
Expand All @@ -264,11 +263,6 @@ spec:
description: AodhService - Selector to get the aodh service
password from the Secret
type: string
database:
default: AodhDatabasePassword
description: Database - Selector to get the aodh database
user password from the Secret
type: string
service:
default: CeilometerPassword
description: Service - Selector to get the ceilometer service
Expand Down
5 changes: 0 additions & 5 deletions api/bases/telemetry.openstack.org_ceilometers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,6 @@ spec:
description: AodhService - Selector to get the aodh service password
from the Secret
type: string
database:
default: AodhDatabasePassword
description: Database - Selector to get the aodh database user
password from the Secret
type: string
service:
default: CeilometerPassword
description: Service - Selector to get the ceilometer service
Expand Down
21 changes: 5 additions & 16 deletions api/bases/telemetry.openstack.org_telemetries.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,16 @@ spec:
The content gets added to to /etc/<service>/<service>.conf.d
directory as custom.conf file.
type: string
databaseAccount:
default: aodh
description: DatabaseAccount - optional MariaDBAccount CR
name used for aodh DB, defaults to aodh
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: aodh
description: Database user name Needed to connect to a database
used by aodh
type: string
defaultConfigOverwrite:
additionalProperties:
type: string
Expand Down Expand Up @@ -269,7 +269,6 @@ spec:
passwordSelector:
default:
aodhService: AodhPassword
database: AodhDatabasePassword
description: PasswordSelectors - Selectors to identify the
service from the Secret
properties:
Expand All @@ -278,11 +277,6 @@ spec:
description: AodhService - Selector to get the aodh service
password from the Secret
type: string
database:
default: AodhDatabasePassword
description: Database - Selector to get the aodh database
user password from the Secret
type: string
service:
default: CeilometerPassword
description: Service - Selector to get the ceilometer
Expand Down Expand Up @@ -417,11 +411,6 @@ spec:
description: AodhService - Selector to get the aodh service
password from the Secret
type: string
database:
default: AodhDatabasePassword
description: Database - Selector to get the aodh database
user password from the Secret
type: string
service:
default: CeilometerPassword
description: Service - Selector to get the ceilometer service
Expand Down
8 changes: 4 additions & 4 deletions api/v1beta1/autoscaling_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@ type AodhCore struct {
// Might not be required in future
DatabaseInstance string `json:"databaseInstance"`

// Database user name
// Needed to connect to a database used by aodh
// +kubebuilder:validation:Optional
// +kubebuilder:default=aodh
DatabaseUser string `json:"databaseUser,omitempty"`
// DatabaseAccount - optional MariaDBAccount CR name used for aodh DB, defaults to aodh
DatabaseAccount string `json:"databaseAccount"`

// PasswordSelectors - Selectors to identify the service from the Secret
// +kubebuilder:default:={aodhService: AodhPassword, database: AodhDatabasePassword}
// +kubebuilder:default:={aodhService: AodhPassword}
PasswordSelectors PasswordsSelector `json:"passwordSelector,omitempty"`

// ServiceUser - optional username used for this service to register in keystone
Expand Down
5 changes: 0 additions & 5 deletions api/v1beta1/telemetry_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@ type PasswordsSelector struct {
// +kubebuilder:validation:Optional
// +kubebuilder:default:=AodhPassword
AodhService string `json:"aodhService"`

// Database - Selector to get the aodh database user password from the Secret
// +kubebuilder:validation:Optional
// +kubebuilder:default:=AodhDatabasePassword
Database string `json:"database"`
}

// TelemetrySpec defines the desired state of Telemetry
Expand Down
16 changes: 5 additions & 11 deletions config/crd/bases/telemetry.openstack.org_autoscalings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,16 @@ spec:
content gets added to to /etc/<service>/<service>.conf.d directory
as custom.conf file.
type: string
databaseAccount:
default: aodh
description: DatabaseAccount - optional MariaDBAccount CR name
used for aodh DB, defaults to aodh
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: aodh
description: Database user name Needed to connect to a database
used by aodh
type: string
defaultConfigOverwrite:
additionalProperties:
type: string
Expand Down Expand Up @@ -255,7 +255,6 @@ spec:
passwordSelector:
default:
aodhService: AodhPassword
database: AodhDatabasePassword
description: PasswordSelectors - Selectors to identify the service
from the Secret
properties:
Expand All @@ -264,11 +263,6 @@ spec:
description: AodhService - Selector to get the aodh service
password from the Secret
type: string
database:
default: AodhDatabasePassword
description: Database - Selector to get the aodh database
user password from the Secret
type: string
service:
default: CeilometerPassword
description: Service - Selector to get the ceilometer service
Expand Down
5 changes: 0 additions & 5 deletions config/crd/bases/telemetry.openstack.org_ceilometers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,6 @@ spec:
description: AodhService - Selector to get the aodh service password
from the Secret
type: string
database:
default: AodhDatabasePassword
description: Database - Selector to get the aodh database user
password from the Secret
type: string
service:
default: CeilometerPassword
description: Service - Selector to get the ceilometer service
Expand Down
21 changes: 5 additions & 16 deletions config/crd/bases/telemetry.openstack.org_telemetries.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,16 @@ spec:
The content gets added to to /etc/<service>/<service>.conf.d
directory as custom.conf file.
type: string
databaseAccount:
default: aodh
description: DatabaseAccount - optional MariaDBAccount CR
name used for aodh DB, defaults to aodh
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: aodh
description: Database user name Needed to connect to a database
used by aodh
type: string
defaultConfigOverwrite:
additionalProperties:
type: string
Expand Down Expand Up @@ -269,7 +269,6 @@ spec:
passwordSelector:
default:
aodhService: AodhPassword
database: AodhDatabasePassword
description: PasswordSelectors - Selectors to identify the
service from the Secret
properties:
Expand All @@ -278,11 +277,6 @@ spec:
description: AodhService - Selector to get the aodh service
password from the Secret
type: string
database:
default: AodhDatabasePassword
description: Database - Selector to get the aodh database
user password from the Secret
type: string
service:
default: CeilometerPassword
description: Service - Selector to get the ceilometer
Expand Down Expand Up @@ -417,11 +411,6 @@ spec:
description: AodhService - Selector to get the aodh service
password from the Secret
type: string
database:
default: AodhDatabasePassword
description: Database - Selector to get the aodh database
user password from the Secret
type: string
service:
default: CeilometerPassword
description: Service - Selector to get the ceilometer service
Expand Down
2 changes: 1 addition & 1 deletion config/samples/telemetry_v1beta1_autoscaling.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ spec:
aodh:
secret: osp-secret
passwordSelectors:
databaseUser: aodh
databaseAccount: aodh
databaseInstance: openstack
memcachedInstance: memcached
2 changes: 1 addition & 1 deletion config/samples/telemetry_v1beta1_autoscaling_tls.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ spec:
aodh:
secret: osp-secret
passwordSelectors:
databaseUser: aodh
databaseAccount: aodh
databaseInstance: openstack
memcachedInstance: memcached
tls:
Expand Down
2 changes: 1 addition & 1 deletion config/samples/telemetry_v1beta1_telemetry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
enabled: false
aodh:
passwordSelectors:
databaseUser: aodh
databaseAccount: aodh
databaseInstance: openstack
memcachedInstance: memcached
secret: osp-secret
Expand Down
Loading

0 comments on commit eb8e5ed

Please sign in to comment.