cluster_api_rs/api/capi_machineset.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.22.5
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 pub use std::collections::BTreeMap;
12}
13
14use self::prelude::*;
15
16/// spec is the desired state of MachineSet.
17#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, Default, PartialEq, JsonSchema)]
18#[kube(
19 group = "cluster.x-k8s.io",
20 version = "v1beta2",
21 kind = "MachineSet",
22 plural = "machinesets"
23)]
24#[kube(namespaced)]
25#[kube(status = "MachineSetStatus")]
26#[kube(derive = "Default")]
27#[kube(derive = "PartialEq")]
28pub struct MachineSetSpec {
29 /// clusterName is the name of the Cluster this object belongs to.
30 #[serde(rename = "clusterName")]
31 pub cluster_name: String,
32 /// deletion contains configuration options for MachineSet deletion.
33 #[serde(default, skip_serializing_if = "Option::is_none")]
34 pub deletion: Option<MachineSetDeletion>,
35 /// machineNaming allows changing the naming pattern used when creating Machines.
36 /// Note: InfraMachines & BootstrapConfigs will use the same name as the corresponding Machines.
37 #[serde(
38 default,
39 skip_serializing_if = "Option::is_none",
40 rename = "machineNaming"
41 )]
42 pub machine_naming: Option<MachineSetMachineNaming>,
43 /// replicas is the number of desired replicas.
44 /// This is a pointer to distinguish between explicit zero and unspecified.
45 ///
46 /// Defaults to:
47 /// * if the Kubernetes autoscaler min size and max size annotations are set:
48 /// - if it's a new MachineSet, use min size
49 /// - if the replicas field of the old MachineSet is < min size, use min size
50 /// - if the replicas field of the old MachineSet is > max size, use max size
51 /// - if the replicas field of the old MachineSet is in the (min size, max size) range, keep the value from the oldMS
52 /// * otherwise use 1
53 /// Note: Defaulting will be run whenever the replicas field is not set:
54 /// * A new MachineSet is created with replicas not set.
55 /// * On an existing MachineSet the replicas field was first set and is now unset.
56 /// Those cases are especially relevant for the following Kubernetes autoscaler use cases:
57 /// * A new MachineSet is created and replicas should be managed by the autoscaler
58 /// * An existing MachineSet which initially wasn't controlled by the autoscaler
59 /// should be later controlled by the autoscaler
60 #[serde(default, skip_serializing_if = "Option::is_none")]
61 pub replicas: Option<i32>,
62 /// selector is a label query over machines that should match the replica count.
63 /// Label keys and values that must match in order to be controlled by this MachineSet.
64 /// It must match the machine template's labels.
65 /// More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors>
66 pub selector: MachineSetSelector,
67 /// template is the object that describes the machine that will be created if
68 /// insufficient replicas are detected.
69 /// Object references to custom resources are treated as templates.
70 pub template: MachineSetTemplate,
71}
72
73/// deletion contains configuration options for MachineSet deletion.
74#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, JsonSchema)]
75pub struct MachineSetDeletion {
76 /// order defines the order in which Machines are deleted when downscaling.
77 /// Defaults to "Random". Valid values are "Random, "Newest", "Oldest"
78 #[serde(default, skip_serializing_if = "Option::is_none")]
79 pub order: Option<MachineSetDeletionOrder>,
80}
81
82/// deletion contains configuration options for MachineSet deletion.
83#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
84pub enum MachineSetDeletionOrder {
85 Random,
86 Newest,
87 Oldest,
88}
89
90/// machineNaming allows changing the naming pattern used when creating Machines.
91/// Note: InfraMachines & BootstrapConfigs will use the same name as the corresponding Machines.
92#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, JsonSchema)]
93pub struct MachineSetMachineNaming {
94 /// template defines the template to use for generating the names of the
95 /// Machine objects.
96 /// If not defined, it will fallback to `{{ .machineSet.name }}-{{ .random }}`.
97 /// If the generated name string exceeds 63 characters, it will be trimmed to
98 /// 58 characters and will
99 /// get concatenated with a random suffix of length 5.
100 /// Length of the template string must not exceed 256 characters.
101 /// The template allows the following variables `.cluster.name`,
102 /// `.machineSet.name` and `.random`.
103 /// The variable `.cluster.name` retrieves the name of the cluster object
104 /// that owns the Machines being created.
105 /// The variable `.machineSet.name` retrieves the name of the MachineSet
106 /// object that owns the Machines being created.
107 /// The variable `.random` is substituted with random alphanumeric string,
108 /// without vowels, of length 5. This variable is required part of the
109 /// template. If not provided, validation will fail.
110 #[serde(default, skip_serializing_if = "Option::is_none")]
111 pub template: Option<String>,
112}
113
114/// selector is a label query over machines that should match the replica count.
115/// Label keys and values that must match in order to be controlled by this MachineSet.
116/// It must match the machine template's labels.
117/// More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors>
118#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, JsonSchema)]
119pub struct MachineSetSelector {
120 /// matchExpressions is a list of label selector requirements. The requirements are ANDed.
121 #[serde(
122 default,
123 skip_serializing_if = "Option::is_none",
124 rename = "matchExpressions"
125 )]
126 pub match_expressions: Option<Vec<MachineSetSelectorMatchExpressions>>,
127 /// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
128 /// map is equivalent to an element of matchExpressions, whose key field is "key", the
129 /// operator is "In", and the values array contains only "value". The requirements are ANDed.
130 #[serde(
131 default,
132 skip_serializing_if = "Option::is_none",
133 rename = "matchLabels"
134 )]
135 pub match_labels: Option<BTreeMap<String, String>>,
136}
137
138/// A label selector requirement is a selector that contains values, a key, and an operator that
139/// relates the key and values.
140#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, JsonSchema)]
141pub struct MachineSetSelectorMatchExpressions {
142 /// key is the label key that the selector applies to.
143 pub key: String,
144 /// operator represents a key's relationship to a set of values.
145 /// Valid operators are In, NotIn, Exists and DoesNotExist.
146 pub operator: String,
147 /// values is an array of string values. If the operator is In or NotIn,
148 /// the values array must be non-empty. If the operator is Exists or DoesNotExist,
149 /// the values array must be empty. This array is replaced during a strategic
150 /// merge patch.
151 #[serde(default, skip_serializing_if = "Option::is_none")]
152 pub values: Option<Vec<String>>,
153}
154
155/// template is the object that describes the machine that will be created if
156/// insufficient replicas are detected.
157/// Object references to custom resources are treated as templates.
158#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, JsonSchema)]
159pub struct MachineSetTemplate {
160 /// metadata is the standard object's metadata.
161 /// More info: <https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata>
162 #[serde(default, skip_serializing_if = "Option::is_none")]
163 pub metadata: Option<MachineSetTemplateMetadata>,
164 /// spec is the specification of the desired behavior of the machine.
165 /// More info: <https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status>
166 pub spec: MachineSetTemplateSpec,
167}
168
169/// metadata is the standard object's metadata.
170/// More info: <https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata>
171#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, JsonSchema)]
172pub struct MachineSetTemplateMetadata {
173 /// annotations is an unstructured key value map stored with a resource that may be
174 /// set by external tools to store and retrieve arbitrary metadata. They are not
175 /// queryable and should be preserved when modifying objects.
176 /// More info: <http://kubernetes.io/docs/user-guide/annotations>
177 #[serde(default, skip_serializing_if = "Option::is_none")]
178 pub annotations: Option<BTreeMap<String, String>>,
179 /// labels is a map of string keys and values that can be used to organize and categorize
180 /// (scope and select) objects. May match selectors of replication controllers
181 /// and services.
182 /// More info: <http://kubernetes.io/docs/user-guide/labels>
183 #[serde(default, skip_serializing_if = "Option::is_none")]
184 pub labels: Option<BTreeMap<String, String>>,
185}
186
187/// spec is the specification of the desired behavior of the machine.
188/// More info: <https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status>
189#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, JsonSchema)]
190pub struct MachineSetTemplateSpec {
191 /// bootstrap is a reference to a local struct which encapsulates
192 /// fields to configure the Machine’s bootstrapping mechanism.
193 pub bootstrap: MachineSetTemplateSpecBootstrap,
194 /// clusterName is the name of the Cluster this object belongs to.
195 #[serde(rename = "clusterName")]
196 pub cluster_name: String,
197 /// deletion contains configuration options for Machine deletion.
198 #[serde(default, skip_serializing_if = "Option::is_none")]
199 pub deletion: Option<MachineSetTemplateSpecDeletion>,
200 /// failureDomain is the failure domain the machine will be created in.
201 /// Must match the name of a FailureDomain from the Cluster status.
202 #[serde(
203 default,
204 skip_serializing_if = "Option::is_none",
205 rename = "failureDomain"
206 )]
207 pub failure_domain: Option<String>,
208 /// infrastructureRef is a required reference to a custom resource
209 /// offered by an infrastructure provider.
210 #[serde(rename = "infrastructureRef")]
211 pub infrastructure_ref: MachineSetTemplateSpecInfrastructureRef,
212 /// minReadySeconds is the minimum number of seconds for which a Machine should be ready before considering it available.
213 /// Defaults to 0 (Machine will be considered available as soon as the Machine is ready)
214 #[serde(
215 default,
216 skip_serializing_if = "Option::is_none",
217 rename = "minReadySeconds"
218 )]
219 pub min_ready_seconds: Option<i32>,
220 /// providerID is the identification ID of the machine provided by the provider.
221 /// This field must match the provider ID as seen on the node object corresponding to this machine.
222 /// This field is required by higher level consumers of cluster-api. Example use case is cluster autoscaler
223 /// with cluster-api as provider. Clean-up logic in the autoscaler compares machines to nodes to find out
224 /// machines at provider which could not get registered as Kubernetes nodes. With cluster-api as a
225 /// generic out-of-tree provider for autoscaler, this field is required by autoscaler to be
226 /// able to have a provider view of the list of machines. Another list of nodes is queried from the k8s apiserver
227 /// and then a comparison is done to find out unregistered machines and are marked for delete.
228 /// This field will be set by the actuators and consumed by higher level entities like autoscaler that will
229 /// be interfacing with cluster-api as generic provider.
230 #[serde(
231 default,
232 skip_serializing_if = "Option::is_none",
233 rename = "providerID"
234 )]
235 pub provider_id: Option<String>,
236 /// readinessGates specifies additional conditions to include when evaluating Machine Ready condition.
237 ///
238 /// This field can be used e.g. by Cluster API control plane providers to extend the semantic of the
239 /// Ready condition for the Machine they control, like the kubeadm control provider adding ReadinessGates
240 /// for the APIServerPodHealthy, SchedulerPodHealthy conditions, etc.
241 ///
242 /// Another example are external controllers, e.g. responsible to install special software/hardware on the Machines;
243 /// they can include the status of those components with a new condition and add this condition to ReadinessGates.
244 ///
245 /// NOTE: In case readinessGates conditions start with the APIServer, ControllerManager, Scheduler prefix, and all those
246 /// readiness gates condition are reporting the same message, when computing the Machine's Ready condition those
247 /// readinessGates will be replaced by a single entry reporting "Control plane components: " + message.
248 /// This helps to improve readability of conditions bubbling up to the Machine's owner resource / to the Cluster).
249 #[serde(
250 default,
251 skip_serializing_if = "Option::is_none",
252 rename = "readinessGates"
253 )]
254 pub readiness_gates: Option<Vec<MachineSetTemplateSpecReadinessGates>>,
255 /// taints are the node taints that Cluster API will manage.
256 /// This list is not necessarily complete: other Kubernetes components may add or remove other taints from nodes,
257 /// e.g. the node controller might add the node.kubernetes.io/not-ready taint.
258 /// Only those taints defined in this list will be added or removed by core Cluster API controllers.
259 ///
260 /// There can be at most 64 taints.
261 /// A pod would have to tolerate all existing taints to run on the corresponding node.
262 ///
263 /// NOTE: This list is implemented as a "map" type, meaning that individual elements can be managed by different owners.
264 #[serde(default, skip_serializing_if = "Option::is_none")]
265 pub taints: Option<Vec<MachineSetTemplateSpecTaints>>,
266 /// version defines the desired Kubernetes version.
267 /// This field is meant to be optionally used by bootstrap providers.
268 #[serde(default, skip_serializing_if = "Option::is_none")]
269 pub version: Option<String>,
270}
271
272/// bootstrap is a reference to a local struct which encapsulates
273/// fields to configure the Machine’s bootstrapping mechanism.
274#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, JsonSchema)]
275pub struct MachineSetTemplateSpecBootstrap {
276 /// configRef is a reference to a bootstrap provider-specific resource
277 /// that holds configuration details. The reference is optional to
278 /// allow users/operators to specify Bootstrap.DataSecretName without
279 /// the need of a controller.
280 #[serde(default, skip_serializing_if = "Option::is_none", rename = "configRef")]
281 pub config_ref: Option<MachineSetTemplateSpecBootstrapConfigRef>,
282 /// dataSecretName is the name of the secret that stores the bootstrap data script.
283 /// If nil, the Machine should remain in the Pending state.
284 #[serde(
285 default,
286 skip_serializing_if = "Option::is_none",
287 rename = "dataSecretName"
288 )]
289 pub data_secret_name: Option<String>,
290}
291
292/// configRef is a reference to a bootstrap provider-specific resource
293/// that holds configuration details. The reference is optional to
294/// allow users/operators to specify Bootstrap.DataSecretName without
295/// the need of a controller.
296#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, JsonSchema)]
297pub struct MachineSetTemplateSpecBootstrapConfigRef {
298 /// apiGroup is the group of the resource being referenced.
299 /// apiGroup must be fully qualified domain name.
300 /// The corresponding version for this reference will be looked up from the contract
301 /// labels of the corresponding CRD of the resource being referenced.
302 #[serde(rename = "apiGroup")]
303 pub api_group: String,
304 /// kind of the resource being referenced.
305 /// kind must consist of alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character.
306 pub kind: String,
307 /// name of the resource being referenced.
308 /// name must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character.
309 pub name: String,
310}
311
312/// deletion contains configuration options for Machine deletion.
313#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, JsonSchema)]
314pub struct MachineSetTemplateSpecDeletion {
315 /// nodeDeletionTimeoutSeconds defines how long the controller will attempt to delete the Node that the Machine
316 /// hosts after the Machine is marked for deletion. A duration of 0 will retry deletion indefinitely.
317 /// Defaults to 10 seconds.
318 #[serde(
319 default,
320 skip_serializing_if = "Option::is_none",
321 rename = "nodeDeletionTimeoutSeconds"
322 )]
323 pub node_deletion_timeout_seconds: Option<i32>,
324 /// nodeDrainTimeoutSeconds is the total amount of time that the controller will spend on draining a node.
325 /// The default value is 0, meaning that the node can be drained without any time limitations.
326 /// NOTE: nodeDrainTimeoutSeconds is different from `kubectl drain --timeout`
327 #[serde(
328 default,
329 skip_serializing_if = "Option::is_none",
330 rename = "nodeDrainTimeoutSeconds"
331 )]
332 pub node_drain_timeout_seconds: Option<i32>,
333 /// nodeVolumeDetachTimeoutSeconds is the total amount of time that the controller will spend on waiting for all volumes
334 /// to be detached. The default value is 0, meaning that the volumes can be detached without any time limitations.
335 #[serde(
336 default,
337 skip_serializing_if = "Option::is_none",
338 rename = "nodeVolumeDetachTimeoutSeconds"
339 )]
340 pub node_volume_detach_timeout_seconds: Option<i32>,
341}
342
343/// infrastructureRef is a required reference to a custom resource
344/// offered by an infrastructure provider.
345#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, JsonSchema)]
346pub struct MachineSetTemplateSpecInfrastructureRef {
347 /// apiGroup is the group of the resource being referenced.
348 /// apiGroup must be fully qualified domain name.
349 /// The corresponding version for this reference will be looked up from the contract
350 /// labels of the corresponding CRD of the resource being referenced.
351 #[serde(rename = "apiGroup")]
352 pub api_group: String,
353 /// kind of the resource being referenced.
354 /// kind must consist of alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character.
355 pub kind: String,
356 /// name of the resource being referenced.
357 /// name must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character.
358 pub name: String,
359}
360
361/// MachineReadinessGate contains the type of a Machine condition to be used as a readiness gate.
362#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, JsonSchema)]
363pub struct MachineSetTemplateSpecReadinessGates {
364 /// conditionType refers to a condition with matching type in the Machine's condition list.
365 /// If the conditions doesn't exist, it will be treated as unknown.
366 /// Note: Both Cluster API conditions or conditions added by 3rd party controllers can be used as readiness gates.
367 #[serde(rename = "conditionType")]
368 pub condition_type: String,
369 /// polarity of the conditionType specified in this readinessGate.
370 /// Valid values are Positive, Negative and omitted.
371 /// When omitted, the default behaviour will be Positive.
372 /// A positive polarity means that the condition should report a true status under normal conditions.
373 /// A negative polarity means that the condition should report a false status under normal conditions.
374 #[serde(default, skip_serializing_if = "Option::is_none")]
375 pub polarity: Option<MachineSetTemplateSpecReadinessGatesPolarity>,
376}
377
378/// MachineReadinessGate contains the type of a Machine condition to be used as a readiness gate.
379#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
380pub enum MachineSetTemplateSpecReadinessGatesPolarity {
381 Positive,
382 Negative,
383}
384
385/// MachineTaint defines a taint equivalent to corev1.Taint, but additionally having a propagation field.
386#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
387pub struct MachineSetTemplateSpecTaints {
388 /// effect is the effect for the taint. Valid values are NoSchedule, PreferNoSchedule and NoExecute.
389 pub effect: MachineSetTemplateSpecTaintsEffect,
390 /// key is the taint key to be applied to a node.
391 /// Must be a valid qualified name of maximum size 63 characters
392 /// with an optional subdomain prefix of maximum size 253 characters,
393 /// separated by a `/`.
394 pub key: String,
395 /// propagation defines how this taint should be propagated to nodes.
396 /// Valid values are 'Always' and 'OnInitialization'.
397 /// Always: The taint will be continuously reconciled. If it is not set for a node, it will be added during reconciliation.
398 /// OnInitialization: The taint will be added during node initialization. If it gets removed from the node later on it will not get added again.
399 pub propagation: MachineSetTemplateSpecTaintsPropagation,
400 /// value is the taint value corresponding to the taint key.
401 /// It must be a valid label value of maximum size 63 characters.
402 #[serde(default, skip_serializing_if = "Option::is_none")]
403 pub value: Option<String>,
404}
405
406/// MachineTaint defines a taint equivalent to corev1.Taint, but additionally having a propagation field.
407#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
408pub enum MachineSetTemplateSpecTaintsEffect {
409 NoSchedule,
410 PreferNoSchedule,
411 NoExecute,
412}
413
414/// MachineTaint defines a taint equivalent to corev1.Taint, but additionally having a propagation field.
415#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
416pub enum MachineSetTemplateSpecTaintsPropagation {
417 Always,
418 OnInitialization,
419}
420
421/// status is the observed state of MachineSet.
422#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, JsonSchema)]
423pub struct MachineSetStatus {
424 /// availableReplicas is the number of available replicas for this MachineSet. A machine is considered available when Machine's Available condition is true.
425 #[serde(
426 default,
427 skip_serializing_if = "Option::is_none",
428 rename = "availableReplicas"
429 )]
430 pub available_replicas: Option<i32>,
431 /// conditions represents the observations of a MachineSet's current state.
432 /// Known condition types are MachinesReady, MachinesUpToDate, ScalingUp, ScalingDown, Remediating, Deleting, Paused.
433 #[serde(default, skip_serializing_if = "Option::is_none")]
434 pub conditions: Option<Vec<Condition>>,
435 /// deprecated groups all the status fields that are deprecated and will be removed when all the nested field are removed.
436 #[serde(default, skip_serializing_if = "Option::is_none")]
437 pub deprecated: Option<MachineSetStatusDeprecated>,
438 /// observedGeneration reflects the generation of the most recently observed MachineSet.
439 #[serde(
440 default,
441 skip_serializing_if = "Option::is_none",
442 rename = "observedGeneration"
443 )]
444 pub observed_generation: Option<i64>,
445 /// readyReplicas is the number of ready replicas for this MachineSet. A machine is considered ready when Machine's Ready condition is true.
446 #[serde(
447 default,
448 skip_serializing_if = "Option::is_none",
449 rename = "readyReplicas"
450 )]
451 pub ready_replicas: Option<i32>,
452 /// replicas is the most recently observed number of replicas.
453 #[serde(default, skip_serializing_if = "Option::is_none")]
454 pub replicas: Option<i32>,
455 /// selector is the same as the label selector but in the string format to avoid introspection
456 /// by clients. The string will be in the same format as the query-param syntax.
457 /// More info about label selectors: <http://kubernetes.io/docs/user-guide/labels#label-selectors>
458 #[serde(default, skip_serializing_if = "Option::is_none")]
459 pub selector: Option<String>,
460 /// upToDateReplicas is the number of up-to-date replicas for this MachineSet. A machine is considered up-to-date when Machine's UpToDate condition is true.
461 #[serde(
462 default,
463 skip_serializing_if = "Option::is_none",
464 rename = "upToDateReplicas"
465 )]
466 pub up_to_date_replicas: Option<i32>,
467}
468
469/// deprecated groups all the status fields that are deprecated and will be removed when all the nested field are removed.
470#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, JsonSchema)]
471pub struct MachineSetStatusDeprecated {
472 /// v1beta1 groups all the status fields that are deprecated and will be removed when support for v1beta1 will be dropped.
473 #[serde(default, skip_serializing_if = "Option::is_none")]
474 pub v1beta1: Option<MachineSetStatusDeprecatedV1beta1>,
475}
476
477/// v1beta1 groups all the status fields that are deprecated and will be removed when support for v1beta1 will be dropped.
478#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, JsonSchema)]
479pub struct MachineSetStatusDeprecatedV1beta1 {
480 /// availableReplicas is the number of available replicas (ready for at least minReadySeconds) for this MachineSet.
481 ///
482 /// 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.
483 #[serde(
484 default,
485 skip_serializing_if = "Option::is_none",
486 rename = "availableReplicas"
487 )]
488 pub available_replicas: Option<i32>,
489 /// conditions defines current service state of the MachineSet.
490 ///
491 /// 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.
492 #[serde(default, skip_serializing_if = "Option::is_none")]
493 pub conditions: Option<Vec<Condition>>,
494 /// failureMessage will be set in the event that there is a terminal problem
495 /// reconciling the Machine and will contain a more verbose string suitable
496 /// for logging and human consumption.
497 ///
498 /// 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.
499 #[serde(
500 default,
501 skip_serializing_if = "Option::is_none",
502 rename = "failureMessage"
503 )]
504 pub failure_message: Option<String>,
505 /// failureReason will be set in the event that there is a terminal problem
506 /// reconciling the Machine and will contain a succinct value suitable
507 /// for machine interpretation.
508 ///
509 /// In the event that there is a terminal problem reconciling the
510 /// replicas, both FailureReason and FailureMessage will be set. FailureReason
511 /// will be populated with a succinct value suitable for machine
512 /// interpretation, while FailureMessage will contain a more verbose
513 /// string suitable for logging and human consumption.
514 ///
515 /// These fields should not be set for transitive errors that a
516 /// controller faces that are expected to be fixed automatically over
517 /// time (like service outages), but instead indicate that something is
518 /// fundamentally wrong with the MachineTemplate's spec or the configuration of
519 /// the machine controller, and that manual intervention is required. Examples
520 /// of terminal errors would be invalid combinations of settings in the
521 /// spec, values that are unsupported by the machine controller, or the
522 /// responsible machine controller itself being critically misconfigured.
523 ///
524 /// Any transient errors that occur during the reconciliation of Machines
525 /// can be added as events to the MachineSet object and/or logged in the
526 /// controller's output.
527 ///
528 /// 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.
529 #[serde(
530 default,
531 skip_serializing_if = "Option::is_none",
532 rename = "failureReason"
533 )]
534 pub failure_reason: Option<String>,
535 /// fullyLabeledReplicas is the number of replicas that have labels matching the labels of the machine template of the MachineSet.
536 ///
537 /// 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.
538 #[serde(
539 default,
540 skip_serializing_if = "Option::is_none",
541 rename = "fullyLabeledReplicas"
542 )]
543 pub fully_labeled_replicas: Option<i32>,
544 /// readyReplicas is the number of ready replicas for this MachineSet. A machine is considered ready when the node has been created and is "Ready".
545 ///
546 /// 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.
547 #[serde(
548 default,
549 skip_serializing_if = "Option::is_none",
550 rename = "readyReplicas"
551 )]
552 pub ready_replicas: Option<i32>,
553}