{"id":20334908,"url":"https://github.com/mdb/sidecar-injector","last_synced_at":"2026-05-05T16:04:38.293Z","repository":{"id":137137960,"uuid":"576952970","full_name":"mdb/sidecar-injector","owner":"mdb","description":"A basic Kubernetes controller example.","archived":false,"fork":false,"pushed_at":"2023-01-02T15:44:50.000Z","size":55,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-14T16:36:17.452Z","etag":null,"topics":["controller","kubebuilder","kubernetes","operator-sdk","reference-implementation","sidecar"],"latest_commit_sha":null,"homepage":"https://mikeball.info/blog/what-is-the-kubernetes-controller-pattern/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mdb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2022-12-11T14:23:20.000Z","updated_at":"2022-12-16T19:37:51.000Z","dependencies_parsed_at":"2024-06-21T00:51:57.929Z","dependency_job_id":null,"html_url":"https://github.com/mdb/sidecar-injector","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdb%2Fsidecar-injector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdb%2Fsidecar-injector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdb%2Fsidecar-injector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdb%2Fsidecar-injector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mdb","download_url":"https://codeload.github.com/mdb/sidecar-injector/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241854606,"owners_count":20031467,"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":["controller","kubebuilder","kubernetes","operator-sdk","reference-implementation","sidecar"],"created_at":"2024-11-14T20:38:34.025Z","updated_at":"2026-05-05T16:04:37.853Z","avatar_url":"https://github.com/mdb.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sidecar-injector\n\nA contrived reference example illustrating the use of [operator-sdk](https://sdk.operatorframework.io) in developing a basic custom controller that operates on Deployments.\n\n`sidecar-injector` is intended as the companion repository to [What is the Kubernetes Controller Pattern?](https://mikeball.info/blog/what-is-the-kubernetes-controller-pattern/)\n\n## Getting Started\n\nYou'll need a Kubernetes cluster to run against. You can use [KIND](https://sigs.k8s.io/kind) to get a local cluster for testing, or run against a remote cluster.\n\n**Note:** Your controller will automatically use the current context in your kubeconfig file (i.e. whatever cluster `kubectl cluster-info` shows).\n\n### Running on the cluster\n\n1. Install Instances of Custom Resources:\n\n```sh\nkubectl apply -f config/samples/\n```\n\n2. Build and push your image to the location specified by `IMG`:\n\n```sh\nmake docker-build docker-push IMG=\u003csome-registry\u003e/sidecar-injector:tag\n```\n\n3. Deploy the controller to the cluster with the image specified by `IMG`:\n\n```sh\nmake deploy IMG=\u003csome-registry\u003e/sidecar-injector:tag\n```\n\n### Uninstall CRDs\nTo delete the CRDs from the cluster:\n\n```sh\nmake uninstall\n```\n\n### Undeploy controller\n\nUnDeploy the controller from the cluster:\n\n```sh\nmake undeploy\n```\n\n### How it works\n\nThis project uses a [Controller](https://kubernetes.io/docs/concepts/architecture/controller/) which provides a reconcile function responsible for synchronizing resources until the desired state is reached on the cluster.\n\n### Test It Out\n\nRun your controller (this will run in the foreground, so switch to a new terminal if you want to leave it running):\n\n```sh\nmake run\n```\n\n### Modifying the API definitions\n\nIf you are editing the API definitions, generate the manifests such as CRs or CRDs using:\n\n```sh\nmake manifests\n```\n\n**NOTE:** Run `make --help` for more information on all potential `make` targets\n\nMore information can be found via the [Kubebuilder Documentation](https://book.kubebuilder.io/introduction.html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdb%2Fsidecar-injector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmdb%2Fsidecar-injector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdb%2Fsidecar-injector/lists"}