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