pub struct NodeSpec {
pub pod_cidr: Option<String>,
pub pod_cid_rs: Vec<String>,
pub provider_id: Option<String>,
pub unschedulable: Option<bool>,
pub taints: Vec<Taint>,
pub config_source: Option<NodeConfigSource>,
pub external_id: Option<String>,
}
Expand description
NodeSpec describes the attributes that a node is created with.
Fields§
§pod_cidr: Option<String>
PodCIDR represents the pod IP range assigned to the node. +optional
pod_cid_rs: Vec<String>
podCIDRs represents the IP ranges assigned to the node for usage by Pods on that node. If this field is specified, the 0th entry must match the podCIDR field. It may contain at most 1 value for each of IPv4 and IPv6. +optional +patchStrategy=merge +listType=set
provider_id: Option<String>
ID of the node assigned by the cloud provider in the format:
unschedulable: Option<bool>
Unschedulable controls node schedulability of new pods. By default, node is schedulable. More info: https://kubernetes.io/docs/concepts/nodes/node/#manual-node-administration +optional
taints: Vec<Taint>
If specified, the node’s taints. +optional +listType=atomic
config_source: Option<NodeConfigSource>
Deprecated: Previously used to specify the source of the node’s configuration for the DynamicKubeletConfig feature. This feature is removed. +optional
external_id: Option<String>
Deprecated. Not all kubelets will set this field. Remove field after 1.13. see: https://issues.k8s.io/61966 +optional
Implementations§
Source§impl NodeSpec
impl NodeSpec
Sourcepub fn pod_cidr(&self) -> &str
pub fn pod_cidr(&self) -> &str
Returns the value of pod_cidr
, or the default value if pod_cidr
is unset.
Sourcepub fn external_id(&self) -> &str
pub fn external_id(&self) -> &str
Returns the value of external_id
, or the default value if external_id
is unset.
Sourcepub fn provider_id(&self) -> &str
pub fn provider_id(&self) -> &str
Returns the value of provider_id
, or the default value if provider_id
is unset.
Sourcepub fn unschedulable(&self) -> bool
pub fn unschedulable(&self) -> bool
Returns the value of unschedulable
, or the default value if unschedulable
is unset.
Trait Implementations§
Source§impl Message for NodeSpec
impl Message for NodeSpec
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.