options

package
v1.7.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2017 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package options contains all of the primary arguments for a kubelet.

Index

Constants

View Source
const (
	DefaultKubeletPodsDirName       = "pods"
	DefaultKubeletVolumesDirName    = "volumes"
	DefaultKubeletPluginsDirName    = "plugins"
	DefaultKubeletContainersDirName = "containers"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type KubeletFlags added in v1.7.0

type KubeletFlags struct {
	KubeConfig          flag.StringFlag
	BootstrapKubeconfig string

	// If true, an invalid KubeConfig will result in the Kubelet exiting with an error.
	RequireKubeConfig bool
	APIServerList     []string // Deprecated -- use KubeConfig instead

	// Insert a probability of random errors during calls to the master.
	ChaosChance float64
	// Crash immediately, rather than eating panics.
	ReallyCrashForTesting bool

	// TODO(mtaufen): It is increasingly looking like nobody actually uses the
	//                Kubelet's runonce mode anymore, so it may be a candidate
	//                for deprecation and removal.
	// If runOnce is true, the Kubelet will check the API server once for pods,
	// run those in addition to the pods specified by the local manifest, and exit.
	RunOnce bool

	// HostnameOverride is the hostname used to identify the kubelet instead
	// of the actual hostname.
	HostnameOverride string
	// NodeIP is IP address of the node.
	// If set, kubelet will use this IP address for the node.
	NodeIP string
}

A configuration field should go in KubeletFlags instead of KubeletConfiguration if any of these are true:

  • its value will never, or cannot safely be changed during the lifetime of a node
  • its value cannot be safely shared between nodes at the same time (e.g. a hostname) KubeletConfiguration is intended to be shared between nodes

In general, please try to avoid adding flags or configuration fields, we already have a confusingly large amount of them.

func (*KubeletFlags) AddFlags added in v1.7.0

func (f *KubeletFlags) AddFlags(fs *pflag.FlagSet)

AddFlags adds flags for a specific KubeletFlags to the specified FlagSet

type KubeletServer

type KubeletServer struct {
	KubeletFlags
	componentconfig.KubeletConfiguration
}

KubeletServer encapsulates all of the parameters necessary for starting up a kubelet. These can either be set via command line or directly.

func NewKubeletServer

func NewKubeletServer() *KubeletServer

NewKubeletServer will create a new KubeletServer with default values.

func (*KubeletServer) AddFlags

func (s *KubeletServer) AddFlags(fs *pflag.FlagSet)

AddFlags adds flags for a specific KubeletServer to the specified FlagSet

Jump to

Keyboard shortcuts

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