Skip to content

Commit

Permalink
Check correct label value when setting protocl hint (linkerd#5267)
Browse files Browse the repository at this point in the history
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 linkerd#5266.

Signed-off-by: Kevin Leimkuhler <kevin@kleimkuhler.com>
  • Loading branch information
kleimkuhler authored and alpeb committed Dec 1, 2020
1 parent dc0a8f5 commit 4ba7195
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controller/api/destination/endpoint_translator.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{},
Expand Down

0 comments on commit 4ba7195

Please sign in to comment.