{"id":13438011,"url":"https://github.com/FoundationDB/fdb-kubernetes-operator","last_synced_at":"2025-03-19T18:31:32.572Z","repository":{"id":37431353,"uuid":"221993778","full_name":"FoundationDB/fdb-kubernetes-operator","owner":"FoundationDB","description":"A kubernetes operator for FoundationDB","archived":false,"fork":false,"pushed_at":"2024-04-12T14:32:55.000Z","size":35648,"stargazers_count":222,"open_issues_count":94,"forks_count":80,"subscribers_count":19,"default_branch":"main","last_synced_at":"2024-04-12T16:29:58.711Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/FoundationDB.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2019-11-15T19:57:16.000Z","updated_at":"2024-04-15T12:04:38.934Z","dependencies_parsed_at":"2023-09-29T08:31:55.320Z","dependency_job_id":"7eecaf27-8b5e-41bb-a725-1504c4e3ad06","html_url":"https://github.com/FoundationDB/fdb-kubernetes-operator","commit_stats":null,"previous_names":[],"tags_count":114,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FoundationDB%2Ffdb-kubernetes-operator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FoundationDB%2Ffdb-kubernetes-operator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FoundationDB%2Ffdb-kubernetes-operator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FoundationDB%2Ffdb-kubernetes-operator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FoundationDB","download_url":"https://codeload.github.com/FoundationDB/fdb-kubernetes-operator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244483327,"owners_count":20460091,"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":[],"created_at":"2024-07-31T03:01:02.164Z","updated_at":"2025-03-19T18:31:32.566Z","avatar_url":"https://github.com/FoundationDB.png","language":"Go","funding_links":[],"categories":["HarmonyOS","Go"],"sub_categories":["Windows Manager"],"readme":"\u003cimg alt=\"FoundationDB logo\" src=\"docs/FDB_logo.png?raw=true\" width=\"400\"\u003e\n\nFoundationDB is a distributed database designed to handle large volumes of structured data across clusters of commodity servers.\nIt organizes data as an ordered key-value store and employs ACID transactions for all operations.\nIt is especially well-suited for read/write workloads but also has excellent performance for write-intensive workloads.\nUsers interact with the database using API language binding.\n\nTo learn more about FoundationDB, visit [foundationdb.org](https://www.foundationdb.org/)\n\n# Overview\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/FoundationDB/fdb-kubernetes-operator)](https://goreportcard.com/report/github.com/FoundationDB/fdb-kubernetes-operator)\n![GitHub](https://img.shields.io/github/license/FoundationDB/fdb-kubernetes-operator)\n[![CI for main branch](https://github.com/FoundationDB/fdb-kubernetes-operator/actions/workflows/pull_request.yml/badge.svg)](https://github.com/FoundationDB/fdb-kubernetes-operator/actions/workflows/pull_request.yml)\n\nThis project provides an operator for managing FoundationDB clusters on Kubernetes.\nSome more details are covered in this YouTube video: [Operating FoundationDB on Kubernetes (DoK Day EU 2022)](https://www.youtube.com/watch?v=Kf3kquvuing).\n\n## Running the Operator\n\nTo run the operator in your environment, you need to install the operator and the CRDs:\n*Note* this will install the latest version from main.\nFor a production setup you should refer to a specific tag.\n\n```bash\nkubectl apply -f https://raw.githubusercontent.com/FoundationDB/fdb-kubernetes-operator/main/config/crd/bases/apps.foundationdb.org_foundationdbclusters.yaml\nkubectl apply -f https://raw.githubusercontent.com/FoundationDB/fdb-kubernetes-operator/main/config/crd/bases/apps.foundationdb.org_foundationdbbackups.yaml\nkubectl apply -f https://raw.githubusercontent.com/FoundationDB/fdb-kubernetes-operator/main/config/crd/bases/apps.foundationdb.org_foundationdbrestores.yaml\nkubectl apply -f https://raw.githubusercontent.com/foundationdb/fdb-kubernetes-operator/main/config/samples/deployment.yaml\n```\n\nAt this point, you can set up a sample cluster:\n\n```bash\nkubectl apply -f https://raw.githubusercontent.com/foundationdb/fdb-kubernetes-operator/main/config/samples/cluster.yaml\n```\n\nYou can see logs from the operator by running `kubectl logs -f -l app=fdb-kubernetes-operator-controller-manager --container=manager`.\nTo determine whether the reconciliation has completed, you can run `kubectl get foundationdbcluster test-cluster`.\nThis will show the latest generation of the spec and the last reconciled generation of the spec.\nOnce reconciliation has completed, these values will be the same.\n\nOnce the reconciliation is complete, you can run `kubectl fdb exec -it test-cluster -- fdbcli` to open up a CLI on your cluster.\n\nYou can also browse the [sample directory](config/samples) for more examples of different resource configurations.\n\nFor more information about using the operator, including detailed discussion of how to customize your deployments, see the [user manual](docs/manual/index.md).\n\nFor more information on version compatibility, see our [compatibility guide](docs/compatibility.md).\n\nFor more information on the fields you can define on the cluster resource, see the [API documentation](docs/cluster_spec.md).\n\n### Using helm\n\nThis repository contains a helm chart under [charts](./charts).\nThe helm chart is not published and not actively tested by our CI.\nThe charts are provided by the community on a best-effort base.\n\n## Local Development\n\n### Environment Set-up\n\n1. Install Go on your machine, see the [Getting Started](https://golang.org/doc/install) guide for more information.\n1. Install the required dependencies with `make deps`.\n1. Install the [foundationDB client package](https://github.com/apple/foundationdb/releases), if you're using an arm64 Mac, make sure you install the `arm64` package.\n\n### Running Locally\n\nTo get this controller running in a local Kubernetes cluster:\n\n1. The assumption is that you have a local Kubernetes cluster running.\n   Depending on what solution you use some of the following steps might differ.\n1. Clone this repository onto your local machine.\n1. Run `config/test-certs/generate_secrets.bash` to set up a secret with\n   self-signed test certs.\n1. Run `make rebuild-operator` to install the operator. By default, the\n   container image is built for the platform where this command is executed.\n   To override the platform, for example, to build an `amd64` image on Apple M1,\n   you can set the `BUILD_PLATFORM` env variable `BUILD_PLATFORM=\"linux/amd64\" make rebuild-operator`.\n1. Run `kubectl apply -k ./config/tests/base` to create a new FoundationDB cluster with the operator.\n\n_NOTE_: FoundationDB currently only publishes container images for running on `amd64`/`x64` nodes.\n\n### Running Locally with nerdctl\n\nInstead of Docker you can also use [nerdctl](https://github.com/containerd/nerdctl) to build and push your images.\nIn order to use a different image builder than docker you can use the env variable `BUILDER`:\n\n```bash\n# This will use nerdctl for building the image in the k8s.io namespace\nexport BUILDER='nerdctl -n k8s.io'\n```\n\nYou can test your setup with `SKIP_TEST=1 make container-build` which will build the image locally.\nAfter the command successfully finished you can verify with `nerdctl -n k8s.io images fdb-kubernetes-operator:latest` that the image is available.\n\n### Running e2e tests with the operator\n\nThis repository contains [e2e tests](./e2e/README.md) to verify that the operator behaves correct in different situations.\nBesides functional tests the e2e test suite uses [chaos-mesh](https://chaos-mesh.org) to inject failures during test runs.\nThe test suite is build in a way that you can run the e2e tests against different Kubernetes clusters.\n\n### Customizing Your Build\n\nThe makefile supports environment variables that allow you to customize your build. You can use these to push to custom docker repos and deployment platforms.\n\n* `IMG`: This specifies the image that gets built for the operator.\n* `SIDECAR_IMG`: This specifies the image for the foundationdb-kubernetes-sidecar process used in init containers for the operator. This does not change the images used for the FoundationDB clusters, which are specified in the cluster spec.\n* `REMOTE_BUILD`: This can be set to 1 to indicate that you are running the operator in a remote environment, rather than on your local development machine. This will activate a [remote build](config/development/remote_build.yaml) patch, which changes the image pull policy in the operator's pod spec. Setting this also tells the Makefile to push images as part of the `rebuild-operator` command.\n* `FDB_WEBSITE`: This specifies the base path for the website used to download FDB client packages in the docker builds. You can use this to download custom binaries from your own host, provided that your path structure matches the paths expected in the [Dockerfile](Dockerfile).\n\n## Known Limitations\n\n1. Support for backups in the operator is still in development, and there are some missing features.\n1. Additional limitations can be found under [Warnings](docs/manual/warnings.md).\n1. The created FoundationDB cluster is only reachable from within the Kubernetes cluster. Except if the assigned IP addresses for the Pods are also reachable outside of the Kubernetes cluster.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFoundationDB%2Ffdb-kubernetes-operator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FFoundationDB%2Ffdb-kubernetes-operator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFoundationDB%2Ffdb-kubernetes-operator/lists"}