https://github.com/hardillb/k8s-add-annotations
A Kubernetes Mutating Webhook
https://github.com/hardillb/k8s-add-annotations
kubernetes webhook
Last synced: 2 months ago
JSON representation
A Kubernetes Mutating Webhook
- Host: GitHub
- URL: https://github.com/hardillb/k8s-add-annotations
- Owner: hardillb
- License: apache-2.0
- Created: 2022-12-09T22:10:20.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-12-12T22:50:13.000Z (over 1 year ago)
- Last Synced: 2025-01-25T06:23:37.960Z (over 1 year ago)
- Topics: kubernetes, webhook
- Language: JavaScript
- Homepage: https://www.hardill.me.uk/wordpress/2022/12/09/kubernetes-mutating-web-hooks-to-configure-ingress/
- Size: 21.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# K8s Ingress Annotation Webhook
A Kubernetes Mutating Webhook that adds annotations to Ingress objects in a given namespace.
## BUILD
```
./crete-cert.sh
docker build . -t containers.hardill.me.uk/testing/web-hook:latest
docker push
```
You will also need to replace the `caBundle` value in the template/k8s-webhook.yml file with the output of
```
base64 -w 0 ca/ca.crt
```
This will ensure the newly created CA is trusted by the kubernetes runtime.
## Deploy
```
kubectl apply -f template/k8s-webhook.yml
```