Skip to content

Commit

Permalink
Refactor: Move service resources into a standalone deployment
Browse files Browse the repository at this point in the history
This change moves service resources like mariadb and rabbitmq for our openstack
services into a standalone deployment. This will ensure that we've good
separation between required resources and our openstack deployments.

Signed-off-by: Kevin Carter <[email protected]>
  • Loading branch information
cloudnull committed Jan 30, 2024
1 parent 218ec62 commit 73f8926
Show file tree
Hide file tree
Showing 36 changed files with 125 additions and 16 deletions.
3 changes: 3 additions & 0 deletions kustomize/cinder-resources/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
resources:
- cinder-mariadb-database.yaml
- cinder-rabbitmq-queue.yaml
2 changes: 0 additions & 2 deletions kustomize/cinder/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
resources:
- cinder-mariadb-database.yaml
- cinder-rabbitmq-queue.yaml
- all.yaml
- hpa-cinder-scheduler.yaml
- hpa-cinder-api.yaml
3 changes: 3 additions & 0 deletions kustomize/glance-resources/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
resources:
- glance-mariadb-database.yaml
- glance-rabbitmq-queue.yaml
2 changes: 0 additions & 2 deletions kustomize/glance/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
resources:
- glance-mariadb-database.yaml
- glance-rabbitmq-queue.yaml
- all.yaml
- hpa-glance-api.yaml

Expand Down
3 changes: 3 additions & 0 deletions kustomize/heat-resources/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
resources:
- heat-mariadb-database.yaml
- heat-rabbitmq-queue.yaml
2 changes: 0 additions & 2 deletions kustomize/heat/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
resources:
- heat-mariadb-database.yaml
- heat-rabbitmq-queue.yaml
- all.yaml
- hpa-heat-api.yaml
- hpa-heat-cfn.yaml
Expand Down
2 changes: 2 additions & 0 deletions kustomize/horizon-resources/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
resources:
- horizon-mariadb-database.yaml
1 change: 0 additions & 1 deletion kustomize/horizon/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
resources:
- horizon-mariadb-database.yaml
- all.yaml
- hpa-horizon-api.yaml
3 changes: 3 additions & 0 deletions kustomize/keystone-resources/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
resources:
- keystone-mariadb-database.yaml
- keystone-rabbitmq-queue.yaml
2 changes: 0 additions & 2 deletions kustomize/keystone/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
resources:
- keystone-mariadb-database.yaml
- keystone-rabbitmq-queue.yaml
- all.yaml
- hpa-keystone-api.yaml
3 changes: 3 additions & 0 deletions kustomize/neutron-resources/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
resources:
- neutron-mariadb-database.yaml
- neutron-rabbitmq-queue.yaml
2 changes: 0 additions & 2 deletions kustomize/neutron/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
resources:
- neutron-mariadb-database.yaml
- neutron-rabbitmq-queue.yaml
- all.yaml
- hpa-neutron-server.yaml

Expand Down
3 changes: 3 additions & 0 deletions kustomize/nova-resources/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
resources:
- nova-mariadb-database.yaml
- nova-rabbitmq-queue.yaml
2 changes: 0 additions & 2 deletions kustomize/nova/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
resources:
- nova-mariadb-database.yaml
- nova-rabbitmq-queue.yaml
- all.yaml
- hpa-nova-api-metadata.yaml
- hpa-nova-api-osapi.yaml
Expand Down
3 changes: 3 additions & 0 deletions kustomize/octavia-resources/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
resources:
- octavia-mariadb-database.yaml
- octavia-rabbitmq-queue.yaml
2 changes: 0 additions & 2 deletions kustomize/octavia/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
resources:
- octavia-mariadb-database.yaml
- octavia-rabbitmq-queue.yaml
- all.yaml
- hpa-octavia-api.yaml
- hpa-octavia-worker.yaml
Expand Down
2 changes: 2 additions & 0 deletions kustomize/placement-resources/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
resources:
- placement-mariadb-database.yaml
49 changes: 49 additions & 0 deletions kustomize/placement-resources/base/placement-mariadb-database.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
apiVersion: mariadb.mmontes.io/v1alpha1
kind: Database
metadata:
name: placement
namespace: openstack
spec:
# If you want the database to be created with a different name than the resource name
# name: data-custom
mariaDbRef:
name: mariadb-galera
characterSet: utf8
collate: utf8_general_ci
retryInterval: 5s
---
apiVersion: mariadb.mmontes.io/v1alpha1
kind: User
metadata:
name: placement
namespace: openstack
spec:
# If you want the user to be created with a different name than the resource name
# name: user-custom
mariaDbRef:
name: mariadb-galera
passwordSecretKeyRef:
name: placement-db-password
key: password
# This field is immutable and defaults to 10, 0 means unlimited.
maxUserConnections: 0
host: "%"
retryInterval: 5s
---
apiVersion: mariadb.mmontes.io/v1alpha1
kind: Grant
metadata:
name: placement-grant
namespace: openstack
spec:
mariaDbRef:
name: mariadb-galera
privileges:
- "ALL"
database: "placement"
table: "*"
username: placement
grantOption: true
host: "%"
retryInterval: 5s
1 change: 0 additions & 1 deletion kustomize/placement/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
resources:
- placement-mariadb-database.yaml
- all.yaml
- hpa-placement-api.yaml
2 changes: 2 additions & 0 deletions kustomize/skyline-resources/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
resources:
- skyline-mariadb-database.yaml
49 changes: 49 additions & 0 deletions kustomize/skyline-resources/base/skyline-mariadb-database.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
apiVersion: mariadb.mmontes.io/v1alpha1
kind: Database
metadata:
name: skyline
namespace: openstack
spec:
# If you want the database to be created with a different name than the resource name
# name: data-custom
mariaDbRef:
name: mariadb-galera
characterSet: utf8
collate: utf8_general_ci
retryInterval: 5s
---
apiVersion: mariadb.mmontes.io/v1alpha1
kind: User
metadata:
name: skyline
namespace: openstack
spec:
# If you want the user to be created with a different name than the resource name
# name: user-custom
mariaDbRef:
name: mariadb-galera
passwordSecretKeyRef:
name: skyline-apiserver-secrets
key: db-password
# This field is immutable and defaults to 10, 0 means unlimited.
maxUserConnections: 0
host: "%"
retryInterval: 5s
---
apiVersion: mariadb.mmontes.io/v1alpha1
kind: Grant
metadata:
name: skyline-grant
namespace: openstack
spec:
mariaDbRef:
name: mariadb-galera
privileges:
- "ALL"
database: "skyline"
table: "*"
username: skyline
grantOption: true
host: "%"
retryInterval: 5s

0 comments on commit 73f8926

Please sign in to comment.