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 <kevin@kleimkuhler.com>
This commit is contained in:
Kevin Leimkuhler 2020-11-20 16:32:50 -05:00 committed by GitHub
parent 8ab6177c1f
commit 92f9387997
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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 // 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). // that this destination knows H2 (and handles our orig-proto translation).
var hint *pb.ProtocolHint var hint *pb.ProtocolHint
if enableH2Upgrade && controllerNS != "" { if enableH2Upgrade && controllerNSLabel != "" {
hint = &pb.ProtocolHint{ hint = &pb.ProtocolHint{
Protocol: &pb.ProtocolHint_H2_{ Protocol: &pb.ProtocolHint_H2_{
H2: &pb.ProtocolHint_H2{}, H2: &pb.ProtocolHint_H2{},