{"id":13481013,"url":"https://github.com/kloeckner-i/db-operator","last_synced_at":"2025-04-09T13:07:21.119Z","repository":{"id":38105923,"uuid":"242085502","full_name":"kloeckner-i/db-operator","owner":"kloeckner-i","description":"The DB Operator creates databases and make them available in the cluster via Custom Resource.","archived":false,"fork":false,"pushed_at":"2024-07-12T07:19:13.000Z","size":1023,"stargazers_count":163,"open_issues_count":4,"forks_count":43,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-07T01:40:38.012Z","etag":null,"topics":["cloudsql","creating-databases","golang","google-cloud-sql","helm","k8s-operator","kubernetes","kubernetes-operator","kubernetes-operators","mysql","operator","postgres","postgresql"],"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/kloeckner-i.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-21T08:02:32.000Z","updated_at":"2025-02-05T13:24:06.000Z","dependencies_parsed_at":"2024-04-23T19:57:44.238Z","dependency_job_id":"eea1e21b-65fd-4b8e-b0f3-c198646f50b5","html_url":"https://github.com/kloeckner-i/db-operator","commit_stats":null,"previous_names":[],"tags_count":77,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kloeckner-i%2Fdb-operator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kloeckner-i%2Fdb-operator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kloeckner-i%2Fdb-operator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kloeckner-i%2Fdb-operator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kloeckner-i","download_url":"https://codeload.github.com/kloeckner-i/db-operator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248045231,"owners_count":21038553,"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":["cloudsql","creating-databases","golang","google-cloud-sql","helm","k8s-operator","kubernetes","kubernetes-operator","kubernetes-operators","mysql","operator","postgres","postgresql"],"created_at":"2024-07-31T17:00:47.641Z","updated_at":"2025-04-09T13:07:21.100Z","avatar_url":"https://github.com/kloeckner-i.png","language":"Go","funding_links":[],"categories":["Go","Repository is obsolete"],"sub_categories":["Awesome Operators in the Wild"],"readme":"# DB Operator\n\nThe DB Operator eases the pain of managing PostgreSQL and MySQL instances for applications running in Kubernetes. The Operator creates databases and make them available in the cluster via Custom Resource. It is designed to support the on demand creation of test environments in CI/CD pipelines.\n\n## Features\n\nDB Operator provides following features:\n\n* Create/Delete databases on the database server running outside/inside Kubernetes by creating `Database` custom resource;\n* Create Google Cloud SQL instances by creating `DbInstance` custom resource;\n* Automatically create backup `CronJob` with defined schedule (limited feature);\n\n## Documentations\n* [How it works](docs/howitworks.md) - a general overview and definitions\n* [Creating Instances](docs/creatinginstances.md) - make database instances available for the operator\n* [Creating Databases](docs/creatingdatabases.md) - creating databases in those instances\n* [Enabling regular Backup](docs/enablingbackup.md) - and schedule cronjob\n* [Upgrade guide](docs/upgradeguide.md) - breaking changes and guide for the upgrade\n\n## Helm Chart is migrated!\nThe repository contains helm charts for db-operator is moved to https://github.com/kloeckner-i/charts\nNew chart after db-operator \u003e 1.2.7, db-instances \u003e 1.3.0 will be only available in new repository.\n\n## CRD Versions are upgraded!\nNow both `DbInstance` and `Database` resources are upgraded to `v1beta1`.\nIn case you were using `connectionStringTemplate`, make sure I've migrated to `secretsTempaltes` before upgrading, because `connectionStringTemplate` is removed in this version. Everything else should go seamless. We've added `Webhooks` that will take care of resources with an old API version and convert them to the newer one.  \n\n### Downloading old charts\n\nInstalling older version of charts is still possible.\nCheck available versions by following command.\n\n```\n$ helm repo add kloeckneri-old https://kloeckner-i.github.io/db-operator/\n$ helm search repo kloeckneri-old/ --versions\n```\n\n## Quickstart\n\n### To install DB Operator with helm:\n\n```\n$ helm repo add kloeckneri https://kloeckner-i.github.io/charts/\n$ helm install --name my-release kloeckneri/db-operator\n```\n\nTo see more options of helm values, [see chart repo]([https://github.com/kloeckner-i/charts/tree/main/charts/db-operator])\n\nTo see which version is working together check out our [version matrix](https://github.com/kloeckner-i/db-operator/wiki/Version-Matrix).\n\n## Development\n\n#### Prerequisites\n* go 1.15+\n* docker\n* make\n* kubectl v1.14+ (\u003c v1.21)\n* helm v3.0.2+\n* [k3d](https://github.com/rancher/k3d)\n\nTo have kubernetes environment locally, you need to install [k3d](https://github.com/rancher/k3d).\n\n\n#### makefile help\n\n```\naddexamples           add examples via kubectl create -f examples/\nbuild                 build db-operator docker image\ncontroller-gen        Download controller-gen locally if necessary.\ngenerate              generate supporting code for custom resource types\nhelp                  show this help\nk3d_image             rebuild the docker images and upload into your k3d cluster\nk3d_install           install k3d cluster locally\nk3d_setup             install k3d and import image to your k3d cluster\nk3s_mac_deploy        build image and import image to local lima k8s\nk3s_mac_image         import built image to local lima k8s\nk3s_mac_lima_create   create local k8s using lima\nk3s_mac_lima_start    start local lima k8s\nlint                  lint go code\nmanifests             generate custom resource definitions\ntest                  run go unit test\nvet                   go vet to find issues\n```\n\n### Developing locally\n\n#### After code changes\n\nrebuild CRD manifests\n```\n$ make manifests\n```\n\nrebuild local docker image\n```\n$ make build\n```\n\n#### Run local kubernetes\n```\n$ make k3d_setup\n```\n\nor \n\n```\n$ make k3s_mac_lima_create\n```\n\n#### Import local docker image\n\n```\n$ make k3d_build\n```\n\nor\n```\n$ make k3s_mac_image\n```\n\n### Deploy\n\n```\nhelm repo add kloeckneri https://kloeckner-i.github.io/charts\nhelm repo update\nhelm upgrade my-release kloeckneri/db-operator --set image.repository=my-db-operator --set image.tag=1.0.0-dev --set image.pullPolicy=IfNotPresent --install\n```\n\n### Run unit test locally\n\n```\n$ make test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkloeckner-i%2Fdb-operator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkloeckner-i%2Fdb-operator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkloeckner-i%2Fdb-operator/lists"}