Skip to content

Commit

Permalink
migrate from databaseUsername to databaseAccount
Browse files Browse the repository at this point in the history
  • Loading branch information
zzzeek committed Feb 12, 2024
1 parent 5b06cbf commit 9a39fa2
Show file tree
Hide file tree
Showing 38 changed files with 500 additions and 307 deletions.
24 changes: 12 additions & 12 deletions api/bases/nova.openstack.org_nova.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@ spec:
spec:
description: NovaSpec defines the desired state of Nova
properties:
apiDatabaseAccount:
default: nova-api
description: APIDatabaseAccount - MariaDBAccount to use when accessing
the API DB
type: string
apiDatabaseInstance:
default: openstack
description: APIDatabaseInstance is the name of the MariaDB CR to
select the DB Service instance used for the Nova API DB.
type: string
apiDatabaseUser:
default: nova_api
description: APIDatabaseUser - username to use when accessing the
API DB
type: string
apiMessageBusInstance:
default: rabbitmq
description: APIMessageBusInstance is the name of the RabbitMqCluster
Expand Down Expand Up @@ -360,16 +360,16 @@ spec:
description: NovaCellTemplate defines the input parameters specified
by the user to create a NovaCell via higher level CRDs.
properties:
cellDatabaseAccount:
description: CellDatabaseAccount - MariaDBAccount to use when
accessing the give cell DB
type: string
cellDatabaseInstance:
default: openstack
description: CellDatabaseInstance is the name of the MariaDB
CR to select the DB Service instance used as the DB of this
cell.
type: string
cellDatabaseUser:
description: CellDatabaseUser - username to use when accessing
the give cell DB
type: string
cellMessageBusInstance:
default: rabbitmq
description: CellMessageBusInstance is the name of the RabbitMqCluster
Expand Down Expand Up @@ -1205,16 +1205,16 @@ spec:
type: string
type: object
required:
- cellDatabaseUser
- cellDatabaseAccount
- hasAPIAccess
type: object
default:
cell0:
cellDatabaseUser: nova_cell0
cellDatabaseAccount: nova-cell0
hasAPIAccess: true
cell1:
cellDatabaseAccount: nova-cell1
cellDatabaseInstance: openstack-cell1
cellDatabaseUser: nova_cell1
cellMessageBusInstance: rabbitmq-cell1
hasAPIAccess: true
description: Cells is a mapping of cell names to NovaCellTemplate
Expand Down
18 changes: 9 additions & 9 deletions api/bases/nova.openstack.org_novaapis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,24 +48,24 @@ spec:
spec:
description: NovaAPISpec defines the desired state of NovaAPI
properties:
apiDatabaseAccount:
default: nova-api
description: APIDatabaseAccount - MariaDBAccount to use when accessing
the API DB
type: string
apiDatabaseHostname:
description: APIDatabaseHostname - hostname to use when accessing
the API DB
type: string
apiDatabaseUser:
default: nova_api
description: APIDatabaseUser - username to use when accessing the
API DB
cell0DatabaseAccount:
default: nova-cell0
description: APIDatabaseAccount - MariaDBAccount to use when accessing
the cell0 DB
type: string
cell0DatabaseHostname:
description: APIDatabaseHostname - hostname to use when accessing
the cell0 DB
type: string
cell0DatabaseUser:
default: nova_cell0
description: APIDatabaseUser - username to use when accessing the
cell0 DB
type: string
containerImage:
description: The service specific Container Image URL (will be set
to environmental default if empty)
Expand Down
16 changes: 8 additions & 8 deletions api/bases/nova.openstack.org_novacells.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,26 +35,26 @@ spec:
spec:
description: NovaCellSpec defines the desired state of NovaCell
properties:
apiDatabaseAccount:
default: nova
description: APIDatabaseAccount - MariaDBAccount to use when accessing
the API DB
type: string
apiDatabaseHostname:
description: 'APIDatabaseHostname - hostname to use when accessing
the API DB. If not provided then up-calls will be disabled. This
filed is Required for cell0. TODO(gibi): Add a webhook to validate
cell0 constraint'
type: string
apiDatabaseUser:
cellDatabaseAccount:
default: nova
description: APIDatabaseUser - username to use when accessing the
API DB
description: CellDatabaseAccount - MariaDBAccount to use when accessing
the cell DB
type: string
cellDatabaseHostname:
description: CellDatabaseHostname - hostname to use when accessing
the cell DB
type: string
cellDatabaseUser:
default: nova
description: CellDatabaseUser - username to use when accessing the
cell DB
type: string
cellName:
description: CellName is the name of the Nova Cell. The value "cell0"
has a special meaning. The "cell0" Cell cannot have compute nodes
Expand Down
16 changes: 8 additions & 8 deletions api/bases/nova.openstack.org_novaconductors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,26 +48,26 @@ spec:
spec:
description: NovaConductorSpec defines the desired state of NovaConductor
properties:
apiDatabaseAccount:
default: nova
description: APIDatabaseAccount - MariaDBAccount to use when accessing
the API DB
type: string
apiDatabaseHostname:
description: 'APIDatabaseHostname - hostname to use when accessing
the API DB. If not provided then up-calls will be disabled. This
filed is Required for cell0. TODO(gibi): Add a webhook to validate
cell0 constraint'
type: string
apiDatabaseUser:
cellDatabaseAccount:
default: nova
description: APIDatabaseUser - username to use when accessing the
API DB
description: CellDatabaseAccount - MariaDBAccount to use when accessing
the cell DB
type: string
cellDatabaseHostname:
description: 'NOTE(gibi): This should be Required, see notes in KeystoneAuthURL
CellDatabaseHostname - hostname to use when accessing the cell DB'
type: string
cellDatabaseUser:
default: nova
description: CellDatabaseUser - username to use when accessing the
cell DB
type: string
cellName:
description: CellName is the name of the Nova Cell this conductor
belongs to.
Expand Down
18 changes: 9 additions & 9 deletions api/bases/nova.openstack.org_novametadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,27 +48,27 @@ spec:
spec:
description: NovaMetadataSpec defines the desired state of NovaMetadata
properties:
apiDatabaseAccount:
default: nova-api
description: APIDatabaseAccount - MariaDBAccount to use when accessing
the API DB
type: string
apiDatabaseHostname:
description: 'APIDatabaseHostname - hostname to use when accessing
the API DB. This filed is Required if the CellName is not provided
TODO(gibi): Add a webhook to validate the CellName constraint'
type: string
apiDatabaseUser:
default: nova_api
description: APIDatabaseUser - username to use when accessing the
API DB
cellDatabaseAccount:
default: nova
description: CellDatabaseAccount - MariaDBAccount to use when accessing
the cell DB
type: string
cellDatabaseHostname:
description: 'CellDatabaseHostname - hostname to use when accessing
the cell DB This is unused if CellName is not provided. But if it
is provided then CellDatabaseHostName is also Required. TODO(gibi):
add webhook to validate this CellName constraint'
type: string
cellDatabaseUser:
default: nova
description: CellDatabaseUser - username to use when accessing the
cell DB
type: string
cellName:
description: CellName is the name of the Nova Cell this metadata service
belongs to. If not provided then the metadata serving every cells
Expand Down
10 changes: 5 additions & 5 deletions api/bases/nova.openstack.org_novanovncproxies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ spec:
spec:
description: NovaNoVNCProxySpec defines the desired state of NovaNoVNCProxy
properties:
cellDatabaseAccount:
default: nova
description: CellDatabaseAccount - MariaDBAccount to use when accessing
the cell DB
type: string
cellDatabaseHostname:
description: CellDatabaseHostname - hostname to use when accessing
the cell DB
type: string
cellDatabaseUser:
default: nova
description: CellDatabaseUser - username to use when accessing the
cell DB
type: string
cellName:
description: CellName is the name of the Nova Cell this novncproxy
belongs to.
Expand Down
18 changes: 9 additions & 9 deletions api/bases/nova.openstack.org_novaschedulers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,24 +48,24 @@ spec:
spec:
description: NovaSchedulerSpec defines the desired state of NovaScheduler
properties:
apiDatabaseAccount:
default: nova-api
description: APIDatabaseAccount - MariaDBAccount to use when accessing
the API DB
type: string
apiDatabaseHostname:
description: APIDatabaseHostname - hostname to use when accessing
the API DB
type: string
apiDatabaseUser:
default: nova_api
description: APIDatabaseUser - username to use when accessing the
API DB
cell0DatabaseAccount:
default: nova_cell0
description: Cell0DatabaseAccount - MariaDBAccount to use when accessing
the cell0 DB
type: string
cell0DatabaseHostname:
description: Cell0DatabaseHostname - hostname to use when accessing
the cell0 DB
type: string
cell0DatabaseUser:
default: nova_cell0
description: Cell0DatabaseUser - username to use when accessing the
cell0 DB
type: string
containerImage:
description: The service specific Container Image URL (will be set
to environmental default if empty)
Expand Down
8 changes: 4 additions & 4 deletions api/v1beta1/nova_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ type NovaSpec struct {
APIMessageBusInstance string `json:"apiMessageBusInstance"`

// +kubebuilder:validation:Optional
// +kubebuilder:default={cell0: {cellDatabaseUser: nova_cell0, hasAPIAccess: true}, cell1: {cellDatabaseUser: nova_cell1, cellDatabaseInstance: openstack-cell1, cellMessageBusInstance: rabbitmq-cell1, hasAPIAccess: true}}
// +kubebuilder:default={cell0: {cellDatabaseAccount: nova-cell0, hasAPIAccess: true}, cell1: {cellDatabaseAccount: nova-cell1, cellDatabaseInstance: openstack-cell1, cellMessageBusInstance: rabbitmq-cell1, hasAPIAccess: true}}
// Cells is a mapping of cell names to NovaCellTemplate objects defining
// the cells in the deployment. The "cell0" cell is a mandatory cell in
// every deployment. Moreover any real deployment needs at least one
Expand All @@ -62,9 +62,9 @@ type NovaSpec struct {
ServiceUser string `json:"serviceUser"`

// +kubebuilder:validation:Optional
// +kubebuilder:default="nova_api"
// APIDatabaseUser - username to use when accessing the API DB
APIDatabaseUser string `json:"apiDatabaseUser"`
// +kubebuilder:default="nova-api"
// APIDatabaseAccount - MariaDBAccount to use when accessing the API DB
APIDatabaseAccount string `json:"apiDatabaseAccount"`

// +kubebuilder:validation:Required
// Secret is the name of the Secret instance containing password
Expand Down
12 changes: 6 additions & 6 deletions api/v1beta1/novaapi_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,18 +116,18 @@ type NovaAPISpec struct {
KeystonePublicAuthURL string `json:"keystonePublicAuthURL"`

// +kubebuilder:validation:Optional
// +kubebuilder:default="nova_api"
// APIDatabaseUser - username to use when accessing the API DB
APIDatabaseUser string `json:"apiDatabaseUser"`
// +kubebuilder:default="nova-api"
// APIDatabaseAccount - MariaDBAccount to use when accessing the API DB
APIDatabaseAccount string `json:"apiDatabaseAccount"`

// +kubebuilder:validation:Required
// APIDatabaseHostname - hostname to use when accessing the API DB
APIDatabaseHostname string `json:"apiDatabaseHostname"`

// +kubebuilder:validation:Optional
// +kubebuilder:default="nova_cell0"
// APIDatabaseUser - username to use when accessing the cell0 DB
Cell0DatabaseUser string `json:"cell0DatabaseUser"`
// +kubebuilder:default="nova-cell0"
// APIDatabaseAccount - MariaDBAccount to use when accessing the cell0 DB
Cell0DatabaseAccount string `json:"cell0DatabaseAccount"`

// +kubebuilder:validation:Required
// APIDatabaseHostname - hostname to use when accessing the cell0 DB
Expand Down
12 changes: 6 additions & 6 deletions api/v1beta1/novacell_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ type NovaCellTemplate struct {
CellDatabaseInstance string `json:"cellDatabaseInstance"`

// +kubebuilder:validation:Required
// CellDatabaseUser - username to use when accessing the give cell DB
CellDatabaseUser string `json:"cellDatabaseUser"`
// CellDatabaseAccount - MariaDBAccount to use when accessing the give cell DB
CellDatabaseAccount string `json:"cellDatabaseAccount"`

// +kubebuilder:validation:Optional
// +kubebuilder:default=rabbitmq
Expand Down Expand Up @@ -128,8 +128,8 @@ type NovaCellSpec struct {

// +kubebuilder:validation:Optional
// +kubebuilder:default=nova
// APIDatabaseUser - username to use when accessing the API DB
APIDatabaseUser string `json:"apiDatabaseUser"`
// APIDatabaseAccount - MariaDBAccount to use when accessing the API DB
APIDatabaseAccount string `json:"apiDatabaseAccount"`

// +kubebuilder:validation:Optional
// APIDatabaseHostname - hostname to use when accessing the API DB. If not
Expand All @@ -140,8 +140,8 @@ type NovaCellSpec struct {

// +kubebuilder:validation:Optional
// +kubebuilder:default=nova
// CellDatabaseUser - username to use when accessing the cell DB
CellDatabaseUser string `json:"cellDatabaseUser"`
// CellDatabaseAccount - MariaDBAccount to use when accessing the cell DB
CellDatabaseAccount string `json:"cellDatabaseAccount"`

// +kubebuilder:validation:Required
// CellDatabaseHostname - hostname to use when accessing the cell DB
Expand Down
12 changes: 6 additions & 6 deletions api/v1beta1/novaconductor_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ type NovaConductorSpec struct {

// +kubebuilder:validation:Optional
// +kubebuilder:default=nova
// APIDatabaseUser - username to use when accessing the API DB
APIDatabaseUser string `json:"apiDatabaseUser"`
// APIDatabaseAccount - MariaDBAccount to use when accessing the API DB
APIDatabaseAccount string `json:"apiDatabaseAccount"`

// +kubebuilder:validation:Optional
// APIDatabaseHostname - hostname to use when accessing the API DB. If not
Expand All @@ -102,8 +102,8 @@ type NovaConductorSpec struct {

// +kubebuilder:validation:Optional
// +kubebuilder:default=nova
// CellDatabaseUser - username to use when accessing the cell DB
CellDatabaseUser string `json:"cellDatabaseUser"`
// CellDatabaseAccount - MariaDBAccount to use when accessing the cell DB
CellDatabaseAccount string `json:"cellDatabaseAccount"`

// +kubebuilder:validation:Optional
// NOTE(gibi): This should be Required, see notes in KeystoneAuthURL
Expand Down Expand Up @@ -188,9 +188,9 @@ func NewNovaConductorSpec(
CellName: novaCell.CellName,
Secret: novaCell.Secret,
CellDatabaseHostname: novaCell.CellDatabaseHostname,
CellDatabaseUser: novaCell.CellDatabaseUser,
CellDatabaseAccount: novaCell.CellDatabaseAccount,
APIDatabaseHostname: novaCell.APIDatabaseHostname,
APIDatabaseUser: novaCell.APIDatabaseUser,
APIDatabaseAccount: novaCell.APIDatabaseAccount,
NovaServiceBase: NovaServiceBase(novaCell.ConductorServiceTemplate),
KeystoneAuthURL: novaCell.KeystoneAuthURL,
ServiceUser: novaCell.ServiceUser,
Expand Down
Loading

0 comments on commit 9a39fa2

Please sign in to comment.