{"id":17171641,"url":"https://github.com/yisaer/sidecar-inject-server","last_synced_at":"2026-04-28T23:02:26.671Z","repository":{"id":125905125,"uuid":"196703653","full_name":"Yisaer/sidecar-inject-server","owner":"Yisaer","description":"a simple sidecar-inject server in kubernetes","archived":false,"fork":false,"pushed_at":"2019-07-13T10:05:33.000Z","size":24,"stargazers_count":0,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-30T00:27:09.338Z","etag":null,"topics":["kubernetes","mutatingadmissionwebhook","sidecar-inject","webhook"],"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/Yisaer.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":"2019-07-13T09:30:43.000Z","updated_at":"2019-07-16T08:29:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"6db6d89e-65e9-47c8-8ab2-bbdb7e901318","html_url":"https://github.com/Yisaer/sidecar-inject-server","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/Yisaer%2Fsidecar-inject-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yisaer%2Fsidecar-inject-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yisaer%2Fsidecar-inject-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yisaer%2Fsidecar-inject-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Yisaer","download_url":"https://codeload.github.com/Yisaer/sidecar-inject-server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245343240,"owners_count":20599852,"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":["kubernetes","mutatingadmissionwebhook","sidecar-inject","webhook"],"created_at":"2024-10-14T23:35:02.071Z","updated_at":"2026-04-28T23:02:26.603Z","avatar_url":"https://github.com/Yisaer.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# README\n\nSidecar-Inject is a simple server to inject containers into Pod By `Sidecar` which defined by `CRD`\n\nIt's easy to use and also offer container selector ability.\n\n## Prerequisites\n\nKubernetes 1.9.0 or above with the `admissionregistration.k8s.io/v1beta1` API enabled. Verify that by the following command:\n```\nkubectl api-versions | grep admissionregistration.k8s.io/v1beta1\n```\nThe result should be:\n```\nadmissionregistration.k8s.io/v1beta1\n```\n\nIn addition, the `MutatingAdmissionWebhook` admission controllers should be added and listed in the correct order in the admission-control flag of kube-apiserver.\n\n## Build Image\n\n`Sidecar-inject` is managed by `go mod`\n\nrun `build.sh` to build docker image\n\n## How to Install\n\nyou can install sidecar-inject by `Helm`\n\nFirst install `sidecar-inejct-init` \n```yaml\nhelm install install/helm/sidecar-inject-init --name sidecar-init --namespace sidecar-system \n```\n\nThen install `sidecar-inject-server`\n```yaml\nhelm install install/helm/sidecar-inject-server --name sidecar-server --namespace sidecar-system --values install/helm/sidecar-inject-server/values.yaml \n```\n\n## How to test\n\nLabel the `namespace` and create a `deployment` to test sidecar-inject-server\n\n```\nkubectl label namespace sidecar-system sidecar-injector=enabled\nkubectl apply -f example/\n```\nAnd Here is the result\n```\n$ kubectl get sidecar\nNAME                CREATED AT\ntest-sidecarset     55m\ntest-sidecarset-2   55m\n\n$ kubectl get pod\nNAME                                                    READY   STATUS        RESTARTS   AGE\nsidecar-server-sidecar-inject-server-6b9dff7dd6-7b5nq   1/1     Running       0          39m\nsleep-578649fc85-xcg2r                                  3/3     Running       0          20s\n```\n\n## Sidecar\n\n`Sidecar` is defined by `CRD`. It shows which containers developers want to inject Into Pod When they are creating by `containers`\nand it also offer the selector condition ability by `selector`\n\nHere is one example for `Sidecar`. All Pods will be injected Containers defined in `containers` if their annotations contain `app` key and its value is `sidecar1`\n```yaml\napiVersion: yisaer.github.io/v1alpha1\nkind: Sidecar\nmetadata:\n  name: test-sidecarset\nspec:\n  selector:\n    matchLabels:\n      app: sidecar1\n  containers:\n    - name: sidecar1\n      image: centos:7\n      command: [\"sleep\", \"999d\"]\n    - name: sidecar2\n      image: centos:7\n      command: [\"sleep\", \"999d\"]\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyisaer%2Fsidecar-inject-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyisaer%2Fsidecar-inject-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyisaer%2Fsidecar-inject-server/lists"}