Merge pull request #123463 from k82cn/cri_grpc_rs
grpc: set localhost Authority to unix client calls
This commit is contained in:
		@@ -59,6 +59,7 @@ func NewRemoteImageService(endpoint string, connectionTimeout time.Duration, tp
 | 
				
			|||||||
	var dialOpts []grpc.DialOption
 | 
						var dialOpts []grpc.DialOption
 | 
				
			||||||
	dialOpts = append(dialOpts,
 | 
						dialOpts = append(dialOpts,
 | 
				
			||||||
		grpc.WithTransportCredentials(insecure.NewCredentials()),
 | 
							grpc.WithTransportCredentials(insecure.NewCredentials()),
 | 
				
			||||||
 | 
							grpc.WithAuthority("localhost"),
 | 
				
			||||||
		grpc.WithContextDialer(dialer),
 | 
							grpc.WithContextDialer(dialer),
 | 
				
			||||||
		grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(maxMsgSize)))
 | 
							grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(maxMsgSize)))
 | 
				
			||||||
	if utilfeature.DefaultFeatureGate.Enabled(features.KubeletTracing) {
 | 
						if utilfeature.DefaultFeatureGate.Enabled(features.KubeletTracing) {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -87,6 +87,7 @@ func NewRemoteRuntimeService(endpoint string, connectionTimeout time.Duration, t
 | 
				
			|||||||
	var dialOpts []grpc.DialOption
 | 
						var dialOpts []grpc.DialOption
 | 
				
			||||||
	dialOpts = append(dialOpts,
 | 
						dialOpts = append(dialOpts,
 | 
				
			||||||
		grpc.WithTransportCredentials(insecure.NewCredentials()),
 | 
							grpc.WithTransportCredentials(insecure.NewCredentials()),
 | 
				
			||||||
 | 
							grpc.WithAuthority("localhost"),
 | 
				
			||||||
		grpc.WithContextDialer(dialer),
 | 
							grpc.WithContextDialer(dialer),
 | 
				
			||||||
		grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(maxMsgSize)))
 | 
							grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(maxMsgSize)))
 | 
				
			||||||
	if utilfeature.DefaultFeatureGate.Enabled(features.KubeletTracing) {
 | 
						if utilfeature.DefaultFeatureGate.Enabled(features.KubeletTracing) {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user