package client
import "k8s.io/kubernetes/pkg/kubelet/client"
Index ¶
- func MakeInsecureTransport(config *KubeletClientConfig) (http.RoundTripper, error)
- func MakeTransport(config *KubeletClientConfig) (http.RoundTripper, error)
- type ConnectionInfo
- type ConnectionInfoGetter
- type KubeletClientConfig
- type KubeletTLSConfig
- type NodeConnectionInfoGetter
- type NodeGetter
- type NodeGetterFunc
Functions ¶
func MakeInsecureTransport ¶
func MakeInsecureTransport(config *KubeletClientConfig) (http.RoundTripper, error)
MakeInsecureTransport creates an insecure RoundTripper for HTTP Transport.
func MakeTransport ¶
func MakeTransport(config *KubeletClientConfig) (http.RoundTripper, error)
MakeTransport creates a secure RoundTripper for HTTP Transport.
Types ¶
type ConnectionInfo ¶
type ConnectionInfo struct {
Scheme string
Hostname string
Port string
Transport http.RoundTripper
InsecureSkipTLSVerifyTransport http.RoundTripper
}
ConnectionInfo provides the information needed to connect to a kubelet
type ConnectionInfoGetter ¶
type ConnectionInfoGetter interface {
GetConnectionInfo(ctx context.Context, nodeName types.NodeName) (*ConnectionInfo, error)
}
ConnectionInfoGetter provides ConnectionInfo for the kubelet running on a named node
func NewNodeConnectionInfoGetter ¶
func NewNodeConnectionInfoGetter(nodes NodeGetter, config KubeletClientConfig) (ConnectionInfoGetter, error)
NewNodeConnectionInfoGetter creates a new NodeConnectionInfoGetter.
type KubeletClientConfig ¶
type KubeletClientConfig struct {
// Port specifies the default port - used if no information about Kubelet port can be found in Node.NodeStatus.DaemonEndpoints.
Port uint
// ReadOnlyPort specifies the Port for ReadOnly communications.
ReadOnlyPort uint
// PreferredAddressTypes - used to select an address from Node.NodeStatus.Addresses
PreferredAddressTypes []string
// TLSClientConfig contains settings to enable transport layer security
TLSClientConfig KubeletTLSConfig
// HTTPTimeout is used by the client to timeout http requests to Kubelet.
HTTPTimeout time.Duration
// Lookup will give us a dialer if the egress selector is configured for it
Lookup egressselector.Lookup
}
KubeletClientConfig defines config parameters for the kubelet client
type KubeletTLSConfig ¶
type KubeletTLSConfig struct {
// Server requires TLS client certificate authentication
CertFile string
// Server requires TLS client certificate authentication
KeyFile string
// Trusted root certificates for server
CAFile string
}
type NodeConnectionInfoGetter ¶
type NodeConnectionInfoGetter struct {
// contains filtered or unexported fields
}
NodeConnectionInfoGetter obtains connection info from the status of a Node API object
func (*NodeConnectionInfoGetter) GetConnectionInfo ¶
func (k *NodeConnectionInfoGetter) GetConnectionInfo(ctx context.Context, nodeName types.NodeName) (*ConnectionInfo, error)
GetConnectionInfo retrieves connection info from the status of a Node API object.
type NodeGetter ¶
type NodeGetter interface {
Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.Node, error)
}
NodeGetter defines an interface for looking up a node by name
type NodeGetterFunc ¶
type NodeGetterFunc func(ctx context.Context, name string, options metav1.GetOptions) (*v1.Node, error)
NodeGetterFunc allows implementing NodeGetter with a function
func (NodeGetterFunc) Get ¶
func (f NodeGetterFunc) Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.Node, error)
Get fetches information via NodeGetterFunc.
Source Files ¶
kubelet_client.go
- Version
- v1.30.8
- Published
- Dec 10, 2024
- Platform
- windows/amd64
- Imports
- 11 packages
- Last checked
- 17 minutes ago –
Tools for package owners.