Prioritize kubernetes routes by path length

The Kubernetes provider wasn't setting priorities which was causing
shorter paths to get chosen before longer ones. This now matches the
[documentation](https://github.com/containous/traefik/blob/master/docs/basics.md#priorities)
This commit is contained in:
Phil Kates 2016-08-02 16:48:53 -07:00
parent ffa060ce56
commit 79dd72f53d
No known key found for this signature in database
GPG key ID: 245BF217B98BB3EA
3 changed files with 20 additions and 7 deletions

View file

@ -209,6 +209,7 @@ func (provider *Kubernetes) loadIngresses(k8sClient k8s.Client) (*types.Configur
Backend: r.Host + pa.Path,
PassHostHeader: PassHostHeader,
Routes: make(map[string]types.Route),
Priority: len(pa.Path),
}
}
if len(r.Host) > 0 {