Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

migrate from databaseUsername to databaseAccount and fully use MariaDBAccount #426

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions api/bases/glance.openstack.org_glanceapis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ spec:
items:
type: string
type: array
databaseHostname:
type: string
databaseUser:
databaseAccount:
default: glance
type: string
databaseHostname:
type: string
extraMounts:
items:
properties:
Expand Down Expand Up @@ -895,12 +895,8 @@ spec:
type: object
passwordSelectors:
default:
database: GlanceDatabasePassword
service: GlancePassword
properties:
database:
default: GlanceDatabasePassword
type: string
service:
default: GlancePassword
type: string
Expand Down
10 changes: 3 additions & 7 deletions api/bases/glance.openstack.org_glances.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ spec:
items:
type: string
type: array
databaseInstance:
type: string
databaseUser:
databaseAccount:
default: glance
type: string
databaseInstance:
type: string
dbPurge:
properties:
age:
Expand Down Expand Up @@ -998,12 +998,8 @@ spec:
type: object
passwordSelectors:
default:
database: GlanceDatabasePassword
service: GlancePassword
properties:
database:
default: GlanceDatabasePassword
type: string
service:
default: GlancePassword
type: string
Expand Down
16 changes: 5 additions & 11 deletions api/v1beta1/glance_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,21 @@ type GlanceSpecCore struct {

// +kubebuilder:validation:Optional
// +kubebuilder:default=glance
// DatabaseUser - optional username used for glance DB, defaults to glance
// TODO: -> implement needs work in mariadb-operator, right now only glance
DatabaseUser string `json:"databaseUser"`
// DatabaseAccount - name of MariaDBAccount which will be used to connect.
DatabaseAccount string `json:"databaseAccount"`
zzzeek marked this conversation as resolved.
Show resolved Hide resolved

// +kubebuilder:validation:Required
// +kubebuilder:default=memcached
// Memcached instance name.
MemcachedInstance string `json:"memcachedInstance"`

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

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

Expand Down Expand Up @@ -139,11 +139,6 @@ type GlanceSpec struct {

// PasswordSelector to identify the DB and AdminUser password from the Secret
type PasswordSelector struct {
// +kubebuilder:validation:Optional
// +kubebuilder:default="GlanceDatabasePassword"
// Database - Selector to get the glance database user password from the Secret
// TODO: not used, need change in mariadb-operator
Database string `json:"database"`
// +kubebuilder:validation:Optional
// +kubebuilder:default="GlancePassword"
// Service - Selector to get the glance service password from the Secret
Expand All @@ -163,7 +158,6 @@ type DBPurge struct {
Schedule string `json:"schedule"`
}


// GlanceStatus defines the observed state of Glance
type GlanceStatus struct {
// Map of hashes to track e.g. job status
Expand Down
7 changes: 3 additions & 4 deletions api/v1beta1/glanceapi_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,15 @@ type GlanceAPISpec struct {

// +kubebuilder:validation:Optional
// +kubebuilder:default=glance
// DatabaseUser - optional username used for glance DB, defaults to glance
// TODO: -> implement needs work in mariadb-operator, right now only glance
DatabaseUser string `json:"databaseUser"`
// DatabaseAccount - name of MariaDBAccount which will be used to connect.
DatabaseAccount string `json:"databaseAccount"`

// +kubebuilder:validation:Required
// Secret containing OpenStack password information for glance AdminPassword
Secret string `json:"secret"`

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

Expand Down
10 changes: 3 additions & 7 deletions config/crd/bases/glance.openstack.org_glanceapis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ spec:
items:
type: string
type: array
databaseHostname:
type: string
databaseUser:
databaseAccount:
default: glance
type: string
databaseHostname:
type: string
extraMounts:
items:
properties:
Expand Down Expand Up @@ -895,12 +895,8 @@ spec:
type: object
passwordSelectors:
default:
database: GlanceDatabasePassword
service: GlancePassword
properties:
database:
default: GlanceDatabasePassword
type: string
service:
default: GlancePassword
type: string
Expand Down
10 changes: 3 additions & 7 deletions config/crd/bases/glance.openstack.org_glances.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ spec:
items:
type: string
type: array
databaseInstance:
type: string
databaseUser:
databaseAccount:
default: glance
type: string
databaseInstance:
type: string
dbPurge:
properties:
age:
Expand Down Expand Up @@ -998,12 +998,8 @@ spec:
type: object
passwordSelectors:
default:
database: GlanceDatabasePassword
service: GlancePassword
properties:
database:
default: GlanceDatabasePassword
type: string
service:
default: GlancePassword
type: string
Expand Down
2 changes: 1 addition & 1 deletion config/samples/backends/ceph/ceph.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
rbd_store_pool = images
rbd_store_user = openstack
databaseInstance: openstack
databaseUser: glance
databaseAccount: glance
secret: osp-secret
storageClass: ""
storageRequest: 1G
Expand Down
2 changes: 1 addition & 1 deletion config/samples/backends/multistore/multistore.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ spec:
swift_store_user = service:glance
swift_store_endpoint_type = internalURL
databaseInstance: openstack
databaseUser: glance
databaseAccount: glance
glanceAPIs:
default:
preserveJobs: false
Expand Down
2 changes: 1 addition & 1 deletion config/samples/glance_v1beta1_glance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ spec:
debug = true
enabled_backends=foo:bar,foo1:bar1
databaseInstance: openstack
databaseUser: glance
databaseAccount: glance
secret: osp-secret
storageClass: local-storage
storageRequest: 10G
2 changes: 1 addition & 1 deletion config/samples/glance_v1beta1_glanceapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spec:
here-foo-config
[foo1]
here-foo1-config
databaseUser: glance
databaseAccount: glance
databaseHostname: glance
preserveJobs: false
replicas: 1
Expand Down
2 changes: 1 addition & 1 deletion config/samples/image_cache/image-cache.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ spec:
store_description = "RBD backend"
rbd_store_pool = images
rbd_store_user = openstack
databaseUser: glance
databaseAccount: glance
glanceAPIs:
default:
preserveJobs: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ spec:
[image_conversion]
output_format = raw
databaseInstance: openstack
databaseUser: glance
databaseAccount: glance
glanceAPI:
preserveJobs: false
replicas: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ spec:
[image_import_opts]
image_import_plugins = [image_decompression]
databaseInstance: openstack
databaseUser: glance
databaseAccount: glance
glanceAPI:
preserveJobs: false
replicas: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ spec:
ignore_user_roles = admin,user1
inject = "property1":"value1","property2":"value2"
databaseInstance: openstack
databaseUser: glance
databaseAccount: glance
glanceAPI:
preserveJobs: false
replicas: 1
Expand Down
2 changes: 1 addition & 1 deletion config/samples/layout/base/glance_v1beta1_glance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ spec:
debug = true
enabled_backends=foo:bar
databaseInstance: openstack
databaseUser: glance
databaseAccount: glance
secret: osp-secret
storageClass: local-storage
storageRequest: 10G
2 changes: 1 addition & 1 deletion config/samples/layout/edge/glance_v1beta1_glance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
[DEFAULT]
debug = true
databaseInstance: openstack
databaseUser: glance
databaseAccount: glance
keystoneEndpoint: central
glanceAPIs:
central:
Expand Down
2 changes: 1 addition & 1 deletion config/samples/layout/multiple/glance_v1beta1_glance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
[DEFAULT]
debug = true
databaseInstance: openstack
databaseUser: glance
databaseAccount: glance
keystoneEndpoint: api1
glanceAPIs:
api1:
Expand Down
2 changes: 1 addition & 1 deletion config/samples/layout/single/glance_v1beta1_glance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
spec:
serviceUser: glance
databaseInstance: openstack
databaseUser: glance
databaseAccount: glance
keystoneEndpoint: default
customServiceConfig: |
[DEFAULT]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
spec:
serviceUser: glance
databaseInstance: openstack
databaseUser: glance
databaseAccount: glance
keystoneEndpoint: default
customServiceConfig: |
[DEFAULT]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ spec:
enforce_scope=true
enforce_new_defaults=true
databaseInstance: openstack
databaseUser: glance
databaseAccount: glance
glanceAPI:
preserveJobs: false
replicas: 1
Expand Down
2 changes: 1 addition & 1 deletion config/samples/quotas/glance_v1beta1_glance_quota.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
spec:
serviceUser: glance
databaseInstance: openstack
databaseUser: glance
databaseAccount: glance
keystoneEndpoint: default
glanceAPIs:
default:
Expand Down
Loading
Loading