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

implement seed mechanism #4

Merged
merged 14 commits into from
Jun 7, 2024
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ WIP - Work in Progress
There is still a some work to be done on this project. The current status is that the controller is able to provision and deprovision MySQL databases. But there is still a lot of work to be done to make it production ready.

- [x] Setup e2e tests
- [x] Provision MySQL databases (basic) - no support for additional users, seeding, etc.
- [x] Provision MySQL databases (basic + seeding) - no support for additional users etc.
- [x] Deprovision MySQL databases
- [x] Provision PostgreSQL databases
- [x] Deprovision PostgreSQL databases
Expand Down Expand Up @@ -53,6 +53,7 @@ Key Features:
- Utilizes native Kubernetes secret resources for storing database credentials and connection details.
- Pooling and Disabling Providers: Supports adding new providers to a pool and marking providers as disabled or unable to deprovision.
- Migration Support: Offers mechanisms to migrate consumers between providers seamlessly.
- Able to reusing existing databases by using a seed secret to populate the database with data.

## Custom Resource Definitions

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ kind: DatabaseRequest
metadata:
labels:
app.kubernetes.io/name: databaserequest
app.kubernetes.io/instance: databaserequest-sample
app.kubernetes.io/instance: databaserequest-seed-sample
app.kubernetes.io/part-of: dbaas-controller
app.kubernetes.io/managed-by: kustomize
app.kubernetes.io/created-by: dbaas-controller
name: databaserequest-sample
name: databaserequest-seed-sample
spec:
name: seed-mysql-db
name: first-seed-db
seed:
name: seed-mysql-secret
namespace: default
Expand Down
17 changes: 17 additions & 0 deletions config/samples/crd_v1alpha1_seed_databaserequest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: crd.lagoon.sh/v1alpha1
kind: DatabaseRequest
metadata:
labels:
app.kubernetes.io/name: seed-databaserequest
app.kubernetes.io/instance: seed-databaserequest-sample
app.kubernetes.io/part-of: dbaas-controller
app.kubernetes.io/managed-by: kustomize
app.kubernetes.io/created-by: dbaas-controller
name: seed-databaserequest-sample
spec:
seed:
name: mysql-seed-secret
namespace: default
name: seed-mysql-db
scope: development
type: mysql
Loading