{"id":18185088,"url":"https://github.com/pete911/template-wh","last_synced_at":"2025-04-01T23:31:14.291Z","repository":{"id":37083162,"uuid":"306725348","full_name":"pete911/template-wh","owner":"pete911","description":"kubernetes template mutating admission webhook","archived":false,"fork":false,"pushed_at":"2025-03-12T16:33:20.000Z","size":17751,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-01T20:18:13.634Z","etag":null,"topics":["admission-webhook","k8s","kubernetes","mutating-admission-webhook","mutating-webhook"],"latest_commit_sha":null,"homepage":"","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/pete911.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":"2020-10-23T19:09:50.000Z","updated_at":"2025-03-12T16:33:22.000Z","dependencies_parsed_at":"2023-02-09T03:15:34.093Z","dependency_job_id":"58de6923-c513-4e2f-865e-997ce170bc1b","html_url":"https://github.com/pete911/template-wh","commit_stats":{"total_commits":214,"total_committers":6,"mean_commits":"35.666666666666664","dds":0.2757009345794392,"last_synced_commit":"240278c06815fe5792768f806b8d636dc19f83d0"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pete911%2Ftemplate-wh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pete911%2Ftemplate-wh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pete911%2Ftemplate-wh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pete911%2Ftemplate-wh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pete911","download_url":"https://codeload.github.com/pete911/template-wh/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246728942,"owners_count":20824277,"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":["admission-webhook","k8s","kubernetes","mutating-admission-webhook","mutating-webhook"],"created_at":"2024-11-02T22:22:22.056Z","updated_at":"2025-04-01T23:31:09.278Z","avatar_url":"https://github.com/pete911.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# template-wh\nKubernetes template mutating admission webhook. This is generic webhook, that takes configmap with key value pairs and\nuses it to replace placeholders (`$key`) in kubernetes manifests.\n\n## running template-wh\n\n### requirements\n - install template-wh either from [helm chart](https://pete911.github.io/template-wh/) or manually\n - install [cert-manager](https://cert-manager.io/)\n\n### example configuration\ncreate configmap e.g.:\n```yaml\n---\napiVersion: v1\nkind: ConfigMap\nmetadata:\n  name: template-wh\n  namespace: kube-system\ndata:\n  cluster: minikube\n```\n\ncreate webhook configuration e.g.:\n```yaml\n---\napiVersion: admissionregistration.k8s.io/v1\nkind: MutatingWebhookConfiguration\nmetadata:\n  name: pod-wh\n  namespace: kube-system\n  annotations:\n    cert-manager.io/inject-ca-from: kube-system/template-wh\nwebhooks:\n  - name: template-wh.kube-system.svc\n    rules:\n      - operations: [\"CREATE\"]\n        apiGroups: [\"\"]\n        apiVersions: [\"v1\"]\n        resources: [\"pods\"]\n    clientConfig:\n      service:\n        name: template-wh\n        namespace: kube-system\n        path: /mutate\n        port: 443\n    admissionReviewVersions: [\"v1\"]\n    sideEffects: None\n    timeoutSeconds: 5\n```\n\nEvery request to create a pod that contains `$cluster` placeholder either in `metadata` or `spec` field, will be\nreplaced for `minikube`.\n\nThis is just example, template-wh can be used on any resource.\n\n## releases\n\nReleases are automated and triggered on [chart version](charts/template-wh/Chart.yaml) update. If there is any change\nto Chart.yaml and the change is on the main branch, this will trigger github action which tags the branch and releases\n[chart](https://pete911.github.io/template-wh/) and\n[docker image](https://hub.docker.com/repository/docker/pete911/template-wh) with this version.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpete911%2Ftemplate-wh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpete911%2Ftemplate-wh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpete911%2Ftemplate-wh/lists"}