title: HAProxy Dynamic Kubernetes Frontend pattern matching
body: <p>Is it possible in HAProxy to match a backend that is being dynamically created with the dataplane consul integration?</p>
  <p>In this case I would like to match dynamically</p>
  <pre><code>frontend hap
    mode http
    bind 127.0.0.1:80
    bind 1.1.1.1:80
    # URL Pattern should be K8S_Namespace/K8S_Service
    acl PATH_srvc path_beg -i /dev/another-nginx-service-nodeport
    # What is desired is to use the backend with wildcards for namespace and service
    # use backend *-K8S_Service-K8S_Namespace
    use_backend consul-backend-1.1.1.1-80-another-nginx-service-nodeport-dev if PATH_srvc
  
  backend consul-backend-1.1.1.1-80-another-nginx-service-nodeport-dev
  </code></pre>
  <p>What I would like to do is match based simply on the namespace, in this case namespace: dev and service name: another-nginx-service-nodeport.</p>
  <p>The consul-backend-ip-port part of the service is not of interest. I am new to HAProxy but I was not able to find something like this in the documentation... I found some hints, but in this case it needs to use a map, something I don't have...</p>
  <pre><code>use_backend be_%[path,map_beg(/etc/hapee-1.8/paths.map)]
  </code></pre>
  <p>This is probably a longshot my goal is to use HAProxy as a Proxy to a series of backends on a K8S cluster, taking advantage of the Consul HAProxy integration.</p>