Hi @abhi-gaur, here are the steps to make it work:
create a ConfigMap object containing errorfile (for instance haproxy-controller/errorfile), as documented here.
add --configmap-errorfiles=haproxy-controller/errorfile parameter referencing errorfile and its namespace to extraArgs in your Helm Chart values override.
-------Configmaps----------
apiVersion: v1 kind: ConfigMap metadata: name: custom-error-pages namespace: haproxy-controller data: 404.html: | <!DOCTYPE html>
503.html: | <!DOCTYPE html>
----------Values.yaml -------------
controller: ingressClassResource: enabled: true stats: enabled: true metrics: enabled: true serviceMonitor: enabled: true labels: release: kube-prometheus-stack metrics: relabelings:
sourceLabels: [__meta_kubernetes_pod_node_name] targetLabel: hostname extraVolumes:
frontend http bind :80 default_backend webservers errorfiles haproxy-errors http-response return status 404 default-errorfiles if { status 404 }
backend webservers balance roundrobin server web1 127.0.0.1:8080 check
--------second values.yaml --------
controller: ingressClassResource: enabled: true stats: enabled: true metrics: enabled: true serviceMonitor: enabled: true labels: release: kube-prometheus-stack metrics: relabelings: