Fix panic in k8s loadIngresses
Signed-off-by: Emile Vauge <emile@vauge.com>
This commit is contained in:
parent
be362f0d9f
commit
5a67d0ac84
5 changed files with 29 additions and 5 deletions
|
@ -110,6 +110,10 @@ func (provider *Kubernetes) loadIngresses(k8sClient k8s.Client) (*types.Configur
|
|||
PassHostHeader := provider.getPassHostHeader()
|
||||
for _, i := range ingresses {
|
||||
for _, r := range i.Spec.Rules {
|
||||
if r.HTTP == nil {
|
||||
log.Warnf("Error in ingress: HTTP is nil")
|
||||
continue
|
||||
}
|
||||
for _, pa := range r.HTTP.Paths {
|
||||
if _, exists := templateObjects.Backends[r.Host+pa.Path]; !exists {
|
||||
templateObjects.Backends[r.Host+pa.Path] = &types.Backend{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue