{"id":24956695,"url":"https://github.com/doodlescheduling/db-controller","last_synced_at":"2026-04-09T19:03:34.780Z","repository":{"id":37858178,"uuid":"333062414","full_name":"DoodleScheduling/db-controller","owner":"DoodleScheduling","description":"Kubernetes Controller for managing databases and users","archived":false,"fork":false,"pushed_at":"2025-04-09T22:51:22.000Z","size":729,"stargazers_count":4,"open_issues_count":11,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-09T23:34:18.406Z","etag":null,"topics":["databases","kubernetes-controller","mongodb","postgresql","users"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DoodleScheduling.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-26T11:23:52.000Z","updated_at":"2025-04-03T10:39:33.000Z","dependencies_parsed_at":"2023-10-15T16:17:37.915Z","dependency_job_id":"d8243059-423f-45c6-bf75-693789d54868","html_url":"https://github.com/DoodleScheduling/db-controller","commit_stats":null,"previous_names":["doodlescheduling/db-controller","doodlescheduling/k8sdb-controller"],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DoodleScheduling%2Fdb-controller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DoodleScheduling%2Fdb-controller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DoodleScheduling%2Fdb-controller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DoodleScheduling%2Fdb-controller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DoodleScheduling","download_url":"https://codeload.github.com/DoodleScheduling/db-controller/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248278833,"owners_count":21077328,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["databases","kubernetes-controller","mongodb","postgresql","users"],"created_at":"2025-02-03T06:40:47.868Z","updated_at":"2026-04-09T19:03:33.504Z","avatar_url":"https://github.com/DoodleScheduling.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Database controller\n\n[![release](https://img.shields.io/github/release/DoodleScheduling/db-controller/all.svg)](https://github.com/DoodleScheduling/db-controller/releases)\n[![release](https://github.com/doodlescheduling/db-controller/actions/workflows/release.yaml/badge.svg)](https://github.com/doodlescheduling/db-controller/actions/workflows/release.yaml)\n[![report](https://goreportcard.com/badge/github.com/DoodleScheduling/db-controller)](https://goreportcard.com/report/github.com/DoodleScheduling/db-controller)\n[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/DoodleScheduling/growthbook-controller/badge)](https://api.securityscorecards.dev/projects/github.com/DoodleScheduling/growthbook-controller)\n[![Coverage Status](https://coveralls.io/repos/github/DoodleScheduling/db-controller/badge.svg?branch=master)](https://coveralls.io/github/DoodleScheduling/db-controller?branch=master)\n[![license](https://img.shields.io/github/license/DoodleScheduling/db-controller.svg)](https://github.com/DoodleScheduling/db-controller/blob/master/LICENSE)\n\nKubernetes Controller for database and user provisioning.\nCurrently the controller supports Postgres and MongoDB (as well as MongoDB Atlas).\nUsing the controller you can deploy databases and users defined as code on top of kubernetes.\nHow to deploy database servers is out of scope of this project.\n\n## Example for PostgreSQL\n\nExample of how to deploy a Postgres database called my-app as well as a user to the server localhost:5432.\n\n```yaml\napiVersion: v1\nkind: Secret\nmetadata:\n  name: postgresql-admin-credentials\n  namespace: default\ndata:\n  password: MTIzNA==\n  username: MTIzNA==\n---\napiVersion: dbprovisioning.infra.doodle.com/v1beta1\nkind: PostgreSQLDatabase\nmetadata:\n  name: my-app\n  namespace: default\nspec:\n  address: \"postgres://localhost:5432\"\n  rootSecret:\n    name: postgresql-admin-credentials\n---\napiVersion: dbprovisioning.infra.doodle.com/v1beta1\nkind: PostgreSQLUser\nmetadata:\n  name: my-app\n  namespace: default\nspec:\n  database:\n    name: my-app\n  credentials:\n    name: my-app-postgresql-credentials\n---\napiVersion: v1\nkind: Secret\nmetadata:\n  name: my-app-postgresql-credentials\n  namespace: default\ndata:\n  password: MTIzNA==\n  username: MTIzNA==\n```\n\n## Example for MongoDB\n\nExample of how to deploy a MongoDB database called my-app as well as a user to the server localhost:5432.\n\n```yaml\napiVersion: v1\nkind: Secret\nmetadata:\n  name: mongodb-admin-credentials\n  namespace: default\ndata:\n  password: MTIzNA==\n  username: MTIzNA==\n---\napiVersion: dbprovisioning.infra.doodle.com/v1beta1\nkind: MongoDBDatabase\nmetadata:\n  name: my-app\n  namespace: default\nspec:\n  address: \"mongodb://localhost:27017\"\n  rootSecret:\n    name: mongodb-admin-credentials\n---\napiVersion: dbprovisioning.infra.doodle.com/v1beta1\nkind: MongoDBUser\nmetadata:\n  name: my-app\n  namespace: default\nspec:\n  database:\n    name: my-app-mongodb-credentials\n  credentials:\n    name: my-app-mongodb\n  roles:\n    - name: readWrite\n---\napiVersion: v1\nkind: Secret\nmetadata:\n  name: my-app-mongodb-credentials\n  namespace: default\ndata:\n  password: MTIzNA==\n  username: MTIzNA==\n```\n\n## Setup\n\n### Helm chart\n\nPlease see [chart/db-controller](https://github.com/DoodleScheduling/db-controller) for the helm chart docs.\n\n### Manifests/kustomize\n\nAlternatively you may get the bundled manifests in each release to deploy it using kustomize or use them directly.\n\n## Configure the controller\n\nThe controller can be configured using cmd args:\n```\n--concurrent int                            The number of concurrent reconciles. (default 4)\n--enable-leader-election                    Enable leader election for controller manager. Enabling this will ensure there is only one active controller manager.\n--graceful-shutdown-timeout duration        The duration given to the reconciler to finish before forcibly stopping. (default 10m0s)\n--health-addr string                        The address the health endpoint binds to. (default \":9557\")\n--insecure-kubeconfig-exec                  Allow use of the user.exec section in kubeconfigs provided for remote apply.\n--insecure-kubeconfig-tls                   Allow that kubeconfigs provided for remote apply can disable TLS verification.\n--kube-api-burst int                        The maximum burst queries-per-second of requests sent to the Kubernetes API. (default 300)\n--kube-api-qps float32                      The maximum queries-per-second of requests sent to the Kubernetes API. (default 50)\n--leader-election-lease-duration duration   Interval at which non-leader candidates will wait to force acquire leadership (duration string). (default 35s)\n--leader-election-release-on-cancel         Defines if the leader should step down voluntarily on controller manager shutdown. (default true)\n--leader-election-renew-deadline duration   Duration that the leading controller manager will retry refreshing leadership before giving up (duration string). (default 30s)\n--leader-election-retry-period duration     Duration the LeaderElector clients should wait between tries of actions (duration string). (default 5s)\n--log-encoding string                       Log encoding format. Can be 'json' or 'console'. (default \"json\")\n--log-level string                          Log verbosity level. Can be one of 'trace', 'debug', 'info', 'error'. (default \"info\")\n--max-retry-delay duration                  The maximum amount of time for which an object being reconciled will have to wait before a retry. (default 15m0s)\n--metrics-addr string                       The address the metric endpoint binds to. (default \":9556\")\n--min-retry-delay duration                  The minimum amount of time for which an object being reconciled will have to wait before a retry. (default 750ms)\n--watch-all-namespaces                      Watch for resources in all namespaces, if set to false it will only watch the runtime namespace. (default true)\n--watch-label-selector string               Watch for resources with matching labels e.g. 'sharding.fluxcd.io/shard=shard1'.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoodlescheduling%2Fdb-controller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdoodlescheduling%2Fdb-controller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoodlescheduling%2Fdb-controller/lists"}