kubelet

package
v1.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 1, 2022 License: Apache-2.0 Imports: 16 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeTransport

func MakeTransport(config *KubeletClientConfig) (http.RoundTripper, error)

Types

type ErrNotFound

type ErrNotFound struct {
	// contains filtered or unexported fields
}

func (*ErrNotFound) Error

func (err *ErrNotFound) Error() string

type KubeletClient

type KubeletClient struct {
	// contains filtered or unexported fields
}

func NewKubeletClient

func NewKubeletClient(kubeletConfig *KubeletClientConfig) (*KubeletClient, error)

func (*KubeletClient) GetPort

func (kc *KubeletClient) GetPort() uint

func (*KubeletClient) GetSummary

func (kc *KubeletClient) GetSummary(ip net.IP) (*stats.Summary, 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
}

func (*KubeletClientConfig) BaseURL added in v1.7.1

func (c *KubeletClientConfig) BaseURL(ip net.IP, path string) *url.URL

func (*KubeletClientConfig) HTTPSEnabled added in v1.7.1

func (c *KubeletClientConfig) HTTPSEnabled() bool

func (*KubeletClientConfig) Scheme added in v1.7.1

func (c *KubeletClientConfig) Scheme() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL