mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 07:27:21 +00:00
Merge pull request #34474 from liggitt/connection-info-refactor
Automatic merge from submit-queue Remove static kubelet client, refactor ConnectionInfoGetter Follow up to https://github.com/kubernetes/kubernetes/pull/33718 * Collapses the multi-valued return to a `ConnectionInfo` struct * Removes the "raw" connection info method and interface, since it was only used in a single non-test location (by the "real" connection info method) * Disentangles the node REST object from being a ConnectionInfoProvider itself by extracting an implementation of ConnectionInfoProvider that takes a node (using a provided NodeGetter) and determines ConnectionInfo * Plumbs the KubeletClientConfig to the point where we construct the helper object that combines the config and the node lookup. I anticipate adding a preference order for choosing an address type in https://github.com/kubernetes/kubernetes/pull/34259
This commit is contained in:
@@ -52,7 +52,6 @@ import (
|
||||
"k8s.io/kubernetes/pkg/genericapiserver"
|
||||
"k8s.io/kubernetes/pkg/genericapiserver/authorizer"
|
||||
genericvalidation "k8s.io/kubernetes/pkg/genericapiserver/validation"
|
||||
kubeletclient "k8s.io/kubernetes/pkg/kubelet/client"
|
||||
"k8s.io/kubernetes/pkg/master"
|
||||
"k8s.io/kubernetes/pkg/registry/cachesize"
|
||||
"k8s.io/kubernetes/pkg/serviceaccount"
|
||||
@@ -138,11 +137,6 @@ func Run(s *options.APIServer) error {
|
||||
// Proxying to pods and services is IP-based... don't expect to be able to verify the hostname
|
||||
proxyTLSClientConfig := &tls.Config{InsecureSkipVerify: true}
|
||||
|
||||
kubeletClient, err := kubeletclient.NewStaticKubeletClient(&s.KubeletConfig)
|
||||
if err != nil {
|
||||
glog.Fatalf("Failed to start kubelet client: %v", err)
|
||||
}
|
||||
|
||||
if s.StorageConfig.DeserializationCacheSize == 0 {
|
||||
// When size of cache is not explicitly set, estimate its size based on
|
||||
// target memory usage.
|
||||
@@ -319,7 +313,7 @@ func Run(s *options.APIServer) error {
|
||||
EnableCoreControllers: true,
|
||||
DeleteCollectionWorkers: s.DeleteCollectionWorkers,
|
||||
EventTTL: s.EventTTL,
|
||||
KubeletClient: kubeletClient,
|
||||
KubeletClientConfig: s.KubeletConfig,
|
||||
EnableUISupport: true,
|
||||
EnableLogsSupport: true,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user