Skip to content

Commit 987fd95

Browse files
Merge pull request #333 from zzzeek/integrate_oo_accounts
migrate from databaseUsername to databaseAccount and fully use MariaDBAccount
2 parents 4ecd4f5 + eb8e5ed commit 987fd95

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
@@ -267,7 +267,6 @@ spec:
267267
passwordSelector:
268268
default:
269269
aodhService: AodhPassword
270-
database: AodhDatabasePassword
271270
description: PasswordSelectors - Selectors to identify the service
272271
from the Secret
273272
properties:
@@ -276,11 +275,6 @@ spec:
276275
description: AodhService - Selector to get the aodh service
277276
password from the Secret
278277
type: string
279-
database:
280-
default: AodhDatabasePassword
281-
description: Database - Selector to get the aodh database
282-
user password from the Secret
283-
type: string
284278
service:
285279
default: CeilometerPassword
286280
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
@@ -280,7 +280,6 @@ spec:
280280
passwordSelector:
281281
default:
282282
aodhService: AodhPassword
283-
database: AodhDatabasePassword
284283
description: PasswordSelectors - Selectors to identify the
285284
service from the Secret
286285
properties:
@@ -289,11 +288,6 @@ spec:
289288
description: AodhService - Selector to get the aodh service
290289
password from the Secret
291290
type: string
292-
database:
293-
default: AodhDatabasePassword
294-
description: Database - Selector to get the aodh database
295-
user password from the Secret
296-
type: string
297291
service:
298292
default: CeilometerPassword
299293
description: Service - Selector to get the ceilometer
@@ -428,11 +422,6 @@ spec:
428422
description: AodhService - Selector to get the aodh service
429423
password from the Secret
430424
type: string
431-
database:
432-
default: AodhDatabasePassword
433-
description: Database - Selector to get the aodh database
434-
user password from the Secret
435-
type: string
436425
service:
437426
default: CeilometerPassword
438427
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
@@ -267,7 +267,6 @@ spec:
267267
passwordSelector:
268268
default:
269269
aodhService: AodhPassword
270-
database: AodhDatabasePassword
271270
description: PasswordSelectors - Selectors to identify the service
272271
from the Secret
273272
properties:
@@ -276,11 +275,6 @@ spec:
276275
description: AodhService - Selector to get the aodh service
277276
password from the Secret
278277
type: string
279-
database:
280-
default: AodhDatabasePassword
281-
description: Database - Selector to get the aodh database
282-
user password from the Secret
283-
type: string
284278
service:
285279
default: CeilometerPassword
286280
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
@@ -280,7 +280,6 @@ spec:
280280
passwordSelector:
281281
default:
282282
aodhService: AodhPassword
283-
database: AodhDatabasePassword
284283
description: PasswordSelectors - Selectors to identify the
285284
service from the Secret
286285
properties:
@@ -289,11 +288,6 @@ spec:
289288
description: AodhService - Selector to get the aodh service
290289
password from the Secret
291290
type: string
292-
database:
293-
default: AodhDatabasePassword
294-
description: Database - Selector to get the aodh database
295-
user password from the Secret
296-
type: string
297291
service:
298292
default: CeilometerPassword
299293
description: Service - Selector to get the ceilometer
@@ -428,11 +422,6 @@ spec:
428422
description: AodhService - Selector to get the aodh service
429423
password from the Secret
430424
type: string
431-
database:
432-
default: AodhDatabasePassword
433-
description: Database - Selector to get the aodh database
434-
user password from the Secret
435-
type: string
436425
service:
437426
default: CeilometerPassword
438427
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)