fengh0409 / admission-webhook-demo

admission webhook demo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Admission Webhook Demo

MutatingWebhook

The webhook is for injecting a sidecar container when a pod is creating.

ValidatingWebhook

The webhook is for checking something.

Attention

If you deal with the subResource, you should make sure that your kubernetes version is greater than 1.15.0 due to the bug, and the bug has be fixed after 1.15.0

If your kubernetes version is less than 1.15.0, it will be failed with below error when execute kubectl scale:

Error from server (InternalError): Internal error occurred: converting (apps.Deployment).Replicas to (v1beta1.Scale).Replicas: Selector not present in src

Besides, HPA will also not work, because HPA send a scale object to the apiserver.

About

admission webhook demo


Languages

Language:Go 87.6%Language:Shell 7.2%Language:Makefile 4.5%Language:Dockerfile 0.7%