-
Notifications
You must be signed in to change notification settings - Fork 214
Open
Description
Summary
Hello 👋
When using backend CRD v3 (ingress.v3.haproxy.org/v3/Backend), http response rules are not created when declaring rules under http_response_rule_list
I feel like this is not yet implemented in the controller.
But since 3.2.1, was released, and add support for crd v3, I wanted to point it out just in case.
Ingress Controller version: 3.2.1
Helm chart version: 1.72.0
Details
Here a simple set of resources to reproduce the behavior.
Note: the actual haproxy configuration makes no functional sense, it is simply here to demonstrate the issue.
apiVersion: v1
kind: Service
metadata:
name: foo
namespace: default
spec:
ports:
- name: http
protocol: TCP
port: 80
targetPort: 8080
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
cr-backend: default/foo
name: foo
namespace: default
spec:
ingressClassName: haproxy
rules:
- host: foo.com
http:
paths:
- backend:
service:
name: foo
port:
name: http
path: /
pathType: Prefix
---
apiVersion: "ingress.v3.haproxy.org/v3"
kind: Backend
metadata:
name: foo
namespace: default
spec:
name: foo
http_response_rule_list:
- type: deny
cond: unless
cond_test: "{ res.hdr(HEADER) -m found }"
http_request_rule_list:
- type: deny
cond: unless
cond_test: "{ req.hdr(HEADER) -m found }"This will produce the following haproxy configuration for the backend:
backend default_svc_foo_http
mode http
http-request deny unless { req.hdr(HEADER) -m found }We can see that http request rules are created, but not http response rules.
Metadata
Metadata
Assignees
Labels
No labels