kubeletconfig

package
v1.13.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2018 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// KubeletConfigChangedEventReason identifies an event as a change of Kubelet configuration
	KubeletConfigChangedEventReason = "KubeletConfigChanged"
	// LocalEventMessage is sent when the Kubelet restarts to use local config
	LocalEventMessage = "Kubelet restarting to use local config"
	// RemoteEventMessageFmt is sent when the Kubelet restarts to use a remote config
	RemoteEventMessageFmt = "Kubelet restarting to use %s, UID: %s, ResourceVersion: %s, KubeletConfigKey: %s"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

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

Controller manages syncing dynamic Kubelet configurations For more information, see the proposal: https://github.com/kubernetes/community/blob/master/contributors/design-proposals/node/dynamic-kubelet-configuration.md

func NewController

func NewController(dynamicConfigDir string, transform TransformFunc) *Controller

NewController constructs a new Controller object and returns it. The dynamicConfigDir path must be absolute. transform applies an arbitrary transformation to config after loading, and before validation. This can be used, for example, to include config from flags before the controller's validation step. If transform returns an error, loadConfig will fail, and an InternalError will be reported. Be wary if using this function as an extension point, in most cases the controller should probably just be natively extended to do what you need. Injecting flag precedence transformations is something of an exception because the caller of this controller (cmd/) is aware of flags, but this controller's tree (pkg/) is not.

func (*Controller) Bootstrap

func (cc *Controller) Bootstrap() (*kubeletconfig.KubeletConfiguration, error)

Bootstrap attempts to return a valid KubeletConfiguration based on the configuration of the Controller, or returns an error if no valid configuration could be produced. Bootstrap should be called synchronously before StartSync. If the pre-existing local configuration should be used, Bootstrap returns a nil config.

func (*Controller) StartSync

func (cc *Controller) StartSync(client clientset.Interface, eventClient v1core.EventsGetter, nodeName string) error

StartSync tells the controller to start the goroutines that sync status/config to/from the API server. The clients must be non-nil, and the nodeName must be non-empty.

type TransformFunc added in v1.11.0

type TransformFunc func(kc *kubeletconfig.KubeletConfiguration) error

TransformFunc edits the KubeletConfiguration in-place, and returns an error if any of the transformations failed.

Directories

Path Synopsis
util
log

Jump to

Keyboard shortcuts

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