Skip to content

Commit

Permalink
Merge pull request #982 from Kuromesi/streamcontext
Browse files Browse the repository at this point in the history
add clusterid in grpc stream context
  • Loading branch information
kmesh-bot authored Oct 25, 2024
2 parents a4ca182 + 8c72e4c commit 865f832
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/controller/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (

discoveryv3 "github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3"
"google.golang.org/grpc"
"google.golang.org/grpc/metadata"

bpfwl "kmesh.net/kmesh/pkg/bpf/workload"
"kmesh.net/kmesh/pkg/constants"
Expand Down Expand Up @@ -60,6 +61,7 @@ func NewXdsClient(mode string, bpfWorkload *bpfwl.BpfWorkload, enableAccesslog b
}

client.ctx, client.cancel = context.WithCancel(context.Background())
client.ctx = metadata.AppendToOutgoingContext(client.ctx, "ClusterID", client.xdsConfig.Metadata.ClusterID.String())
return client
}

Expand Down

0 comments on commit 865f832

Please sign in to comment.