DARP - the K8S Admission Validation reverse proxy.
make build
config.json
example:
"upstreams":
[
{
# Set upstream URL
"url": "http://127.0.0.1:8081/validate/route",
# Set K8S resource
"resource": "route"
},
{
"url": "http://127.0.0.1:3000/service",
"resource": "services"
}
]
- Start the server
./darp server
- Deploy WebHook configuration
oc create -f test/manually/webhook-cfg.yaml
- Start demo NodeJS server
cd test/darp_client && npm start
- Create good service yaml
oc create -f test/manually/good-service.yaml
- service creation allowed - Create bad service yaml
oc create -f test/manually/bad-service.yaml
- service creation declined