cluster_api_rs/api/capi_machine.rs
1// WARNING: generated by kopium - manual changes will be overwritten
2// kopium command: kopium --smart-derive-elision -D Default -D PartialEq -A -d -f -
3// kopium version: 0.23.0
4
5#[allow(unused_imports)]
6mod prelude {
7 pub use k8s_openapi::apimachinery::pkg::apis::meta::v1::Condition;
8 pub use kube::CustomResource;
9 pub use schemars::JsonSchema;
10 pub use serde::{Deserialize, Serialize};
11}
12
13use self::prelude::*;
14
15/// spec is the desired state of Machine.
16#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, Default, PartialEq, JsonSchema)]
17#[kube(
18 group = "cluster.x-k8s.io",
19 version = "v1beta2",
20 kind = "Machine",
21 plural = "machines"
22)]
23#[kube(namespaced)]
24#[kube(status = "MachineStatus")]
25#[kube(derive = "Default")]
26#[kube(derive = "PartialEq")]
27pub struct MachineSpec {
28 /// bootstrap is a reference to a local struct which encapsulates
29 /// fields to configure the Machine’s bootstrapping mechanism.
30 pub bootstrap: MachineBootstrap,
31 /// clusterName is the name of the Cluster this object belongs to.
32 #[serde(rename = "clusterName")]
33 pub cluster_name: String,
34 /// deletion contains configuration options for Machine deletion.
35 #[serde(default, skip_serializing_if = "Option::is_none")]
36 pub deletion: Option<MachineDeletion>,
37 /// failureDomain is the failure domain the machine will be created in.
38 /// Must match the name of a FailureDomain from the Cluster status.
39 #[serde(
40 default,
41 skip_serializing_if = "Option::is_none",
42 rename = "failureDomain"
43 )]
44 pub failure_domain: Option<String>,
45 /// infrastructureRef is a required reference to a custom resource
46 /// offered by an infrastructure provider.
47 #[serde(rename = "infrastructureRef")]
48 pub infrastructure_ref: MachineInfrastructureRef,
49 /// minReadySeconds is the minimum number of seconds for which a Machine should be ready before considering it available.
50 /// Defaults to 0 (Machine will be considered available as soon as the Machine is ready)
51 #[serde(
52 default,
53 skip_serializing_if = "Option::is_none",
54 rename = "minReadySeconds"
55 )]
56 pub min_ready_seconds: Option<i32>,
57 /// providerID is the identification ID of the machine provided by the provider.
58 /// This field must match the provider ID as seen on the node object corresponding to this machine.
59 /// This field is required by higher level consumers of cluster-api. Example use case is cluster autoscaler
60 /// with cluster-api as provider. Clean-up logic in the autoscaler compares machines to nodes to find out
61 /// machines at provider which could not get registered as Kubernetes nodes. With cluster-api as a
62 /// generic out-of-tree provider for autoscaler, this field is required by autoscaler to be
63 /// able to have a provider view of the list of machines. Another list of nodes is queried from the k8s apiserver
64 /// and then a comparison is done to find out unregistered machines and are marked for delete.
65 /// This field will be set by the actuators and consumed by higher level entities like autoscaler that will
66 /// be interfacing with cluster-api as generic provider.
67 #[serde(
68 default,
69 skip_serializing_if = "Option::is_none",
70 rename = "providerID"
71 )]
72 pub provider_id: Option<String>,
73 /// readinessGates specifies additional conditions to include when evaluating Machine Ready condition.
74 ///
75 /// This field can be used e.g. by Cluster API control plane providers to extend the semantic of the
76 /// Ready condition for the Machine they control, like the kubeadm control provider adding ReadinessGates
77 /// for the APIServerPodHealthy, SchedulerPodHealthy conditions, etc.
78 ///
79 /// Another example are external controllers, e.g. responsible to install special software/hardware on the Machines;
80 /// they can include the status of those components with a new condition and add this condition to ReadinessGates.
81 ///
82 /// NOTE: In case readinessGates conditions start with the APIServer, ControllerManager, Scheduler prefix, and all those
83 /// readiness gates condition are reporting the same message, when computing the Machine's Ready condition those
84 /// readinessGates will be replaced by a single entry reporting "Control plane components: " + message.
85 /// This helps to improve readability of conditions bubbling up to the Machine's owner resource / to the Cluster).
86 #[serde(
87 default,
88 skip_serializing_if = "Option::is_none",
89 rename = "readinessGates"
90 )]
91 pub readiness_gates: Option<Vec<MachineReadinessGates>>,
92 /// taints are the node taints that Cluster API will manage.
93 /// This list is not necessarily complete: other Kubernetes components may add or remove other taints from nodes,
94 /// e.g. the node controller might add the node.kubernetes.io/not-ready taint.
95 /// Only those taints defined in this list will be added or removed by core Cluster API controllers.
96 ///
97 /// There can be at most 64 taints.
98 /// A pod would have to tolerate all existing taints to run on the corresponding node.
99 ///
100 /// NOTE: This list is implemented as a "map" type, meaning that individual elements can be managed by different owners.
101 #[serde(default, skip_serializing_if = "Option::is_none")]
102 pub taints: Option<Vec<MachineTaints>>,
103 /// version defines the desired Kubernetes version.
104 /// This field is meant to be optionally used by bootstrap providers.
105 #[serde(default, skip_serializing_if = "Option::is_none")]
106 pub version: Option<String>,
107}
108
109/// bootstrap is a reference to a local struct which encapsulates
110/// fields to configure the Machine’s bootstrapping mechanism.
111#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, JsonSchema)]
112pub struct MachineBootstrap {
113 /// configRef is a reference to a bootstrap provider-specific resource
114 /// that holds configuration details. The reference is optional to
115 /// allow users/operators to specify Bootstrap.DataSecretName without
116 /// the need of a controller.
117 #[serde(default, skip_serializing_if = "Option::is_none", rename = "configRef")]
118 pub config_ref: Option<MachineBootstrapConfigRef>,
119 /// dataSecretName is the name of the secret that stores the bootstrap data script.
120 /// If nil, the Machine should remain in the Pending state.
121 #[serde(
122 default,
123 skip_serializing_if = "Option::is_none",
124 rename = "dataSecretName"
125 )]
126 pub data_secret_name: Option<String>,
127}
128
129/// configRef is a reference to a bootstrap provider-specific resource
130/// that holds configuration details. The reference is optional to
131/// allow users/operators to specify Bootstrap.DataSecretName without
132/// the need of a controller.
133#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, JsonSchema)]
134pub struct MachineBootstrapConfigRef {
135 /// apiGroup is the group of the resource being referenced.
136 /// apiGroup must be fully qualified domain name.
137 /// The corresponding version for this reference will be looked up from the contract
138 /// labels of the corresponding CRD of the resource being referenced.
139 #[serde(rename = "apiGroup")]
140 pub api_group: String,
141 /// kind of the resource being referenced.
142 /// kind must consist of alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character.
143 pub kind: String,
144 /// name of the resource being referenced.
145 /// name must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character.
146 pub name: String,
147}
148
149/// deletion contains configuration options for Machine deletion.
150#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, JsonSchema)]
151pub struct MachineDeletion {
152 /// nodeDeletionTimeoutSeconds defines how long the controller will attempt to delete the Node that the Machine
153 /// hosts after the Machine is marked for deletion. A duration of 0 will retry deletion indefinitely.
154 /// Defaults to 10 seconds.
155 #[serde(
156 default,
157 skip_serializing_if = "Option::is_none",
158 rename = "nodeDeletionTimeoutSeconds"
159 )]
160 pub node_deletion_timeout_seconds: Option<i32>,
161 /// nodeDrainTimeoutSeconds is the total amount of time that the controller will spend on draining a node.
162 /// The default value is 0, meaning that the node can be drained without any time limitations.
163 /// NOTE: nodeDrainTimeoutSeconds is different from `kubectl drain --timeout`
164 #[serde(
165 default,
166 skip_serializing_if = "Option::is_none",
167 rename = "nodeDrainTimeoutSeconds"
168 )]
169 pub node_drain_timeout_seconds: Option<i32>,
170 /// nodeVolumeDetachTimeoutSeconds is the total amount of time that the controller will spend on waiting for all volumes
171 /// to be detached. The default value is 0, meaning that the volumes can be detached without any time limitations.
172 #[serde(
173 default,
174 skip_serializing_if = "Option::is_none",
175 rename = "nodeVolumeDetachTimeoutSeconds"
176 )]
177 pub node_volume_detach_timeout_seconds: Option<i32>,
178}
179
180/// infrastructureRef is a required reference to a custom resource
181/// offered by an infrastructure provider.
182#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, JsonSchema)]
183pub struct MachineInfrastructureRef {
184 /// apiGroup is the group of the resource being referenced.
185 /// apiGroup must be fully qualified domain name.
186 /// The corresponding version for this reference will be looked up from the contract
187 /// labels of the corresponding CRD of the resource being referenced.
188 #[serde(rename = "apiGroup")]
189 pub api_group: String,
190 /// kind of the resource being referenced.
191 /// kind must consist of alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character.
192 pub kind: String,
193 /// name of the resource being referenced.
194 /// name must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character.
195 pub name: String,
196}
197
198/// MachineReadinessGate contains the type of a Machine condition to be used as a readiness gate.
199#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, JsonSchema)]
200pub struct MachineReadinessGates {
201 /// conditionType refers to a condition with matching type in the Machine's condition list.
202 /// If the conditions doesn't exist, it will be treated as unknown.
203 /// Note: Both Cluster API conditions or conditions added by 3rd party controllers can be used as readiness gates.
204 #[serde(rename = "conditionType")]
205 pub condition_type: String,
206 /// polarity of the conditionType specified in this readinessGate.
207 /// Valid values are Positive, Negative and omitted.
208 /// When omitted, the default behaviour will be Positive.
209 /// A positive polarity means that the condition should report a true status under normal conditions.
210 /// A negative polarity means that the condition should report a false status under normal conditions.
211 #[serde(default, skip_serializing_if = "Option::is_none")]
212 pub polarity: Option<MachineReadinessGatesPolarity>,
213}
214
215/// MachineReadinessGate contains the type of a Machine condition to be used as a readiness gate.
216#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
217pub enum MachineReadinessGatesPolarity {
218 Positive,
219 Negative,
220}
221
222/// MachineTaint defines a taint equivalent to corev1.Taint, but additionally having a propagation field.
223#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
224pub struct MachineTaints {
225 /// effect is the effect for the taint. Valid values are NoSchedule, PreferNoSchedule and NoExecute.
226 pub effect: MachineTaintsEffect,
227 /// key is the taint key to be applied to a node.
228 /// Must be a valid qualified name of maximum size 63 characters
229 /// with an optional subdomain prefix of maximum size 253 characters,
230 /// separated by a `/`.
231 pub key: String,
232 /// propagation defines how this taint should be propagated to nodes.
233 /// Valid values are 'Always' and 'OnInitialization'.
234 /// Always: The taint will be continuously reconciled. If it is not set for a node, it will be added during reconciliation.
235 /// OnInitialization: The taint will be added during node initialization. If it gets removed from the node later on it will not get added again.
236 pub propagation: MachineTaintsPropagation,
237 /// value is the taint value corresponding to the taint key.
238 /// It must be a valid label value of maximum size 63 characters.
239 #[serde(default, skip_serializing_if = "Option::is_none")]
240 pub value: Option<String>,
241}
242
243/// MachineTaint defines a taint equivalent to corev1.Taint, but additionally having a propagation field.
244#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
245pub enum MachineTaintsEffect {
246 NoSchedule,
247 PreferNoSchedule,
248 NoExecute,
249}
250
251/// MachineTaint defines a taint equivalent to corev1.Taint, but additionally having a propagation field.
252#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
253pub enum MachineTaintsPropagation {
254 Always,
255 OnInitialization,
256}
257
258/// status is the observed state of Machine.
259#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, JsonSchema)]
260pub struct MachineStatus {
261 /// addresses is a list of addresses assigned to the machine.
262 /// This field is copied from the infrastructure provider reference.
263 #[serde(default, skip_serializing_if = "Option::is_none")]
264 pub addresses: Option<Vec<MachineStatusAddresses>>,
265 /// certificatesExpiryDate is the expiry date of the machine certificates.
266 /// This value is only set for control plane machines.
267 #[serde(
268 default,
269 skip_serializing_if = "Option::is_none",
270 rename = "certificatesExpiryDate"
271 )]
272 pub certificates_expiry_date: Option<String>,
273 /// conditions represents the observations of a Machine's current state.
274 /// Known condition types are Available, Ready, UpToDate, BootstrapConfigReady, InfrastructureReady, NodeReady,
275 /// NodeHealthy, Updating, Deleting, Paused.
276 /// If a MachineHealthCheck is targeting this machine, also HealthCheckSucceeded, OwnerRemediated conditions are added.
277 /// Additionally control plane Machines controlled by KubeadmControlPlane will have following additional conditions:
278 /// APIServerPodHealthy, ControllerManagerPodHealthy, SchedulerPodHealthy, EtcdPodHealthy, EtcdMemberHealthy, NodeKubeadmLabelsAndTaintsSet.
279 #[serde(default, skip_serializing_if = "Option::is_none")]
280 pub conditions: Option<Vec<Condition>>,
281 /// deletion contains information relating to removal of the Machine.
282 /// Only present when the Machine has a deletionTimestamp and drain or wait for volume detach started.
283 #[serde(default, skip_serializing_if = "Option::is_none")]
284 pub deletion: Option<MachineStatusDeletion>,
285 /// deprecated groups all the status fields that are deprecated and will be removed when all the nested field are removed.
286 #[serde(default, skip_serializing_if = "Option::is_none")]
287 pub deprecated: Option<MachineStatusDeprecated>,
288 /// failureDomain is the failure domain where the Machine has been scheduled.
289 #[serde(
290 default,
291 skip_serializing_if = "Option::is_none",
292 rename = "failureDomain"
293 )]
294 pub failure_domain: Option<String>,
295 /// initialization provides observations of the Machine initialization process.
296 /// NOTE: Fields in this struct are part of the Cluster API contract and are used to orchestrate initial Machine provisioning.
297 #[serde(default, skip_serializing_if = "Option::is_none")]
298 pub initialization: Option<MachineStatusInitialization>,
299 /// lastUpdated identifies when the phase of the Machine last transitioned.
300 #[serde(
301 default,
302 skip_serializing_if = "Option::is_none",
303 rename = "lastUpdated"
304 )]
305 pub last_updated: Option<String>,
306 /// nodeInfo is a set of ids/uuids to uniquely identify the node.
307 /// More info: <https://kubernetes.io/docs/concepts/nodes/node/#info>
308 #[serde(default, skip_serializing_if = "Option::is_none", rename = "nodeInfo")]
309 pub node_info: Option<MachineStatusNodeInfo>,
310 /// nodeRef will point to the corresponding Node if it exists.
311 #[serde(default, skip_serializing_if = "Option::is_none", rename = "nodeRef")]
312 pub node_ref: Option<MachineStatusNodeRef>,
313 /// observedGeneration is the latest generation observed by the controller.
314 #[serde(
315 default,
316 skip_serializing_if = "Option::is_none",
317 rename = "observedGeneration"
318 )]
319 pub observed_generation: Option<i64>,
320 /// phase represents the current phase of machine actuation.
321 #[serde(default, skip_serializing_if = "Option::is_none")]
322 pub phase: Option<MachineStatusPhase>,
323}
324
325/// MachineAddress contains information for the node's address.
326#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
327pub struct MachineStatusAddresses {
328 /// address is the machine address.
329 pub address: String,
330 /// type is the machine address type, one of Hostname, ExternalIP, InternalIP, ExternalDNS or InternalDNS.
331 #[serde(rename = "type")]
332 pub r#type: MachineStatusAddressesType,
333}
334
335/// MachineAddress contains information for the node's address.
336#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
337pub enum MachineStatusAddressesType {
338 Hostname,
339 #[serde(rename = "ExternalIP")]
340 ExternalIp,
341 #[serde(rename = "InternalIP")]
342 InternalIp,
343 #[serde(rename = "ExternalDNS")]
344 ExternalDns,
345 #[serde(rename = "InternalDNS")]
346 InternalDns,
347}
348
349/// deletion contains information relating to removal of the Machine.
350/// Only present when the Machine has a deletionTimestamp and drain or wait for volume detach started.
351#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, JsonSchema)]
352pub struct MachineStatusDeletion {
353 /// nodeDrainStartTime is the time when the drain of the node started and is used to determine
354 /// if the nodeDrainTimeoutSeconds is exceeded.
355 /// Only present when the Machine has a deletionTimestamp and draining the node had been started.
356 #[serde(
357 default,
358 skip_serializing_if = "Option::is_none",
359 rename = "nodeDrainStartTime"
360 )]
361 pub node_drain_start_time: Option<String>,
362 /// waitForNodeVolumeDetachStartTime is the time when waiting for volume detachment started
363 /// and is used to determine if the nodeVolumeDetachTimeoutSeconds is exceeded.
364 /// Detaching volumes from nodes is usually done by CSI implementations and the current state
365 /// is observed from the node's `.Status.VolumesAttached` field.
366 /// Only present when the Machine has a deletionTimestamp and waiting for volume detachments had been started.
367 #[serde(
368 default,
369 skip_serializing_if = "Option::is_none",
370 rename = "waitForNodeVolumeDetachStartTime"
371 )]
372 pub wait_for_node_volume_detach_start_time: Option<String>,
373}
374
375/// deprecated groups all the status fields that are deprecated and will be removed when all the nested field are removed.
376#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, JsonSchema)]
377pub struct MachineStatusDeprecated {
378 /// v1beta1 groups all the status fields that are deprecated and will be removed when support for v1beta1 will be dropped.
379 ///
380 /// Deprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see <https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md> for more details.
381 #[serde(default, skip_serializing_if = "Option::is_none")]
382 pub v1beta1: Option<MachineStatusDeprecatedV1beta1>,
383}
384
385/// v1beta1 groups all the status fields that are deprecated and will be removed when support for v1beta1 will be dropped.
386///
387/// Deprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see <https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md> for more details.
388#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, JsonSchema)]
389pub struct MachineStatusDeprecatedV1beta1 {
390 /// conditions defines current service state of the Machine.
391 ///
392 /// Deprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see <https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md> for more details.
393 #[serde(default, skip_serializing_if = "Option::is_none")]
394 pub conditions: Option<Vec<Condition>>,
395 /// failureMessage will be set in the event that there is a terminal problem
396 /// reconciling the Machine and will contain a more verbose string suitable
397 /// for logging and human consumption.
398 ///
399 /// This field should not be set for transitive errors that a controller
400 /// faces that are expected to be fixed automatically over
401 /// time (like service outages), but instead indicate that something is
402 /// fundamentally wrong with the Machine's spec or the configuration of
403 /// the controller, and that manual intervention is required. Examples
404 /// of terminal errors would be invalid combinations of settings in the
405 /// spec, values that are unsupported by the controller, or the
406 /// responsible controller itself being critically misconfigured.
407 ///
408 /// Any transient errors that occur during the reconciliation of Machines
409 /// can be added as events to the Machine object and/or logged in the
410 /// controller's output.
411 ///
412 /// Deprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see <https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md> for more details.
413 #[serde(
414 default,
415 skip_serializing_if = "Option::is_none",
416 rename = "failureMessage"
417 )]
418 pub failure_message: Option<String>,
419 /// failureReason will be set in the event that there is a terminal problem
420 /// reconciling the Machine and will contain a succinct value suitable
421 /// for machine interpretation.
422 ///
423 /// This field should not be set for transitive errors that a controller
424 /// faces that are expected to be fixed automatically over
425 /// time (like service outages), but instead indicate that something is
426 /// fundamentally wrong with the Machine's spec or the configuration of
427 /// the controller, and that manual intervention is required. Examples
428 /// of terminal errors would be invalid combinations of settings in the
429 /// spec, values that are unsupported by the controller, or the
430 /// responsible controller itself being critically misconfigured.
431 ///
432 /// Any transient errors that occur during the reconciliation of Machines
433 /// can be added as events to the Machine object and/or logged in the
434 /// controller's output.
435 ///
436 /// Deprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see <https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md> for more details.
437 #[serde(
438 default,
439 skip_serializing_if = "Option::is_none",
440 rename = "failureReason"
441 )]
442 pub failure_reason: Option<String>,
443}
444
445/// initialization provides observations of the Machine initialization process.
446/// NOTE: Fields in this struct are part of the Cluster API contract and are used to orchestrate initial Machine provisioning.
447#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, JsonSchema)]
448pub struct MachineStatusInitialization {
449 /// bootstrapDataSecretCreated is true when the bootstrap provider reports that the Machine's boostrap secret is created.
450 /// NOTE: this field is part of the Cluster API contract, and it is used to orchestrate provisioning.
451 /// The value of this field is never updated after provisioning is completed.
452 #[serde(
453 default,
454 skip_serializing_if = "Option::is_none",
455 rename = "bootstrapDataSecretCreated"
456 )]
457 pub bootstrap_data_secret_created: Option<bool>,
458 /// infrastructureProvisioned is true when the infrastructure provider reports that Machine's infrastructure is fully provisioned.
459 /// NOTE: this field is part of the Cluster API contract, and it is used to orchestrate provisioning.
460 /// The value of this field is never updated after provisioning is completed.
461 #[serde(
462 default,
463 skip_serializing_if = "Option::is_none",
464 rename = "infrastructureProvisioned"
465 )]
466 pub infrastructure_provisioned: Option<bool>,
467}
468
469/// nodeInfo is a set of ids/uuids to uniquely identify the node.
470/// More info: <https://kubernetes.io/docs/concepts/nodes/node/#info>
471#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, JsonSchema)]
472pub struct MachineStatusNodeInfo {
473 /// The Architecture reported by the node
474 pub architecture: String,
475 /// Boot ID reported by the node.
476 #[serde(rename = "bootID")]
477 pub boot_id: String,
478 /// ContainerRuntime Version reported by the node through runtime remote API (e.g. containerd://1.4.2).
479 #[serde(rename = "containerRuntimeVersion")]
480 pub container_runtime_version: String,
481 /// Kernel Version reported by the node from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64).
482 #[serde(rename = "kernelVersion")]
483 pub kernel_version: String,
484 /// Deprecated: KubeProxy Version reported by the node.
485 #[serde(rename = "kubeProxyVersion")]
486 pub kube_proxy_version: String,
487 /// Kubelet Version reported by the node.
488 #[serde(rename = "kubeletVersion")]
489 pub kubelet_version: String,
490 /// MachineID reported by the node. For unique machine identification
491 /// in the cluster this field is preferred. Learn more from man(5)
492 /// machine-id: <http://man7.org/linux/man-pages/man5/machine-id.5.html>
493 #[serde(rename = "machineID")]
494 pub machine_id: String,
495 /// The Operating System reported by the node
496 #[serde(rename = "operatingSystem")]
497 pub operating_system: String,
498 /// OS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)).
499 #[serde(rename = "osImage")]
500 pub os_image: String,
501 /// Swap Info reported by the node.
502 #[serde(default, skip_serializing_if = "Option::is_none")]
503 pub swap: Option<MachineStatusNodeInfoSwap>,
504 /// SystemUUID reported by the node. For unique machine identification
505 /// MachineID is preferred. This field is specific to Red Hat hosts
506 /// <https://access.redhat.com/documentation/en-us/red_hat_subscription_management/1/html/rhsm/uuid>
507 #[serde(rename = "systemUUID")]
508 pub system_uuid: String,
509}
510
511/// Swap Info reported by the node.
512#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, JsonSchema)]
513pub struct MachineStatusNodeInfoSwap {
514 /// Total amount of swap memory in bytes.
515 #[serde(default, skip_serializing_if = "Option::is_none")]
516 pub capacity: Option<i64>,
517}
518
519/// nodeRef will point to the corresponding Node if it exists.
520#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, JsonSchema)]
521pub struct MachineStatusNodeRef {
522 /// name of the node.
523 /// name must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character.
524 pub name: String,
525}
526
527/// status is the observed state of Machine.
528#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
529pub enum MachineStatusPhase {
530 Pending,
531 Provisioning,
532 Provisioned,
533 Running,
534 Updating,
535 Deleting,
536 Deleted,
537 Failed,
538 Unknown,
539}