Files
ingress/pkg/provider/kubernetes/crd/fixtures/with_highest_random_weight.yml
zeekay efee4c9fb1 Add the WAF middleware
OWASP Coraza with the Core Rule Set v4 embedded, declared as `waf` on
every provider: file, labels and the Middleware CR. Rules load Core Rule
Set, then files, then inline directives.

The engine state is written after every rule. The Core Rule Set's own
recommended configuration opens with SecRuleEngine DetectionOnly, so a
state written first is overridden by the rules it governs and the
firewall loads all of CRS and refuses nothing; detectionOnly on the
middleware is the one place the mode is decided.

geoBlock rode along: it was declared in dynamic config only, absent from
MiddlewareSpec, both deep copies and the CRD schema, so a Middleware CR
carrying it produced a middleware without it. The +groupName marker now
matches the registered group, which is what makes controller-gen's output
land where code-gen.sh reads it; the stale traefik.io_*.yaml dumps go.

CI asks for the arm64 runner git.hanzo.ai actually has and builds both
platforms.
2026-09-03 16:14:35 -07:00

107 lines
1.5 KiB
YAML

---
kind: EndpointSlice
apiVersion: discovery.k8s.io/v1
metadata:
name: whoami1-abc
namespace: default
labels:
kubernetes.io/service-name: whoami1
addressType: IPv4
ports:
- name: web
port: 8080
endpoints:
- addresses:
- 10.10.0.1
- 10.10.0.2
conditions:
ready: true
---
apiVersion: v1
kind: Service
metadata:
name: whoami1
namespace: default
spec:
ports:
- name: web
port: 8080
selector:
app: hanzoai
task: whoami1
---
kind: EndpointSlice
apiVersion: discovery.k8s.io/v1
metadata:
name: whoami2-abc
namespace: default
labels:
kubernetes.io/service-name: whoami2
addressType: IPv4
ports:
- name: web
port: 8080
endpoints:
- addresses:
- 10.10.0.3
- 10.10.0.4
conditions:
ready: true
---
apiVersion: v1
kind: Service
metadata:
name: whoami2
namespace: default
spec:
ports:
- name: web
port: 8080
selector:
app: hanzoai
task: whoami2
---
apiVersion: hanzo.ai/v1alpha1
kind: IngressService
metadata:
name: hrw1
namespace: default
spec:
highestRandomWeight:
services:
- name: whoami1
kind: Service
port: 8080
weight: 10
- name: whoami2
kind: Service
port: 8080
weight: 20
---
apiVersion: hanzo.ai/v1alpha1
kind: IngressRoute
metadata:
name: test.route
namespace: default
spec:
entryPoints:
- web
routes:
- match: Host(`foo.com`) && PathPrefix(`/foo`)
kind: Rule
priority: 12
services:
- name: hrw1
kind: IngressService