All Projects → alex-leonhardt → k8s-mutate-webhook

alex-leonhardt / k8s-mutate-webhook

Licence: other
A playground to build a very crude k8s mutating webhook in Go

Programming Languages

go
31211 projects - #10 most used programming language
shell
77523 projects
Makefile
30231 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to k8s-mutate-webhook

vault-sidecar-injector
Kubernetes admission webhook for secure, seamless and dynamic handling of secrets in your applications
Stars: ✭ 55 (+0%)
Mutual labels:  k8s, admission-webhook
imageswap-webhook
Image Swap Mutating Admission Webhook for Kubernetes
Stars: ✭ 72 (+30.91%)
Mutual labels:  webhook, admission-webhook
k8s-metadata-injection
Kubernetes metadata injection for New Relic APM to make a linkage between APM and Infrastructure data.
Stars: ✭ 19 (-65.45%)
Mutual labels:  k8s, admission-webhook
tesoro
Kapitan Admission Controller Webhook
Stars: ✭ 32 (-41.82%)
Mutual labels:  webhook, admission-webhook
kube-watch
Simple tool to get webhooks on Kubernetes cluster events
Stars: ✭ 21 (-61.82%)
Mutual labels:  webhook, k8s
Gitwebhookproxy
A proxy to let webhooks reach running services behind a firewall – [✩Star] if you're using it!
Stars: ✭ 123 (+123.64%)
Mutual labels:  webhook, k8s
MailHookBundle
A bundle to catch API webhook from different mail service
Stars: ✭ 36 (-34.55%)
Mutual labels:  webhook
github-release-notifier
Automatize tasks when a specific package got a new release - Github Release Notifier
Stars: ✭ 21 (-61.82%)
Mutual labels:  webhook
YappyGitLab
A GitLab monitor bot for Discord
Stars: ✭ 51 (-7.27%)
Mutual labels:  webhook
Self-Hosted-Asp.Net-WebHooks
Self hosted custom webhook receiver and sender
Stars: ✭ 50 (-9.09%)
Mutual labels:  webhook
infinispan-operator
Infinispan Operator
Stars: ✭ 32 (-41.82%)
Mutual labels:  k8s
actions
Set of actions for implementing CI/CD with werf and GitHub Actions
Stars: ✭ 67 (+21.82%)
Mutual labels:  k8s
wikibot
A 🤖 which provides features from Wikipedia like summary, title searches, location API etc.
Stars: ✭ 25 (-54.55%)
Mutual labels:  webhook
MsftTeams
Module for Posting messages to MSTeams via Webhook
Stars: ✭ 35 (-36.36%)
Mutual labels:  webhook
cattlectl
gain control over your ranch
Stars: ✭ 33 (-40%)
Mutual labels:  k8s
k8s-webhook-cert-manager
Generate certificate suitable for use with any Kubernetes Mutating Webhook.
Stars: ✭ 59 (+7.27%)
Mutual labels:  admission-webhook
kubeswitch
visually select kubernetes context/namespace from tree
Stars: ✭ 15 (-72.73%)
Mutual labels:  k8s
webhook-tunnel
A little HTTP proxy suitable to create tunnels for webhook endpoints protected behind a firewall or a VPN
Stars: ✭ 63 (+14.55%)
Mutual labels:  webhook
gitdub
📤 A github WebHook that emails detailed diffs of your commits.
Stars: ✭ 25 (-54.55%)
Mutual labels:  webhook
rebasebot
A GitHub bot that rebases your branches
Stars: ✭ 43 (-21.82%)
Mutual labels:  webhook

k8s-mutate-webhook

A playground to try build a crude k8s mutating webhook; the goal is to mutate a Pod CREATE request to always use a debian image and by doing this, learning more about the k8s api, objects, etc. - eventually figure out how scalable this is (could be made) if one had 1000 pods to schedule (concurrently)

This is a companion to the blog post Writing a very basic kubernetes mutating admission webhook

build

make

test

make test

ssl/tls

the ssl/ dir contains a script to create a self-signed certificate, not sure this will even work when running in k8s but that's part of figuring this out I guess

NOTE: the app expects the cert/key to be in ssl/ dir relative to where the app is running/started and currently is hardcoded to mutateme.{key,pem}

cd ssl/ 
make 

docker

to create a docker image ..

make docker

it'll be tagged with the current git commit (short ref) and :latest

don't forget to update IMAGE_PREFIX in the Makefile or set it when running make

images

alexleonhardt/k8s-mutate-webhook

watcher

useful during devving ...

watcher -watch github.com/alex-leonhardt/k8s-mutate-webhook -run github.com/alex-leonhardt/k8s-mutate-webhook/cmd/

Running in docker-for-mac

cd ssl && make && cd -
make docker
sed -i '' 's/imagePullPolicy: Always/imagePullPolicy: Never/' deploy/webhook.yaml # use local image
sed -i '' "s/caBundle:.*/caBundle: $(cat ssl/mutateme.pem | base64)/" deploy/webhook.yaml # use local CA 
kubectl label namespace default mutateme=enabled
kubectl apply -f deploy/webhook.yaml

# make sure it's running ...
kubectl get pods
kubectl logs <PDO> --follow

# create example pod to see it working
kubectl apply -f pod.yaml
kubectl get pod c7m -o yaml | grep image: # should be debian

kudos

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].