Skip to content

Commit

Permalink
understackdb: handle db name discrepancies
Browse files Browse the repository at this point in the history
In our current setup, the Kubernetes resource is called 'nova-api', but
the database name is 'nova_api'.
  • Loading branch information
skrobul committed Dec 5, 2024
1 parent 7fd7503 commit cffe683
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions helm-charts/understackdb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Helm chart to deploy MariaDB Database instances for Understack
| databases | list | databases for all Understack components (horizon, ironic, nova, neutron, keystone) | list of databases to create |
| databases[0].characterSet | string | `"utf8"` | database's character set |
| databases[0].collate | string | `"utf8_general_ci"` | database's collation |
| databases[0].dbname | string | value of `.name` is used if unspecified. | database name override (if different from metadata.name) |
| databases[0].instanceName | string | `"mariadb"` | name of the `MariaDB` cluster identifier (`.spec.metadata.name` on MariaDB resource) |
| databases[0].name | required | `"glance"` | database name |
| databases[0].namespace | string | openstack | namespace that `Database` record will be created in |
Expand Down
1 change: 1 addition & 0 deletions helm-charts/understackdb/templates/databases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ spec:
name: {{ $.Values.instanceName }}
waitForIt: true
characterSet: {{ .characterSet | default "utf8" }}
name: {{ .dbname | default .name }}
collate: {{ .collate | default "utf8_general_ci" }}
retryInterval: {{ .retryInterval | default "5s" }}
{{- with .extraConfig }}
Expand Down
5 changes: 5 additions & 0 deletions helm-charts/understackdb/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ databases:
# -- namespace that `Database` record will be created in
# @default -- openstack
namespace: openstack
# -- database name override (if different from metadata.name)
# @default -- value of `.name` is used if unspecified.
dbname:
# -- name of the `MariaDB` cluster identifier (`.spec.metadata.name` on MariaDB resource)
instanceName: mariadb
# -- database's character set
Expand All @@ -111,7 +114,9 @@ databases:
- name: neutron
- name: nova
- name: nova-api
dbname: nova_api
- name: nova-cell0
dbname: nova_cell0
- name: placement

# -- list of databases to create
Expand Down

0 comments on commit cffe683

Please sign in to comment.