From 92f93879970ccd7a7fb9442cbd35abb65cd4b2b5 Mon Sep 17 00:00:00 2001 From: Kevin Leimkuhler Date: Fri, 20 Nov 2020 16:32:50 -0500 Subject: [PATCH] Check correct label value when setting protocl hint (#5267) This fixes an issue where the protocol hint is always set on endpoint responses. We now check the right value which determines if the pod has the required label. A test for this has been added to #5266. Signed-off-by: Kevin Leimkuhler --- controller/api/destination/endpoint_translator.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controller/api/destination/endpoint_translator.go b/controller/api/destination/endpoint_translator.go index d7346bf9fb419..41d9692640895 100644 --- a/controller/api/destination/endpoint_translator.go +++ b/controller/api/destination/endpoint_translator.go @@ -307,7 +307,7 @@ func toWeightedAddr(address watcher.Address, enableH2Upgrade bool, identityTrust // If the pod is controlled by any Linkerd control plane, then it can be hinted // that this destination knows H2 (and handles our orig-proto translation). var hint *pb.ProtocolHint - if enableH2Upgrade && controllerNS != "" { + if enableH2Upgrade && controllerNSLabel != "" { hint = &pb.ProtocolHint{ Protocol: &pb.ProtocolHint_H2_{ H2: &pb.ProtocolHint_H2{},