{"id":22868526,"url":"https://github.com/delineaxpm/dsv-k8s-sidecar","last_synced_at":"2025-07-25T16:06:56.381Z","repository":{"id":153363176,"uuid":"545592798","full_name":"DelineaXPM/dsv-k8s-sidecar","owner":"DelineaXPM","description":"Plugin for DSV Kubernetes sidecar.","archived":false,"fork":false,"pushed_at":"2025-03-27T07:24:29.000Z","size":8812,"stargazers_count":5,"open_issues_count":4,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-30T23:11:54.035Z","etag":null,"topics":["dsv","kubernetes"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DelineaXPM.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-04T16:37:22.000Z","updated_at":"2025-03-11T21:28:34.000Z","dependencies_parsed_at":"2023-12-27T06:26:08.556Z","dependency_job_id":"4580505e-744a-4f45-bc30-5d24eeaac60a","html_url":"https://github.com/DelineaXPM/dsv-k8s-sidecar","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DelineaXPM%2Fdsv-k8s-sidecar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DelineaXPM%2Fdsv-k8s-sidecar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DelineaXPM%2Fdsv-k8s-sidecar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DelineaXPM%2Fdsv-k8s-sidecar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DelineaXPM","download_url":"https://codeload.github.com/DelineaXPM/dsv-k8s-sidecar/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252566802,"owners_count":21769110,"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":["dsv","kubernetes"],"created_at":"2024-12-13T12:35:45.482Z","updated_at":"2025-05-05T19:53:07.865Z","avatar_url":"https://github.com/DelineaXPM.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dsv-k8s-sidecar\n\n## Overview\n\nThere are two applications that are built in this repo:\n\n| Application        | Description                                                                                                                                                                               |\n| ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| dsv-k8s-sidecar    | Responsible for fetching and periodically updating a configuration file stored at a shared volume that is used by the pods.                                                               |\n| dsv-k8s-controller | The controller watches for new pods with the specific annotation `dsv` to come online with the value of the `tenant` intended to be used, it then adds this pod to the internal registry. |\n\n\u003e **_Note_**\n\u003e There is no guarantee that the file has been created by the time the companion containers are online.\n\n## Installing\n\nBoth the sidecar \u0026 controller have helm charts located in [charts](charts/) with `README.md` files containing a reference for the input values required.\n\n## How It Works\n\nSee [Architecture](docs/architecture.md) for more detail.\n\nThe general concept is:\n\n- DSV Controller retrieves and caches secrets from DSV.\n- Authenticated sidecar pods communicate with a unique JWT to the DSV Controller requesting the desired secrets.\n- The secret is either read from the in-memory cache or retrieved if non-existent.\n\n## FAQ\n\n- Do I need more than one controller?\n  - One controller can do the job required.\n  - If you want to scope the controller to a specific namespace and/or client credential for more isolation, then you could consider installing more.\n\n## Development\n\n- See [developer](docs/developer-quick-start.md)\n\n## Possible Future Improvements\n\n- Push token instead of pull\n- Certificate auth instead of JWT\n\nIf there are needs missing for your usage, feel free to open a GitHub issue describing your challenges and any suggestions for improvement.\n\n### Sample Applications for QA Testing\n\n- [example/app1](examples/app1)\n\n## Running Project Against Local Kind Cluster\n\n\u003e **Note**\n\u003e Further directions on development setup are in [Developer](docs/setup-project.md).\n\n- `mage cert:generate` to create the local certs in `.cache` directory.\n\n\u003e Currently if you copy these into artifacts, it will apply.\n\n- For creation of the secret in development mode: `mage k8s:createsecret`\n- For a customer: `kubectl create secret generic keys --from-file=mysecretpath/server.key --from-file=mysecretpath/server.crt`\n\nDev Deployment:\n\n- Deploy the manifests individually: `mage k8s:apply ./.cache/charts/k8s/controller.yml`.\n- Deploy all locally: `mage helm:install`.\n\n## Optional Running Locally with TLS\n\nThere are two communication channels between sidecar and controller:\n\n1. Getting JWT token via http/https\n2. Secrets via GRPC\n\nOptionally we can encrypt these communications at container level.\n\n## Generate self signed certificate\n\n- run `mage cert:generate` and choose `Sidecar To Controller`: This will generate certs and keys in .cache folder.\n- create kubernetes secret: `mage k8s:createsecret` or manually: kubectl create secret generic keys --from-file=key.pem --from-file=cert.pem --from-file=ca.pem\n\n### Sidecar to Controller GRPC\n\nAdd above k8 secret as volume in Controller's k8 deployment and add the name of cert and private key name env in k8 values.yml.\n\n- `KEY_DIR` =\u003e the volume directory.\n- `SERVER_CRT` =\u003e this will be certs.\n- `SERVER_KEY` =\u003e this will be private key.\n\n### Sidecar to Controller Token\n\nAdd above k8 secret as volume in sidecar's k8 deployment and add the name of cert env in k8 values.yml.\n\n- `KEY_DIR` =\u003e the volume directory.\n- `SERVER_CRT` =\u003e this will be certs.\n\nOnce the above setup is done all kubernetes secret will mapped to volume and both the sidecar and controller will pick certificates up from volume.\n\n## Additional Resources\n\n- [Developer](docs/setup-project.md): instructions on running tests, local tooling, and other resources.\n- [DSV Documentation](https://docs.delinea.com/dsv/current?ref=githubrepo)\n- [DSV-K8S](https://github.com/DelineaXPM/dsv-k8s) is another approach using a Kubernetes syncing and injector hook to directly update Kubernetes secrets.\n  This alternative approach does not leverage a sidecar.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdelineaxpm%2Fdsv-k8s-sidecar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdelineaxpm%2Fdsv-k8s-sidecar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdelineaxpm%2Fdsv-k8s-sidecar/lists"}