Current version of the code is at : https://github.com/cloud-ark/kubeplus/tree/master/mutating-webhook
I started the design from scratch, taking some boilerplate from https://github.com/morvencao/kube-mutating-webhook-tutorial
Works kind of like helm, except at runtime it modifies and replaces Fn::ImportValue stuff from annotations of other Custom resource objects. There are two DFS functions that were necessary for generalizing this for any custom resource definition. Go only uses structured json unmarshalling, so i used jsonparser library I found on github, which is space/time efficient .
This is similar to AWS CloudFormation, it is aiming to give operators better interopability by defining some useful functions
It intercepts the kubernetes api request, modifies the json object with values that combine the operators together, and then kubernetes receives the request and saves to its etcd store.
-
Generate certs
make gen-certs
-
Deploy Mutating Webhook Using Docker
dep ensure
Set environment variables${PROJECT_ID} -> gcr project id $ {IMAGE_NAME} -> crd-hookmake docker
make deploy
-
Install Operators
make install-operators
-
Deploy application
make cluster
make moodle
-
Clean up delete webhook:
make delete
delete instances:make delall