pub struct MachineSpec {
pub bootstrap: MachineBootstrap,
pub cluster_name: String,
pub deletion: Option<MachineDeletion>,
pub failure_domain: Option<String>,
pub infrastructure_ref: MachineInfrastructureRef,
pub min_ready_seconds: Option<i32>,
pub provider_id: Option<String>,
pub readiness_gates: Option<Vec<MachineReadinessGates>>,
pub taints: Option<Vec<MachineTaints>>,
pub version: Option<String>,
}Expand description
spec is the desired state of Machine.
Fields§
§bootstrap: MachineBootstrapbootstrap is a reference to a local struct which encapsulates fields to configure the Machine’s bootstrapping mechanism.
cluster_name: StringclusterName is the name of the Cluster this object belongs to.
deletion: Option<MachineDeletion>deletion contains configuration options for Machine deletion.
failure_domain: Option<String>failureDomain is the failure domain the machine will be created in. Must match the name of a FailureDomain from the Cluster status.
infrastructure_ref: MachineInfrastructureRefinfrastructureRef is a required reference to a custom resource offered by an infrastructure provider.
min_ready_seconds: Option<i32>minReadySeconds is the minimum number of seconds for which a Machine should be ready before considering it available. Defaults to 0 (Machine will be considered available as soon as the Machine is ready)
provider_id: Option<String>providerID is the identification ID of the machine provided by the provider. This field must match the provider ID as seen on the node object corresponding to this machine. This field is required by higher level consumers of cluster-api. Example use case is cluster autoscaler with cluster-api as provider. Clean-up logic in the autoscaler compares machines to nodes to find out machines at provider which could not get registered as Kubernetes nodes. With cluster-api as a generic out-of-tree provider for autoscaler, this field is required by autoscaler to be able to have a provider view of the list of machines. Another list of nodes is queried from the k8s apiserver and then a comparison is done to find out unregistered machines and are marked for delete. This field will be set by the actuators and consumed by higher level entities like autoscaler that will be interfacing with cluster-api as generic provider.
readiness_gates: Option<Vec<MachineReadinessGates>>readinessGates specifies additional conditions to include when evaluating Machine Ready condition.
This field can be used e.g. by Cluster API control plane providers to extend the semantic of the Ready condition for the Machine they control, like the kubeadm control provider adding ReadinessGates for the APIServerPodHealthy, SchedulerPodHealthy conditions, etc.
Another example are external controllers, e.g. responsible to install special software/hardware on the Machines; they can include the status of those components with a new condition and add this condition to ReadinessGates.
NOTE: In case readinessGates conditions start with the APIServer, ControllerManager, Scheduler prefix, and all those readiness gates condition are reporting the same message, when computing the Machine’s Ready condition those readinessGates will be replaced by a single entry reporting “Control plane components: “ + message. This helps to improve readability of conditions bubbling up to the Machine’s owner resource / to the Cluster).
taints: Option<Vec<MachineTaints>>taints are the node taints that Cluster API will manage. This list is not necessarily complete: other Kubernetes components may add or remove other taints from nodes, e.g. the node controller might add the node.kubernetes.io/not-ready taint. Only those taints defined in this list will be added or removed by core Cluster API controllers.
There can be at most 64 taints. A pod would have to tolerate all existing taints to run on the corresponding node.
NOTE: This list is implemented as a “map” type, meaning that individual elements can be managed by different owners.
version: Option<String>version defines the desired Kubernetes version. This field is meant to be optionally used by bootstrap providers.
Trait Implementations§
Source§impl Clone for MachineSpec
impl Clone for MachineSpec
Source§fn clone(&self) -> MachineSpec
fn clone(&self) -> MachineSpec
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MachineSpec
impl Debug for MachineSpec
Source§impl Default for MachineSpec
impl Default for MachineSpec
Source§fn default() -> MachineSpec
fn default() -> MachineSpec
Source§impl<'de> Deserialize<'de> for MachineSpec
impl<'de> Deserialize<'de> for MachineSpec
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for MachineSpec
impl JsonSchema for MachineSpec
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for MachineSpec
impl PartialEq for MachineSpec
Source§impl Serialize for MachineSpec
impl Serialize for MachineSpec
impl StructuralPartialEq for MachineSpec
Auto Trait Implementations§
impl Freeze for MachineSpec
impl RefUnwindSafe for MachineSpec
impl Send for MachineSpec
impl Sync for MachineSpec
impl Unpin for MachineSpec
impl UnsafeUnpin for MachineSpec
impl UnwindSafe for MachineSpec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more