Skip to content

Commit eb8e5ed

Browse files
committed
migrate from databaseUsername to databaseAccount and fully use MariaDBAccount
1 parent 25f01ea commit eb8e5ed

17 files changed

+153
-145
lines changed

api/bases/telemetry.openstack.org_autoscalings.yaml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,16 @@ spec:
4848
content gets added to to /etc/<service>/<service>.conf.d directory
4949
as custom.conf file.
5050
type: string
51+
databaseAccount:
52+
default: aodh
53+
description: DatabaseAccount - optional MariaDBAccount CR name
54+
used for aodh DB, defaults to aodh
55+
type: string
5156
databaseInstance:
5257
description: MariaDB instance name Right now required by the maridb-operator
5358
to get the credentials from the instance to create the DB Might
5459
not be required in future
5560
type: string
56-
databaseUser:
57-
default: aodh
58-
description: Database user name Needed to connect to a database
59-
used by aodh
60-
type: string
6161
defaultConfigOverwrite:
6262
additionalProperties:
6363
type: string
@@ -255,7 +255,6 @@ spec:
255255
passwordSelector:
256256
default:
257257
aodhService: AodhPassword
258-
database: AodhDatabasePassword
259258
description: PasswordSelectors - Selectors to identify the service
260259
from the Secret
261260
properties:
@@ -264,11 +263,6 @@ spec:
264263
description: AodhService - Selector to get the aodh service
265264
password from the Secret
266265
type: string
267-
database:
268-
default: AodhDatabasePassword
269-
description: Database - Selector to get the aodh database
270-
user password from the Secret
271-
type: string
272266
service:
273267
default: CeilometerPassword
274268
description: Service - Selector to get the ceilometer service

api/bases/telemetry.openstack.org_ceilometers.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,6 @@ spec:
7676
description: AodhService - Selector to get the aodh service password
7777
from the Secret
7878
type: string
79-
database:
80-
default: AodhDatabasePassword
81-
description: Database - Selector to get the aodh database user
82-
password from the Secret
83-
type: string
8479
service:
8580
default: CeilometerPassword
8681
description: Service - Selector to get the ceilometer service

api/bases/telemetry.openstack.org_telemetries.yaml

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,16 @@ spec:
5151
The content gets added to to /etc/<service>/<service>.conf.d
5252
directory as custom.conf file.
5353
type: string
54+
databaseAccount:
55+
default: aodh
56+
description: DatabaseAccount - optional MariaDBAccount CR
57+
name used for aodh DB, defaults to aodh
58+
type: string
5459
databaseInstance:
5560
description: MariaDB instance name Right now required by the
5661
maridb-operator to get the credentials from the instance
5762
to create the DB Might not be required in future
5863
type: string
59-
databaseUser:
60-
default: aodh
61-
description: Database user name Needed to connect to a database
62-
used by aodh
63-
type: string
6464
defaultConfigOverwrite:
6565
additionalProperties:
6666
type: string
@@ -269,7 +269,6 @@ spec:
269269
passwordSelector:
270270
default:
271271
aodhService: AodhPassword
272-
database: AodhDatabasePassword
273272
description: PasswordSelectors - Selectors to identify the
274273
service from the Secret
275274
properties:
@@ -278,11 +277,6 @@ spec:
278277
description: AodhService - Selector to get the aodh service
279278
password from the Secret
280279
type: string
281-
database:
282-
default: AodhDatabasePassword
283-
description: Database - Selector to get the aodh database
284-
user password from the Secret
285-
type: string
286280
service:
287281
default: CeilometerPassword
288282
description: Service - Selector to get the ceilometer
@@ -417,11 +411,6 @@ spec:
417411
description: AodhService - Selector to get the aodh service
418412
password from the Secret
419413
type: string
420-
database:
421-
default: AodhDatabasePassword
422-
description: Database - Selector to get the aodh database
423-
user password from the Secret
424-
type: string
425414
service:
426415
default: CeilometerPassword
427416
description: Service - Selector to get the ceilometer service

api/v1beta1/autoscaling_types.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,13 @@ type AodhCore struct {
6868
// Might not be required in future
6969
DatabaseInstance string `json:"databaseInstance"`
7070

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

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

8080
// ServiceUser - optional username used for this service to register in keystone

api/v1beta1/telemetry_types.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,6 @@ type PasswordsSelector struct {
3636
// +kubebuilder:validation:Optional
3737
// +kubebuilder:default:=AodhPassword
3838
AodhService string `json:"aodhService"`
39-
40-
// Database - Selector to get the aodh database user password from the Secret
41-
// +kubebuilder:validation:Optional
42-
// +kubebuilder:default:=AodhDatabasePassword
43-
Database string `json:"database"`
4439
}
4540

4641
// TelemetrySpec defines the desired state of Telemetry

config/crd/bases/telemetry.openstack.org_autoscalings.yaml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,16 @@ spec:
4848
content gets added to to /etc/<service>/<service>.conf.d directory
4949
as custom.conf file.
5050
type: string
51+
databaseAccount:
52+
default: aodh
53+
description: DatabaseAccount - optional MariaDBAccount CR name
54+
used for aodh DB, defaults to aodh
55+
type: string
5156
databaseInstance:
5257
description: MariaDB instance name Right now required by the maridb-operator
5358
to get the credentials from the instance to create the DB Might
5459
not be required in future
5560
type: string
56-
databaseUser:
57-
default: aodh
58-
description: Database user name Needed to connect to a database
59-
used by aodh
60-
type: string
6161
defaultConfigOverwrite:
6262
additionalProperties:
6363
type: string
@@ -255,7 +255,6 @@ spec:
255255
passwordSelector:
256256
default:
257257
aodhService: AodhPassword
258-
database: AodhDatabasePassword
259258
description: PasswordSelectors - Selectors to identify the service
260259
from the Secret
261260
properties:
@@ -264,11 +263,6 @@ spec:
264263
description: AodhService - Selector to get the aodh service
265264
password from the Secret
266265
type: string
267-
database:
268-
default: AodhDatabasePassword
269-
description: Database - Selector to get the aodh database
270-
user password from the Secret
271-
type: string
272266
service:
273267
default: CeilometerPassword
274268
description: Service - Selector to get the ceilometer service

config/crd/bases/telemetry.openstack.org_ceilometers.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,6 @@ spec:
7676
description: AodhService - Selector to get the aodh service password
7777
from the Secret
7878
type: string
79-
database:
80-
default: AodhDatabasePassword
81-
description: Database - Selector to get the aodh database user
82-
password from the Secret
83-
type: string
8479
service:
8580
default: CeilometerPassword
8681
description: Service - Selector to get the ceilometer service

config/crd/bases/telemetry.openstack.org_telemetries.yaml

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,16 @@ spec:
5151
The content gets added to to /etc/<service>/<service>.conf.d
5252
directory as custom.conf file.
5353
type: string
54+
databaseAccount:
55+
default: aodh
56+
description: DatabaseAccount - optional MariaDBAccount CR
57+
name used for aodh DB, defaults to aodh
58+
type: string
5459
databaseInstance:
5560
description: MariaDB instance name Right now required by the
5661
maridb-operator to get the credentials from the instance
5762
to create the DB Might not be required in future
5863
type: string
59-
databaseUser:
60-
default: aodh
61-
description: Database user name Needed to connect to a database
62-
used by aodh
63-
type: string
6464
defaultConfigOverwrite:
6565
additionalProperties:
6666
type: string
@@ -269,7 +269,6 @@ spec:
269269
passwordSelector:
270270
default:
271271
aodhService: AodhPassword
272-
database: AodhDatabasePassword
273272
description: PasswordSelectors - Selectors to identify the
274273
service from the Secret
275274
properties:
@@ -278,11 +277,6 @@ spec:
278277
description: AodhService - Selector to get the aodh service
279278
password from the Secret
280279
type: string
281-
database:
282-
default: AodhDatabasePassword
283-
description: Database - Selector to get the aodh database
284-
user password from the Secret
285-
type: string
286280
service:
287281
default: CeilometerPassword
288282
description: Service - Selector to get the ceilometer
@@ -417,11 +411,6 @@ spec:
417411
description: AodhService - Selector to get the aodh service
418412
password from the Secret
419413
type: string
420-
database:
421-
default: AodhDatabasePassword
422-
description: Database - Selector to get the aodh database
423-
user password from the Secret
424-
type: string
425414
service:
426415
default: CeilometerPassword
427416
description: Service - Selector to get the ceilometer service

config/samples/telemetry_v1beta1_autoscaling.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ spec:
1212
aodh:
1313
secret: osp-secret
1414
passwordSelectors:
15-
databaseUser: aodh
15+
databaseAccount: aodh
1616
databaseInstance: openstack
1717
memcachedInstance: memcached

config/samples/telemetry_v1beta1_autoscaling_tls.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ spec:
1212
aodh:
1313
secret: osp-secret
1414
passwordSelectors:
15-
databaseUser: aodh
15+
databaseAccount: aodh
1616
databaseInstance: openstack
1717
memcachedInstance: memcached
1818
tls:

0 commit comments

Comments
 (0)