NodeKubeletConfig

Struct NodeKubeletConfig 

Source
#[non_exhaustive]
pub struct NodeKubeletConfig {
Show 20 fields pub cpu_manager_policy: String, pub topology_manager: Option<TopologyManager>, pub memory_manager: Option<MemoryManager>, pub cpu_cfs_quota: Option<BoolValue>, pub cpu_cfs_quota_period: String, pub pod_pids_limit: i64, pub insecure_kubelet_readonly_port_enabled: Option<bool>, pub image_gc_low_threshold_percent: i32, pub image_gc_high_threshold_percent: i32, pub image_minimum_gc_age: String, pub image_maximum_gc_age: String, pub container_log_max_size: String, pub container_log_max_files: i32, pub allowed_unsafe_sysctls: Vec<String>, pub eviction_soft: Option<EvictionSignals>, pub eviction_soft_grace_period: Option<EvictionGracePeriod>, pub eviction_minimum_reclaim: Option<EvictionMinimumReclaim>, pub eviction_max_pod_grace_period_seconds: i32, pub max_parallel_image_pulls: i32, pub single_process_oom_kill: Option<bool>, /* private fields */
}
Expand description

Node kubelet configs.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§cpu_manager_policy: String

Control the CPU management policy on the node. See https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/

The following values are allowed.

  • “none”: the default, which represents the existing scheduling behavior.
  • “static”: allows pods with certain resource characteristics to be granted increased CPU affinity and exclusivity on the node. The default value is ‘none’ if unspecified.
§topology_manager: Option<TopologyManager>

Optional. Controls Topology Manager configuration on the node. For more information, see: https://kubernetes.io/docs/tasks/administer-cluster/topology-manager/

§memory_manager: Option<MemoryManager>

Optional. Controls NUMA-aware Memory Manager configuration on the node. For more information, see: https://kubernetes.io/docs/tasks/administer-cluster/memory-manager/

§cpu_cfs_quota: Option<BoolValue>

Enable CPU CFS quota enforcement for containers that specify CPU limits.

This option is enabled by default which makes kubelet use CFS quota (https://www.kernel.org/doc/Documentation/scheduler/sched-bwc.txt) to enforce container CPU limits. Otherwise, CPU limits will not be enforced at all.

Disable this option to mitigate CPU throttling problems while still having your pods to be in Guaranteed QoS class by specifying the CPU limits.

The default value is ‘true’ if unspecified.

§cpu_cfs_quota_period: String

Set the CPU CFS quota period value ‘cpu.cfs_period_us’.

The string must be a sequence of decimal numbers, each with optional fraction and a unit suffix, such as “300ms”. Valid time units are “ns”, “us” (or “µs”), “ms”, “s”, “m”, “h”. The value must be a positive duration between 1ms and 1 second, inclusive.

§pod_pids_limit: i64

Set the Pod PID limits. See https://kubernetes.io/docs/concepts/policy/pid-limiting/#pod-pid-limits

Controls the maximum number of processes allowed to run in a pod. The value must be greater than or equal to 1024 and less than 4194304.

§insecure_kubelet_readonly_port_enabled: Option<bool>

Enable or disable Kubelet read only port.

§image_gc_low_threshold_percent: i32

Optional. Defines the percent of disk usage before which image garbage collection is never run. Lowest disk usage to garbage collect to. The percent is calculated as this field value out of 100.

The value must be between 10 and 85, inclusive and smaller than image_gc_high_threshold_percent.

The default value is 80 if unspecified.

§image_gc_high_threshold_percent: i32

Optional. Defines the percent of disk usage after which image garbage collection is always run. The percent is calculated as this field value out of 100.

The value must be between 10 and 85, inclusive and greater than image_gc_low_threshold_percent.

The default value is 85 if unspecified.

§image_minimum_gc_age: String

Optional. Defines the minimum age for an unused image before it is garbage collected.

The string must be a sequence of decimal numbers, each with optional fraction and a unit suffix, such as “300s”, “1.5h”, and “2h45m”. Valid time units are “ns”, “us” (or “µs”), “ms”, “s”, “m”, “h”.

The value must be a positive duration less than or equal to 2 minutes.

The default value is “2m0s” if unspecified.

§image_maximum_gc_age: String

Optional. Defines the maximum age an image can be unused before it is garbage collected. The string must be a sequence of decimal numbers, each with optional fraction and a unit suffix, such as “300s”, “1.5h”, and “2h45m”. Valid time units are “ns”, “us” (or “µs”), “ms”, “s”, “m”, “h”.

The value must be a positive duration greater than image_minimum_gc_age or “0s”.

The default value is “0s” if unspecified, which disables this field, meaning images won’t be garbage collected based on being unused for too long.

§container_log_max_size: String

Optional. Defines the maximum size of the container log file before it is rotated. See https://kubernetes.io/docs/concepts/cluster-administration/logging/#log-rotation

Valid format is positive number + unit, e.g. 100Ki, 10Mi. Valid units are Ki, Mi, Gi. The value must be between 10Mi and 500Mi, inclusive.

Note that the total container log size (container_log_max_size * container_log_max_files) cannot exceed 1% of the total storage of the node, to avoid disk pressure caused by log files.

The default value is 10Mi if unspecified.

§container_log_max_files: i32

Optional. Defines the maximum number of container log files that can be present for a container. See https://kubernetes.io/docs/concepts/cluster-administration/logging/#log-rotation

The value must be an integer between 2 and 10, inclusive. The default value is 5 if unspecified.

§allowed_unsafe_sysctls: Vec<String>

Optional. Defines a comma-separated allowlist of unsafe sysctls or sysctl patterns (ending in *).

The unsafe namespaced sysctl groups are kernel.shm*, kernel.msg*, kernel.sem, fs.mqueue.*, and net.*. Leaving this allowlist empty means they cannot be set on Pods.

To allow certain sysctls or sysctl patterns to be set on Pods, list them separated by commas. For example: kernel.msg*,net.ipv4.route.min_pmtu.

See https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/ for more details.

§eviction_soft: Option<EvictionSignals>

Optional. eviction_soft is a map of signal names to quantities that defines soft eviction thresholds. Each signal is compared to its corresponding threshold to determine if a pod eviction should occur.

§eviction_soft_grace_period: Option<EvictionGracePeriod>

Optional. eviction_soft_grace_period is a map of signal names to quantities that defines grace periods for each soft eviction signal. The grace period is the amount of time that a pod must be under pressure before an eviction occurs.

§eviction_minimum_reclaim: Option<EvictionMinimumReclaim>

Optional. eviction_minimum_reclaim is a map of signal names to quantities that defines minimum reclaims, which describe the minimum amount of a given resource the kubelet will reclaim when performing a pod eviction while that resource is under pressure.

§eviction_max_pod_grace_period_seconds: i32

Optional. eviction_max_pod_grace_period_seconds is the maximum allowed grace period (in seconds) to use when terminating pods in response to a soft eviction threshold being met. This value effectively caps the Pod’s terminationGracePeriodSeconds value during soft evictions. Default: 0. Range: [0, 300].

§max_parallel_image_pulls: i32

Optional. Defines the maximum number of image pulls in parallel. The range is 2 to 5, inclusive. The default value is 2 or 3 depending on the disk type.

See https://kubernetes.io/docs/concepts/containers/images/#maximum-parallel-image-pulls for more details.

§single_process_oom_kill: Option<bool>

Optional. Defines whether to enable single process OOM killer. If true, will prevent the memory.oom.group flag from being set for container cgroups in cgroups v2. This causes processes in the container to be OOM killed individually instead of as a group.

Implementations§

Source§

impl NodeKubeletConfig

Source

pub fn new() -> Self

Source

pub fn set_cpu_manager_policy<T: Into<String>>(self, v: T) -> Self

Sets the value of cpu_manager_policy.

Source

pub fn set_topology_manager<T>(self, v: T) -> Self

Sets the value of topology_manager.

Source

pub fn set_or_clear_topology_manager<T>(self, v: Option<T>) -> Self

Sets or clears the value of topology_manager.

Source

pub fn set_memory_manager<T>(self, v: T) -> Self
where T: Into<MemoryManager>,

Sets the value of memory_manager.

Source

pub fn set_or_clear_memory_manager<T>(self, v: Option<T>) -> Self
where T: Into<MemoryManager>,

Sets or clears the value of memory_manager.

Source

pub fn set_cpu_cfs_quota<T>(self, v: T) -> Self
where T: Into<BoolValue>,

Sets the value of cpu_cfs_quota.

Source

pub fn set_or_clear_cpu_cfs_quota<T>(self, v: Option<T>) -> Self
where T: Into<BoolValue>,

Sets or clears the value of cpu_cfs_quota.

Source

pub fn set_cpu_cfs_quota_period<T: Into<String>>(self, v: T) -> Self

Sets the value of cpu_cfs_quota_period.

Source

pub fn set_pod_pids_limit<T: Into<i64>>(self, v: T) -> Self

Sets the value of pod_pids_limit.

Source

pub fn set_insecure_kubelet_readonly_port_enabled<T>(self, v: T) -> Self
where T: Into<bool>,

Source

pub fn set_or_clear_insecure_kubelet_readonly_port_enabled<T>( self, v: Option<T>, ) -> Self
where T: Into<bool>,

Sets or clears the value of insecure_kubelet_readonly_port_enabled.

Source

pub fn set_image_gc_low_threshold_percent<T: Into<i32>>(self, v: T) -> Self

Sets the value of image_gc_low_threshold_percent.

Source

pub fn set_image_gc_high_threshold_percent<T: Into<i32>>(self, v: T) -> Self

Source

pub fn set_image_minimum_gc_age<T: Into<String>>(self, v: T) -> Self

Sets the value of image_minimum_gc_age.

Source

pub fn set_image_maximum_gc_age<T: Into<String>>(self, v: T) -> Self

Sets the value of image_maximum_gc_age.

Source

pub fn set_container_log_max_size<T: Into<String>>(self, v: T) -> Self

Sets the value of container_log_max_size.

Source

pub fn set_container_log_max_files<T: Into<i32>>(self, v: T) -> Self

Sets the value of container_log_max_files.

Source

pub fn set_allowed_unsafe_sysctls<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<String>,

Sets the value of allowed_unsafe_sysctls.

Source

pub fn set_eviction_soft<T>(self, v: T) -> Self

Sets the value of eviction_soft.

Source

pub fn set_or_clear_eviction_soft<T>(self, v: Option<T>) -> Self

Sets or clears the value of eviction_soft.

Source

pub fn set_eviction_soft_grace_period<T>(self, v: T) -> Self

Sets the value of eviction_soft_grace_period.

Source

pub fn set_or_clear_eviction_soft_grace_period<T>(self, v: Option<T>) -> Self

Sets or clears the value of eviction_soft_grace_period.

Source

pub fn set_eviction_minimum_reclaim<T>(self, v: T) -> Self

Sets the value of eviction_minimum_reclaim.

Source

pub fn set_or_clear_eviction_minimum_reclaim<T>(self, v: Option<T>) -> Self

Sets or clears the value of eviction_minimum_reclaim.

Source

pub fn set_eviction_max_pod_grace_period_seconds<T: Into<i32>>( self, v: T, ) -> Self

Source

pub fn set_max_parallel_image_pulls<T: Into<i32>>(self, v: T) -> Self

Sets the value of max_parallel_image_pulls.

Source

pub fn set_single_process_oom_kill<T>(self, v: T) -> Self
where T: Into<bool>,

Sets the value of single_process_oom_kill.

Source

pub fn set_or_clear_single_process_oom_kill<T>(self, v: Option<T>) -> Self
where T: Into<bool>,

Sets or clears the value of single_process_oom_kill.

Trait Implementations§

Source§

impl Clone for NodeKubeletConfig

Source§

fn clone(&self) -> NodeKubeletConfig

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for NodeKubeletConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for NodeKubeletConfig

Source§

fn default() -> NodeKubeletConfig

Returns the “default value” for a type. Read more
Source§

impl Message for NodeKubeletConfig

Source§

fn typename() -> &'static str

The typename of this message.
Source§

impl PartialEq for NodeKubeletConfig

Source§

fn eq(&self, other: &NodeKubeletConfig) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for NodeKubeletConfig

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,