Creating an ingress controller for OpenShift with mounted HAProxy configmaps
oc edit ingresscontrollers default -n openshift-ingress-operator
spec:
routeSelector:
matchExpressions:
- {key: "k8s.io/route-type", operator: NotIn, values: ["kwaf-secured"]}
spec:
template:
spec:
containers:
- env:
- name: ROUTE_LABELS
value: "k8s.io/route-type=kwaf-secured"
helm upgrade -i haproxy-spoe ./haproxy-spoe
This will create:
- 2 Config Maps for HAProxy with SPOE enabled:
haproxy-template
andmirror
. - A custom HAProxy deployment with the 2 configmaps mounted, to serve as a custom Router/Ingress-controller.