This admission controller acts as a MutatingAdmissionWebhook and adds modsecurity waf to ingresses.
- install the dependencies
- download and verify setup.yaml
- deploy admission controller
kubectl apply -f setup.yaml
- Cert Manager is used to set up certificates to validate the webhook against the kubernetes control plane.
The Admission controller adds WAF enabling annotations to all ingresses by default.
Create an ingress and add the annotation ingress-waf/enabled: "false"
.
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
ingress-waf/enabled: "false"
name: some-ingress
spec:
rules:
- host: "domain.tld"
Ingresses with this annotation will skip the WAF setup.