From 8552351af0d5b919fd581c978c1c211b02006443 Mon Sep 17 00:00:00 2001 From: Joao Morais Date: Thu, 30 Mar 2017 22:30:39 -0300 Subject: [PATCH] Add annotations to location of default backend (root context) --- core/pkg/ingress/controller/controller.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/pkg/ingress/controller/controller.go b/core/pkg/ingress/controller/controller.go index 2cc410182..82bedae32 100644 --- a/core/pkg/ingress/controller/controller.go +++ b/core/pkg/ingress/controller/controller.go @@ -624,6 +624,12 @@ func (ic *GenericController) getBackendServers() ([]*ingress.Backend, []*ingress server = servers[defServerName] } + // Add annotations to location of default backend (root context) + if len(server.Locations) > 0 { + loc := server.Locations[0] + mergeLocationAnnotations(loc, anns) + } + if rule.HTTP == nil && host != defServerName { glog.V(3).Infof("ingress rule %v/%v does not contains HTTP rules. using default backend", ing.Namespace, ing.Name)