Skip to content

Commit 7aafede

Browse files
cameronmeissnerCameron Meissner
andauthored
fix(client): add WithNoProxy gRPC dial option (#141)
Co-authored-by: Cameron Meissner <cameissner@microsoft.com>
1 parent 9d227c1 commit 7aafede

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

client/internal/bootstrap/grpc.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@ func getServiceClient(token string, cfg *Config) (akssecuretlsbootstrapv1.Secure
6060
retry.WithCodes(codes.Aborted, codes.Unavailable),
6161
retry.WithMax(30),
6262
)),
63+
// forcefully disable usage of HTTP proxy, this is needed since on AKS nodes where the client
64+
// will be running, the no_proxy environment variable will only contain the FQDN of the apiserver
65+
// rather than its IP address. Without this dialer option, only having the FQDN within no_proxy isn't
66+
// enough to have the client bypass any proxies when communicating with the cluster's apiserver.
67+
// see: https://github.com/grpc/grpc-go/issues/3401 for more details.
68+
grpc.WithNoProxy(),
6369
)
6470
if err != nil {
6571
return nil, nil, fmt.Errorf("failed to dial client connection with context: %w", err)

0 commit comments

Comments
 (0)