{"id":16327283,"url":"https://github.com/bryopsida/nestjs-k8s-mutating-webhook","last_synced_at":"2026-01-17T18:38:08.671Z","repository":{"id":243972666,"uuid":"810546729","full_name":"bryopsida/nestjs-k8s-mutating-webhook","owner":"bryopsida","description":null,"archived":false,"fork":false,"pushed_at":"2025-12-19T19:40:27.000Z","size":168,"stargazers_count":0,"open_issues_count":13,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-21T23:24:08.684Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/bryopsida.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-06-04T22:56:56.000Z","updated_at":"2024-06-04T22:57:02.000Z","dependencies_parsed_at":"2024-08-25T06:41:30.064Z","dependency_job_id":"f3c58195-5473-420e-9104-26fdfc004bc8","html_url":"https://github.com/bryopsida/nestjs-k8s-mutating-webhook","commit_stats":null,"previous_names":["bryopsida/nestjs-k8s-mutating-webhook"],"tags_count":0,"template":false,"template_full_name":"curium-rocks/k8s-mutating-webhook","purl":"pkg:github/bryopsida/nestjs-k8s-mutating-webhook","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bryopsida%2Fnestjs-k8s-mutating-webhook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bryopsida%2Fnestjs-k8s-mutating-webhook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bryopsida%2Fnestjs-k8s-mutating-webhook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bryopsida%2Fnestjs-k8s-mutating-webhook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bryopsida","download_url":"https://codeload.github.com/bryopsida/nestjs-k8s-mutating-webhook/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bryopsida%2Fnestjs-k8s-mutating-webhook/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28516195,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T18:28:00.501Z","status":"ssl_error","status_checked_at":"2026-01-17T18:28:00.150Z","response_time":85,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-10-10T23:10:58.510Z","updated_at":"2026-01-17T18:38:08.636Z","avatar_url":"https://github.com/bryopsida.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# k8s-mutating-webhook\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=curium-rocks_k8s-mutating-webhook\u0026metric=alert_status)](https://sonarcloud.io/summary/new_code?id=curium-rocks_k8s-mutating-webhook) [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=curium-rocks_k8s-mutating-webhook\u0026metric=coverage)](https://sonarcloud.io/summary/new_code?id=curium-rocks_k8s-mutating-webhook) [![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=curium-rocks_k8s-mutating-webhook\u0026metric=security_rating)](https://sonarcloud.io/summary/new_code?id=curium-rocks_k8s-mutating-webhook) [![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=curium-rocks_k8s-mutating-webhook\u0026metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=curium-rocks_k8s-mutating-webhook) [![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=curium-rocks_k8s-mutating-webhook\u0026metric=code_smells)](https://sonarcloud.io/summary/new_code?id=curium-rocks_k8s-mutating-webhook) [![Bugs](https://sonarcloud.io/api/project_badges/measure?project=curium-rocks_k8s-mutating-webhook\u0026metric=bugs)](https://sonarcloud.io/summary/new_code?id=curium-rocks_k8s-mutating-webhook)\n\nThis template provides a kick start to making a kubernetes admission controller using TypeScript and Node.JS, uses a Mutating Webhook.\n- [Kubernetes-client/client-node](https://github.com/kubernetes-client/javascript)\n- [Jest](https://github.com/facebook/jest)\n- [Github Action CI](.github/workflows/ci.yaml)\n- [Renovate](https://github.com/renovatebot/renovate)\n- [Eslint (with standard config)](https://github.com/standard/eslint-config-standard)\n- [Typescript](https://github.com/Microsoft/TypeScript)\n- [Config](https://github.com/node-config/node-config)\n- [Pino](https://github.com/pinojs/pino)\n- [Fastify](https://github.com/fastify/fastify)\n- [Fast Json Patch](https://github.com/Starcounter-Jack/JSON-Patch)\n- [InversifyJS](https://github.com/inversify/InversifyJS)\n- [Sonar Project File](./sonar-project.properties)\n- [Dockerfile](./Dockerfile)\n\n\n## NPM Scripts\nThe following scripts are included in the NPM project configuration\n- `lint` lints the source code using eslint\n- `lint:fix` automatically fixes any lint errors that can be fixed automatically\n- `test` uses jest to run test suites\n- `test:e2e` runs e2e test suite, this requires an active helm:deploy\n- `build` compiles the typescript into js and places it in the `dist` folder\n- `build:image` builds the container image\n- `minikube:start` create a minikube k8s cluster\n- `minikube:stop` stop minikube but do not delete\n- `minikube:delete` delete the minikube cluster\n- `helm:addRepos` adds helm repos\n- `helm:deployCertManager` deploy cert-manager for TLS\n- `helm:deploy` deploy the app to k8s using helm\n- `helm:template` print the k8s yaml that would be applied to k8s when using `helm:deploy`\n- `helm:uninstall` remove the app from k8s\n- `helm:uninstallCertManager` remove cert-manager from the k8s cluster\n\n## Deploy it\nIf you don't already have cert manager installed you will need to run:\n\n``` bash\nhelm repo add jetstack https://charts.jetstack.io \u0026\u0026 helm repo update \u0026\u0026 \\\n  helm upgrade --install --namespace cert-manager --create-namespace \\\n  cert-manager jetstack/cert-manager --set installCRDs=true --debug --wait\n```\n\nAdd the helm repos `helm repo add k8s https://curium-rocks.github.io/k8s-mutating-webhook` fetch updates `helm repo update`. \n\nVerify it worked `helm search repo k8s` and you should see something like.\n\n```\nNAME                                                    CHART VERSION   APP VERSION     DESCRIPTION                                       \nk8s/k8s-mutating-webhook...      0.1.0           0.1.0           A starter template for a dynamic admission mut...\n```\n\nDeploy the app `helm upgrade --install starter k8s/k8s-mutating-webhook`\n\nVerify it worked `kubectl run testpod --image=busybox`, this will be changed, fetch it's yaml `kubectl get testpod -o yaml` you will see its `securityContext`'s have been enhanced.\n\n\n## Structure\n### [Services](./src/services/)\nThis is meant to include service abstractions, ideally each service should provide an interface/contract \nexposing the functionality that other things in the application need.\n### [Entities](./src/entities/)\nCurrently this is setup to house factories or other items to provide instances of third party things/modules that will be bound by the InversifyJS IoC container so they can be injected into other things with `@inject()`\n\n### [Models](./src/models/)\nThis houses interfaces/models with little to no logic, the intent is these items can be passed/returned from the abstractions in services and avoid tight coupling to third party types.\n\n### [types.ts](./src/types.ts)\nThis defines symbols for each type that will be configured in the IoC container, these are used to identify the type when using `@inject(TYPES.Services.Kubernetes)` for example. For more information refer to [inversify](https://github.com/inversify/InversifyJS).\n\n\n### [inversify.config.ts](./src/inversify.config.ts)\nThis file maps the types defined in `./src/types.ts` to interface types. For more information refer to [inversify](https://github.com/inversify/InversifyJS).\n\n## After Using as Template Todo List\n1) [ ] Update Sonar Project Properties For [Sonar Cloud](https://sonarcloud.io)\n2) [ ] Add SONARQUBE_KEY secret to your repo or org if not already present\n3) [ ] Point badges in README.md to correct location for you repo\n3) [ ] Update [renovate.json](./renovate.json) to meet desired behavior for your needs, docs can be found [here](https://docs.renovatebot.com).\n4) [ ] Update this readme to reflect your project name and info\n5) [ ] Rename all `k8s-mutating-webhook` references to match your project name","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbryopsida%2Fnestjs-k8s-mutating-webhook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbryopsida%2Fnestjs-k8s-mutating-webhook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbryopsida%2Fnestjs-k8s-mutating-webhook/lists"}