From cdb244e579ff41e4bd76b2d539bc3511a33f3084 Mon Sep 17 00:00:00 2001 From: Elvin Efendi Date: Thu, 18 Oct 2018 15:47:29 -0400 Subject: [PATCH] fix two bugs with backend-protocol annotation --- internal/ingress/controller/controller.go | 1 + internal/ingress/types_equals.go | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/internal/ingress/controller/controller.go b/internal/ingress/controller/controller.go index 33c8ac5a5..d070c5e12 100644 --- a/internal/ingress/controller/controller.go +++ b/internal/ingress/controller/controller.go @@ -824,6 +824,7 @@ func (n *NGINXController) createServers(data []*extensions.Ingress, defLoc.Denied = anns.Denied defLoc.LuaRestyWAF = anns.LuaRestyWAF defLoc.InfluxDB = anns.InfluxDB + defLoc.BackendProtocol = anns.BackendProtocol } else { glog.V(3).Infof("Ingress %q defines both a backend and rules. Using its backend as default upstream for all its rules.", ingKey) diff --git a/internal/ingress/types_equals.go b/internal/ingress/types_equals.go index 49a93c3fb..31e88d1cd 100644 --- a/internal/ingress/types_equals.go +++ b/internal/ingress/types_equals.go @@ -341,6 +341,10 @@ func (l1 *Location) Equal(l2 *Location) bool { return false } + if l1.BackendProtocol != l2.BackendProtocol { + return false + } + return true }