// A configuration field should go in KubeletFlags instead of KubeletConfiguration if
// A configuration field should go in KubeletFlags instead of KubeletConfiguration if any of these are true:
// its value cannot be safely shared between nodes at the same time (e.g. a hostname)
// - 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,
// In general, please try to avoid adding flags or configuration fields,
// we already have a confusingly large amount of them.
// we already have a confusingly large amount of them.
// TODO: curate the ordering and structure of this config object
typeKubeletConfigurationstruct{
typeKubeletConfigurationstruct{
metav1.TypeMeta
metav1.TypeMeta
...
@@ -128,6 +131,15 @@ type KubeletConfiguration struct {
...
@@ -128,6 +131,15 @@ type KubeletConfiguration struct {
EnableDebuggingHandlersbool
EnableDebuggingHandlersbool
// enableContentionProfiling enables lock contention profiling, if enableDebuggingHandlers is true.
// enableContentionProfiling enables lock contention profiling, if enableDebuggingHandlers is true.
EnableContentionProfilingbool
EnableContentionProfilingbool
// minimumGCAge is the minimum age for a finished container before it is
// garbage collected.
MinimumGCAgemetav1.Duration
// maxPerPodContainerCount is the maximum number of old instances to
// retain per container. Each container takes up some disk space.
MaxPerPodContainerCountint32
// maxContainerCount is the maximum number of old instances of containers
// to retain globally. Each container takes up some disk space.
MaxContainerCountint32
// cAdvisorPort is the port of the localhost cAdvisor endpoint (set to 0 to disable)
// cAdvisorPort is the port of the localhost cAdvisor endpoint (set to 0 to disable)
CAdvisorPortint32
CAdvisorPortint32
// healthzPort is the port of the localhost healthz endpoint (set to 0 to disable)
// healthzPort is the port of the localhost healthz endpoint (set to 0 to disable)
...
@@ -144,6 +156,9 @@ type KubeletConfiguration struct {
...
@@ -144,6 +156,9 @@ type KubeletConfiguration struct {
// configure all containers to search this domain in addition to the
// configure all containers to search this domain in addition to the
// host's search domains.
// host's search domains.
ClusterDomainstring
ClusterDomainstring
// masterServiceNamespace is The namespace from which the kubernetes
// master services should be injected into pods.
MasterServiceNamespacestring
// clusterDNS is a list of IP address for a cluster DNS server. If set,
// clusterDNS is a list of IP address for a cluster DNS server. If set,
// kubelet will configure all containers to use this for DNS resolution
// kubelet will configure all containers to use this for DNS resolution
// instead of the host's DNS servers
// instead of the host's DNS servers
...
@@ -195,10 +210,16 @@ type KubeletConfiguration struct {
...
@@ -195,10 +210,16 @@ type KubeletConfiguration struct {
CgroupRootstring
CgroupRootstring
// containerRuntime is the container runtime to use.
// containerRuntime is the container runtime to use.
ContainerRuntimestring
ContainerRuntimestring
// remoteRuntimeEndpoint is the endpoint of remote runtime service
RemoteRuntimeEndpointstring
// remoteImageEndpoint is the endpoint of remote image service
RemoteImageEndpointstring
// runtimeRequestTimeout is the timeout for all runtime requests except long running
// runtimeRequestTimeout is the timeout for all runtime requests except long running
// requests - pull, logs, exec and attach.
// requests - pull, logs, exec and attach.
// +optional
// +optional
RuntimeRequestTimeoutmetav1.Duration
RuntimeRequestTimeoutmetav1.Duration
// experimentalMounterPath is the path of mounter binary. Leave empty to use the default mount path
ExperimentalMounterPathstring
// lockFilePath is the path that kubelet will use to as a lock file.
// lockFilePath is the path that kubelet will use to as a lock file.
// It uses this file as a lock to synchronize with other kubelet processes
// It uses this file as a lock to synchronize with other kubelet processes
// that may be running.
// that may be running.
...
@@ -228,8 +249,14 @@ type KubeletConfiguration struct {
...
@@ -228,8 +249,14 @@ type KubeletConfiguration struct {
// cpuCFSQuota is Enable CPU CFS quota enforcement for containers that
// cpuCFSQuota is Enable CPU CFS quota enforcement for containers that
// specify CPU limits
// specify CPU limits
CPUCFSQuotabool
CPUCFSQuotabool
// containerized should be set to true if kubelet is running in a container.
Containerizedbool
// maxOpenFiles is Number of files that can be opened by Kubelet process.
// maxOpenFiles is Number of files that can be opened by Kubelet process.
MaxOpenFilesint64
MaxOpenFilesint64
// registerSchedulable tells the kubelet to register the node as
// schedulable. Won't have any effect if register-node is false.
// DEPRECATED: use registerWithTaints instead
RegisterSchedulablebool
// registerWithTaints are an array of taints to add to a node object when
// registerWithTaints are an array of taints to add to a node object when
// the kubelet registers itself. This only takes effect when registerNode
// the kubelet registers itself. This only takes effect when registerNode
// is true and upon the initial registration of the node.
// is true and upon the initial registration of the node.
...
@@ -248,6 +275,8 @@ type KubeletConfiguration struct {
...
@@ -248,6 +275,8 @@ type KubeletConfiguration struct {
SerializeImagePullsbool
SerializeImagePullsbool
// nodeLabels to add when registering the node in the cluster.
// nodeLabels to add when registering the node in the cluster.
NodeLabelsmap[string]string
NodeLabelsmap[string]string
// nonMasqueradeCIDR configures masquerading: traffic to IPs outside this range will use IP masquerade.
NonMasqueradeCIDRstring
// enable gathering custom metrics.
// enable gathering custom metrics.
EnableCustomMetricsbool
EnableCustomMetricsbool
// Comma-delimited list of hard eviction expressions. For example, 'memory.available<300Mi'.
// Comma-delimited list of hard eviction expressions. For example, 'memory.available<300Mi'.
...
@@ -268,12 +297,19 @@ type KubeletConfiguration struct {
...
@@ -268,12 +297,19 @@ type KubeletConfiguration struct {
// Comma-delimited list of minimum reclaims (e.g. imagefs.available=2Gi) that describes the minimum amount of resource the kubelet will reclaim when performing a pod eviction if that resource is under pressure.
// Comma-delimited list of minimum reclaims (e.g. imagefs.available=2Gi) that describes the minimum amount of resource the kubelet will reclaim when performing a pod eviction if that resource is under pressure.
// +optional
// +optional
EvictionMinimumReclaimstring
EvictionMinimumReclaimstring
// If enabled, the kubelet will integrate with the kernel memcg notification to determine if memory eviction thresholds are crossed rather than polling.
// +optional
ExperimentalKernelMemcgNotificationbool
// Maximum number of pods per core. Cannot exceed MaxPods
// Maximum number of pods per core. Cannot exceed MaxPods
PodsPerCoreint32
PodsPerCoreint32
// enableControllerAttachDetach enables the Attach/Detach controller to
// enableControllerAttachDetach enables the Attach/Detach controller to
// manage attachment/detachment of volumes scheduled to this node, and
// manage attachment/detachment of volumes scheduled to this node, and
// disables kubelet from executing any attach/detach operations
// disables kubelet from executing any attach/detach operations
EnableControllerAttachDetachbool
EnableControllerAttachDetachbool
// A set of ResourceName=Percentage (e.g. memory=50%) pairs that describe
// how pod resource requests are reserved at the QoS level.
// Currently only memory is supported. [default=none]"
ExperimentalQOSReservedConfigurationMap
// Default behaviour for kernel tuning
// Default behaviour for kernel tuning
ProtectKernelDefaultsbool
ProtectKernelDefaultsbool
// If true, Kubelet ensures a set of iptables rules are present on host.
// If true, Kubelet ensures a set of iptables rules are present on host.
...
@@ -288,11 +324,21 @@ type KubeletConfiguration struct {
...
@@ -288,11 +324,21 @@ type KubeletConfiguration struct {
// iptablesDropBit is the bit of the iptables fwmark space to use for dropping packets. Kubelet will ensure iptables mark and drop rules.
// iptablesDropBit is the bit of the iptables fwmark space to use for dropping packets. Kubelet will ensure iptables mark and drop rules.
// Values must be within the range [0, 31]. Must be different from IPTablesMasqueradeBit
// Values must be within the range [0, 31]. Must be different from IPTablesMasqueradeBit
IPTablesDropBitint32
IPTablesDropBitint32
// Whitelist of unsafe sysctls or sysctl patterns (ending in *).
// +optional
AllowedUnsafeSysctls[]string
// featureGates is a string of comma-separated key=value pairs that describe feature
// featureGates is a string of comma-separated key=value pairs that describe feature
// gates for alpha/experimental features.
// gates for alpha/experimental features.
FeatureGatesstring
FeatureGatesstring
// Tells the Kubelet to fail to start if swap is enabled on the node.
// Tells the Kubelet to fail to start if swap is enabled on the node.
FailSwapOnbool
FailSwapOnbool
// This flag, if set, enables a check prior to mount operations to verify that the required components
// (binaries, etc.) to mount the volume are available on the underlying node. If the check is enabled
// and fails the mount operation fails.
ExperimentalCheckNodeCapabilitiesBeforeMountbool
// This flag, if set, instructs the kubelet to keep volumes from terminated pods mounted to the node.
// This can be useful for debugging volume related issues.
KeepTerminatedPodVolumesbool
/* following flags are meant for Node Allocatable */
/* following flags are meant for Node Allocatable */
...
@@ -316,6 +362,9 @@ type KubeletConfiguration struct {
...
@@ -316,6 +362,9 @@ type KubeletConfiguration struct {
// This flag accepts a list of options. Acceptable options are `pods`, `system-reserved` & `kube-reserved`.
// This flag accepts a list of options. Acceptable options are `pods`, `system-reserved` & `kube-reserved`.
// Refer to [Node Allocatable](https://git.k8s.io/community/contributors/design-proposals/node-allocatable.md) doc for more information.
// Refer to [Node Allocatable](https://git.k8s.io/community/contributors/design-proposals/node-allocatable.md) doc for more information.
EnforceNodeAllocatable[]string
EnforceNodeAllocatable[]string
// This flag, if set, will avoid including `EvictionHard` limits while computing Node Allocatable.
// Refer to [Node Allocatable](https://git.k8s.io/community/contributors/design-proposals/node-allocatable.md) doc for more information.
// Comma-delimited list of minimum reclaims (e.g. imagefs.available=2Gi) that describes the minimum amount of resource the kubelet will reclaim when performing a pod eviction if that resource is under pressure.
// Comma-delimited list of minimum reclaims (e.g. imagefs.available=2Gi) that describes the minimum amount of resource the kubelet will reclaim when performing a pod eviction if that resource is under pressure.
// If enabled, the kubelet will integrate with the kernel memcg notification to determine if memory eviction thresholds are crossed rather than polling.