Skip to content

Commit

Permalink
Merge pull request #4 from uselagoon/database-request-crd3
Browse files Browse the repository at this point in the history
implement seed mechanism
  • Loading branch information
shreddedbacon authored Jun 7, 2024
2 parents a49a998 + 7202108 commit 378d037
Show file tree
Hide file tree
Showing 14 changed files with 688 additions and 114 deletions.
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

0 comments on commit 378d037

Please sign in to comment.