kubernetesk8s.io/kubernetes/pkg/kubelet/client Index | Files

package client

import "k8s.io/kubernetes/pkg/kubelet/client"

Index

Functions

func MakeTransport

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

Types

type ConnectionInfoGetter

type ConnectionInfoGetter interface {
	GetConnectionInfo(ctx api.Context, nodeName string) (scheme string, port uint, transport http.RoundTripper, err error)
}

type FakeKubeletClient

type FakeKubeletClient struct{}

FakeKubeletClient is a fake implementation of KubeletClient which returns an error when called. It is useful to pass to the master in a test configuration with no kubelets.

func (FakeKubeletClient) GetConnectionInfo

func (c FakeKubeletClient) GetConnectionInfo(ctx api.Context, nodeName string) (string, uint, http.RoundTripper, error)

type HTTPKubeletClient

type HTTPKubeletClient struct {
	Client *http.Client
	Config *KubeletClientConfig
}

HTTPKubeletClient is the default implementation of KubeletHealthchecker, accesses the kubelet over HTTP.

func (*HTTPKubeletClient) GetConnectionInfo

func (c *HTTPKubeletClient) GetConnectionInfo(ctx api.Context, nodeName string) (string, uint, http.RoundTripper, error)

In default HTTPKubeletClient ctx is unused.

type KubeletClient

type KubeletClient interface {
	ConnectionInfoGetter
}

KubeletClient is an interface for all kubelet functionality

func NewStaticKubeletClient

func NewStaticKubeletClient(config *KubeletClientConfig) (KubeletClient, error)

TODO: this structure is questionable, it should be using client.Config and overriding defaults.

type KubeletClientConfig

type KubeletClientConfig struct {
	// Default port - used if no information about Kubelet port can be found in Node.NodeStatus.DaemonEndpoints.
	Port        uint
	EnableHttps bool

	// 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 func(net, addr string) (net.Conn, error)
}

Source Files

kubelet_client.go

Version
v1.4.2
Published
Oct 15, 2016
Platform
js/wasm
Imports
11 packages
Last checked
3 minutes ago

Tools for package owners.