Documentation ¶
Index ¶
Constants ¶
This section is empty.
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, initConfigDir string, dynamicConfigDir string) (*Controller, error)
NewController constructs a new Controller object and returns it. Directory paths must be absolute. If the `initConfigDir` is an empty string, skips trying to load the init config. 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, 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.