kubeletconfig

package
v1.2.0-alpha.5....-8a98da9 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// KubeletConfigChangedEventReason identifies an event as a change of Kubelet configuration
	KubeletConfigChangedEventReason = "KubeletConfigChanged"
	// EventMessageFmt is the message format for Kubelet config change events
	EventMessageFmt = "Kubelet will restart to use: %s"
	// LocalConfigMessage is the text to apply to EventMessageFmt when the Kubelet has been configured to use its local config (init or defaults)
	LocalConfigMessage = "local config"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

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

Controller is the controller which, among other things: - loads configuration from disk - checkpoints configuration to disk - downloads new configuration from the API server - validates configuration - tracks the last-known-good configuration, and rolls-back to last-known-good when necessary 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(defaultConfig *kubeletconfig.KubeletConfiguration,
	kubeletConfigFile string,
	dynamicConfigDir string) (*Controller, error)

NewController constructs a new Controller object and returns it. Directory paths must be absolute. If the `kubeletConfigFile` is an empty string, skips trying to load the kubelet config file. If the `dynamicConfigDir` is an empty string, skips trying to load checkpoints or download new config, but will still sync the ConfigOK condition if you call StartSync with a non-nil client.

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.

func (*Controller) StartSync

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

StartSync launches the controller's sync loops if `client` is non-nil and `nodeName` is non-empty. It will always start the Node condition reporting loop, and will also start the dynamic conifg sync loops if dynamic config is enabled on the controller. If `nodeName` is empty but `client` is non-nil, an error is logged.

Directories

Path Synopsis
util
log

Jump to

Keyboard shortcuts

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