Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeTransport ¶
func MakeTransport(config *KubeletClientConfig) (http.RoundTripper, error)
Types ¶
type ConnectionInfo ¶ added in v1.5.1
type ConnectionInfo struct { Scheme string Hostname string Port string Transport 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 ¶ added in v1.5.1
func NewNodeConnectionInfoGetter(nodes NodeGetter, config KubeletClientConfig) (ConnectionInfoGetter, error)
type KubeletClientConfig ¶
type KubeletClientConfig struct { // Default port - used if no information about Kubelet port can be found in Node.NodeStatus.DaemonEndpoints. Port uint ReadOnlyPort uint EnableHttps bool // PreferredAddressTypes - used to select an address from Node.NodeStatus.Addresses PreferredAddressTypes []string // TLSClientConfig contains settings to enable transport layer security restclient.TLSClientConfig // Server requires Bearer authentication BearerToken string // HTTPTimeout is used by the client to timeout http requests to Kubelet. HTTPTimeout time.Duration // Dial is a custom dialer used for the client Dial utilnet.DialFunc }
type NodeConnectionInfoGetter ¶ added in v1.5.1
type NodeConnectionInfoGetter struct {
// contains filtered or unexported fields
}
NodeConnectionInfoGetter obtains connection info from the status of a Node API object
func (*NodeConnectionInfoGetter) GetConnectionInfo ¶ added in v1.5.1
func (k *NodeConnectionInfoGetter) GetConnectionInfo(ctx context.Context, nodeName types.NodeName) (*ConnectionInfo, error)
type NodeGetter ¶ added in v1.5.1
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 ¶ added in v1.5.1
type NodeGetterFunc func(ctx context.Context, name string, options metav1.GetOptions) (*v1.Node, error)
NodeGetterFunc allows implementing NodeGetter with a function
Click to show internal directories.
Click to hide internal directories.