k8s_pb/api/apps/v1/mod.rs
1// This file is @generated by prost-build.
2/// ControllerRevision implements an immutable snapshot of state data. Clients
3/// are responsible for serializing and deserializing the objects that contain
4/// their internal state.
5/// Once a ControllerRevision has been successfully created, it can not be updated.
6/// The API Server will fail validation of all requests that attempt to mutate
7/// the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both
8/// the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However,
9/// it may be subject to name and representation changes in future releases, and clients should not
10/// depend on its stability. It is primarily for internal use by controllers.
11#[derive(Clone, PartialEq, ::prost::Message)]
12pub struct ControllerRevision {
13 /// Standard object's metadata.
14 /// More info: <https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata>
15 /// +optional
16 #[prost(message, optional, tag = "1")]
17 pub metadata: ::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::ObjectMeta>,
18 /// Data is the serialized representation of the state.
19 #[prost(message, optional, tag = "2")]
20 pub data: ::core::option::Option<super::super::super::apimachinery::pkg::runtime::RawExtension>,
21 /// Revision indicates the revision of the state represented by Data.
22 #[prost(int64, optional, tag = "3")]
23 pub revision: ::core::option::Option<i64>,
24}
25/// ControllerRevisionList is a resource containing a list of ControllerRevision objects.
26#[derive(Clone, PartialEq, ::prost::Message)]
27pub struct ControllerRevisionList {
28 /// More info: <https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata>
29 /// +optional
30 #[prost(message, optional, tag = "1")]
31 pub metadata: ::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::ListMeta>,
32 /// Items is the list of ControllerRevisions
33 #[prost(message, repeated, tag = "2")]
34 pub items: ::prost::alloc::vec::Vec<ControllerRevision>,
35}
36/// DaemonSet represents the configuration of a daemon set.
37#[derive(Clone, PartialEq, ::prost::Message)]
38pub struct DaemonSet {
39 /// Standard object's metadata.
40 /// More info: <https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata>
41 /// +optional
42 #[prost(message, optional, tag = "1")]
43 pub metadata: ::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::ObjectMeta>,
44 /// The desired behavior of this daemon set.
45 /// More info: <https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status>
46 /// +optional
47 #[prost(message, optional, tag = "2")]
48 pub spec: ::core::option::Option<DaemonSetSpec>,
49 /// The current status of this daemon set. This data may be
50 /// out of date by some window of time.
51 /// Populated by the system.
52 /// Read-only.
53 /// More info: <https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status>
54 /// +optional
55 #[prost(message, optional, tag = "3")]
56 pub status: ::core::option::Option<DaemonSetStatus>,
57}
58/// DaemonSetCondition describes the state of a DaemonSet at a certain point.
59#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
60pub struct DaemonSetCondition {
61 /// Type of DaemonSet condition.
62 #[prost(string, optional, tag = "1")]
63 pub r#type: ::core::option::Option<::prost::alloc::string::String>,
64 /// Status of the condition, one of True, False, Unknown.
65 #[prost(string, optional, tag = "2")]
66 pub status: ::core::option::Option<::prost::alloc::string::String>,
67 /// Last time the condition transitioned from one status to another.
68 /// +optional
69 #[prost(message, optional, tag = "3")]
70 pub last_transition_time:
71 ::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::Time>,
72 /// The reason for the condition's last transition.
73 /// +optional
74 #[prost(string, optional, tag = "4")]
75 pub reason: ::core::option::Option<::prost::alloc::string::String>,
76 /// A human readable message indicating details about the transition.
77 /// +optional
78 #[prost(string, optional, tag = "5")]
79 pub message: ::core::option::Option<::prost::alloc::string::String>,
80}
81/// DaemonSetList is a collection of daemon sets.
82#[derive(Clone, PartialEq, ::prost::Message)]
83pub struct DaemonSetList {
84 /// Standard list metadata.
85 /// More info: <https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata>
86 /// +optional
87 #[prost(message, optional, tag = "1")]
88 pub metadata: ::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::ListMeta>,
89 /// A list of daemon sets.
90 #[prost(message, repeated, tag = "2")]
91 pub items: ::prost::alloc::vec::Vec<DaemonSet>,
92}
93/// DaemonSetSpec is the specification of a daemon set.
94#[derive(Clone, PartialEq, ::prost::Message)]
95pub struct DaemonSetSpec {
96 /// A label query over pods that are managed by the daemon set.
97 /// Must match in order to be controlled.
98 /// It must match the pod template's labels.
99 /// More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors>
100 #[prost(message, optional, tag = "1")]
101 pub selector:
102 ::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::LabelSelector>,
103 /// An object that describes the pod that will be created.
104 /// The DaemonSet will create exactly one copy of this pod on every node
105 /// that matches the template's node selector (or on every node if no node
106 /// selector is specified).
107 /// The only allowed template.spec.restartPolicy value is "Always".
108 /// More info: <https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template>
109 #[prost(message, optional, tag = "2")]
110 pub template: ::core::option::Option<super::super::core::v1::PodTemplateSpec>,
111 /// An update strategy to replace existing DaemonSet pods with new pods.
112 /// +optional
113 #[prost(message, optional, tag = "3")]
114 pub update_strategy: ::core::option::Option<DaemonSetUpdateStrategy>,
115 /// The minimum number of seconds for which a newly created DaemonSet pod should
116 /// be ready without any of its container crashing, for it to be considered
117 /// available. Defaults to 0 (pod will be considered available as soon as it
118 /// is ready).
119 /// +optional
120 #[prost(int32, optional, tag = "4")]
121 pub min_ready_seconds: ::core::option::Option<i32>,
122 /// The number of old history to retain to allow rollback.
123 /// This is a pointer to distinguish between explicit zero and not specified.
124 /// Defaults to 10.
125 /// +optional
126 #[prost(int32, optional, tag = "6")]
127 pub revision_history_limit: ::core::option::Option<i32>,
128}
129/// DaemonSetStatus represents the current status of a daemon set.
130#[derive(Clone, PartialEq, ::prost::Message)]
131pub struct DaemonSetStatus {
132 /// The number of nodes that are running at least 1
133 /// daemon pod and are supposed to run the daemon pod.
134 /// More info: <https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/>
135 #[prost(int32, optional, tag = "1")]
136 pub current_number_scheduled: ::core::option::Option<i32>,
137 /// The number of nodes that are running the daemon pod, but are
138 /// not supposed to run the daemon pod.
139 /// More info: <https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/>
140 #[prost(int32, optional, tag = "2")]
141 pub number_misscheduled: ::core::option::Option<i32>,
142 /// The total number of nodes that should be running the daemon
143 /// pod (including nodes correctly running the daemon pod).
144 /// More info: <https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/>
145 #[prost(int32, optional, tag = "3")]
146 pub desired_number_scheduled: ::core::option::Option<i32>,
147 /// numberReady is the number of nodes that should be running the daemon pod and have one
148 /// or more of the daemon pod running with a Ready Condition.
149 #[prost(int32, optional, tag = "4")]
150 pub number_ready: ::core::option::Option<i32>,
151 /// The most recent generation observed by the daemon set controller.
152 /// +optional
153 #[prost(int64, optional, tag = "5")]
154 pub observed_generation: ::core::option::Option<i64>,
155 /// The total number of nodes that are running updated daemon pod
156 /// +optional
157 #[prost(int32, optional, tag = "6")]
158 pub updated_number_scheduled: ::core::option::Option<i32>,
159 /// The number of nodes that should be running the
160 /// daemon pod and have one or more of the daemon pod running and
161 /// available (ready for at least spec.minReadySeconds)
162 /// +optional
163 #[prost(int32, optional, tag = "7")]
164 pub number_available: ::core::option::Option<i32>,
165 /// The number of nodes that should be running the
166 /// daemon pod and have none of the daemon pod running and available
167 /// (ready for at least spec.minReadySeconds)
168 /// +optional
169 #[prost(int32, optional, tag = "8")]
170 pub number_unavailable: ::core::option::Option<i32>,
171 /// Count of hash collisions for the DaemonSet. The DaemonSet controller
172 /// uses this field as a collision avoidance mechanism when it needs to
173 /// create the name for the newest ControllerRevision.
174 /// +optional
175 #[prost(int32, optional, tag = "9")]
176 pub collision_count: ::core::option::Option<i32>,
177 /// Represents the latest available observations of a DaemonSet's current state.
178 /// +optional
179 /// +patchMergeKey=type
180 /// +patchStrategy=merge
181 /// +listType=map
182 /// +listMapKey=type
183 #[prost(message, repeated, tag = "10")]
184 pub conditions: ::prost::alloc::vec::Vec<DaemonSetCondition>,
185}
186/// DaemonSetUpdateStrategy is a struct used to control the update strategy for a DaemonSet.
187#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
188pub struct DaemonSetUpdateStrategy {
189 /// Type of daemon set update. Can be "RollingUpdate" or "OnDelete". Default is RollingUpdate.
190 /// +optional
191 #[prost(string, optional, tag = "1")]
192 pub r#type: ::core::option::Option<::prost::alloc::string::String>,
193 /// Rolling update config params. Present only if type = "RollingUpdate".
194 /// ---
195 /// TODO: Update this to follow our convention for oneOf, whatever we decide it
196 /// to be. Same as Deployment `strategy.rollingUpdate`.
197 /// See <https://github.com/kubernetes/kubernetes/issues/35345>
198 /// +optional
199 #[prost(message, optional, tag = "2")]
200 pub rolling_update: ::core::option::Option<RollingUpdateDaemonSet>,
201}
202/// Deployment enables declarative updates for Pods and ReplicaSets.
203#[derive(Clone, PartialEq, ::prost::Message)]
204pub struct Deployment {
205 /// Standard object's metadata.
206 /// More info: <https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata>
207 /// +optional
208 #[prost(message, optional, tag = "1")]
209 pub metadata: ::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::ObjectMeta>,
210 /// Specification of the desired behavior of the Deployment.
211 /// +optional
212 #[prost(message, optional, tag = "2")]
213 pub spec: ::core::option::Option<DeploymentSpec>,
214 /// Most recently observed status of the Deployment.
215 /// +optional
216 #[prost(message, optional, tag = "3")]
217 pub status: ::core::option::Option<DeploymentStatus>,
218}
219/// DeploymentCondition describes the state of a deployment at a certain point.
220#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
221pub struct DeploymentCondition {
222 /// Type of deployment condition.
223 #[prost(string, optional, tag = "1")]
224 pub r#type: ::core::option::Option<::prost::alloc::string::String>,
225 /// Status of the condition, one of True, False, Unknown.
226 #[prost(string, optional, tag = "2")]
227 pub status: ::core::option::Option<::prost::alloc::string::String>,
228 /// The last time this condition was updated.
229 #[prost(message, optional, tag = "6")]
230 pub last_update_time:
231 ::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::Time>,
232 /// Last time the condition transitioned from one status to another.
233 #[prost(message, optional, tag = "7")]
234 pub last_transition_time:
235 ::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::Time>,
236 /// The reason for the condition's last transition.
237 #[prost(string, optional, tag = "4")]
238 pub reason: ::core::option::Option<::prost::alloc::string::String>,
239 /// A human readable message indicating details about the transition.
240 #[prost(string, optional, tag = "5")]
241 pub message: ::core::option::Option<::prost::alloc::string::String>,
242}
243/// DeploymentList is a list of Deployments.
244#[derive(Clone, PartialEq, ::prost::Message)]
245pub struct DeploymentList {
246 /// Standard list metadata.
247 /// +optional
248 #[prost(message, optional, tag = "1")]
249 pub metadata: ::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::ListMeta>,
250 /// Items is the list of Deployments.
251 #[prost(message, repeated, tag = "2")]
252 pub items: ::prost::alloc::vec::Vec<Deployment>,
253}
254/// DeploymentSpec is the specification of the desired behavior of the Deployment.
255#[derive(Clone, PartialEq, ::prost::Message)]
256pub struct DeploymentSpec {
257 /// Number of desired pods. This is a pointer to distinguish between explicit
258 /// zero and not specified. Defaults to 1.
259 /// +optional
260 #[prost(int32, optional, tag = "1")]
261 pub replicas: ::core::option::Option<i32>,
262 /// Label selector for pods. Existing ReplicaSets whose pods are
263 /// selected by this will be the ones affected by this deployment.
264 /// It must match the pod template's labels.
265 #[prost(message, optional, tag = "2")]
266 pub selector:
267 ::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::LabelSelector>,
268 /// Template describes the pods that will be created.
269 /// The only allowed template.spec.restartPolicy value is "Always".
270 #[prost(message, optional, tag = "3")]
271 pub template: ::core::option::Option<super::super::core::v1::PodTemplateSpec>,
272 /// The deployment strategy to use to replace existing pods with new ones.
273 /// +optional
274 /// +patchStrategy=retainKeys
275 #[prost(message, optional, tag = "4")]
276 pub strategy: ::core::option::Option<DeploymentStrategy>,
277 /// Minimum number of seconds for which a newly created pod should be ready
278 /// without any of its container crashing, for it to be considered available.
279 /// Defaults to 0 (pod will be considered available as soon as it is ready)
280 /// +optional
281 #[prost(int32, optional, tag = "5")]
282 pub min_ready_seconds: ::core::option::Option<i32>,
283 /// The number of old ReplicaSets to retain to allow rollback.
284 /// This is a pointer to distinguish between explicit zero and not specified.
285 /// Defaults to 10.
286 /// +optional
287 #[prost(int32, optional, tag = "6")]
288 pub revision_history_limit: ::core::option::Option<i32>,
289 /// Indicates that the deployment is paused.
290 /// +optional
291 #[prost(bool, optional, tag = "7")]
292 pub paused: ::core::option::Option<bool>,
293 /// The maximum time in seconds for a deployment to make progress before it
294 /// is considered to be failed. The deployment controller will continue to
295 /// process failed deployments and a condition with a ProgressDeadlineExceeded
296 /// reason will be surfaced in the deployment status. Note that progress will
297 /// not be estimated during the time a deployment is paused. Defaults to 600s.
298 #[prost(int32, optional, tag = "9")]
299 pub progress_deadline_seconds: ::core::option::Option<i32>,
300}
301/// DeploymentStatus is the most recently observed status of the Deployment.
302#[derive(Clone, PartialEq, ::prost::Message)]
303pub struct DeploymentStatus {
304 /// The generation observed by the deployment controller.
305 /// +optional
306 #[prost(int64, optional, tag = "1")]
307 pub observed_generation: ::core::option::Option<i64>,
308 /// Total number of non-terminating pods targeted by this deployment (their labels match the selector).
309 /// +optional
310 #[prost(int32, optional, tag = "2")]
311 pub replicas: ::core::option::Option<i32>,
312 /// Total number of non-terminating pods targeted by this deployment that have the desired template spec.
313 /// +optional
314 #[prost(int32, optional, tag = "3")]
315 pub updated_replicas: ::core::option::Option<i32>,
316 /// Total number of non-terminating pods targeted by this Deployment with a Ready Condition.
317 /// +optional
318 #[prost(int32, optional, tag = "7")]
319 pub ready_replicas: ::core::option::Option<i32>,
320 /// Total number of available non-terminating pods (ready for at least minReadySeconds) targeted by this deployment.
321 /// +optional
322 #[prost(int32, optional, tag = "4")]
323 pub available_replicas: ::core::option::Option<i32>,
324 /// Total number of unavailable pods targeted by this deployment. This is the total number of
325 /// pods that are still required for the deployment to have 100% available capacity. They may
326 /// either be pods that are running but not yet available or pods that still have not been created.
327 /// +optional
328 #[prost(int32, optional, tag = "5")]
329 pub unavailable_replicas: ::core::option::Option<i32>,
330 /// Total number of terminating pods targeted by this deployment. Terminating pods have a non-null
331 /// .metadata.deletionTimestamp and have not yet reached the Failed or Succeeded .status.phase.
332 ///
333 /// This is a beta field and requires enabling DeploymentReplicaSetTerminatingReplicas feature (enabled by default).
334 /// +optional
335 #[prost(int32, optional, tag = "9")]
336 pub terminating_replicas: ::core::option::Option<i32>,
337 /// Represents the latest available observations of a deployment's current state.
338 /// +patchMergeKey=type
339 /// +patchStrategy=merge
340 /// +listType=map
341 /// +listMapKey=type
342 #[prost(message, repeated, tag = "6")]
343 pub conditions: ::prost::alloc::vec::Vec<DeploymentCondition>,
344 /// Count of hash collisions for the Deployment. The Deployment controller uses this
345 /// field as a collision avoidance mechanism when it needs to create the name for the
346 /// newest ReplicaSet.
347 /// +optional
348 #[prost(int32, optional, tag = "8")]
349 pub collision_count: ::core::option::Option<i32>,
350}
351/// DeploymentStrategy describes how to replace existing pods with new ones.
352#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
353pub struct DeploymentStrategy {
354 /// Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate.
355 /// +optional
356 #[prost(string, optional, tag = "1")]
357 pub r#type: ::core::option::Option<::prost::alloc::string::String>,
358 /// Rolling update config params. Present only if DeploymentStrategyType =
359 /// RollingUpdate.
360 /// ---
361 /// TODO: Update this to follow our convention for oneOf, whatever we decide it
362 /// to be.
363 /// +optional
364 #[prost(message, optional, tag = "2")]
365 pub rolling_update: ::core::option::Option<RollingUpdateDeployment>,
366}
367/// ReplicaSet ensures that a specified number of pod replicas are running at any given time.
368#[derive(Clone, PartialEq, ::prost::Message)]
369pub struct ReplicaSet {
370 /// If the Labels of a ReplicaSet are empty, they are defaulted to
371 /// be the same as the Pod(s) that the ReplicaSet manages.
372 /// Standard object's metadata.
373 /// More info: <https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata>
374 /// +optional
375 #[prost(message, optional, tag = "1")]
376 pub metadata: ::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::ObjectMeta>,
377 /// Spec defines the specification of the desired behavior of the ReplicaSet.
378 /// More info: <https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status>
379 /// +optional
380 #[prost(message, optional, tag = "2")]
381 pub spec: ::core::option::Option<ReplicaSetSpec>,
382 /// Status is the most recently observed status of the ReplicaSet.
383 /// This data may be out of date by some window of time.
384 /// Populated by the system.
385 /// Read-only.
386 /// More info: <https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status>
387 /// +optional
388 #[prost(message, optional, tag = "3")]
389 pub status: ::core::option::Option<ReplicaSetStatus>,
390}
391/// ReplicaSetCondition describes the state of a replica set at a certain point.
392#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
393pub struct ReplicaSetCondition {
394 /// Type of replica set condition.
395 #[prost(string, optional, tag = "1")]
396 pub r#type: ::core::option::Option<::prost::alloc::string::String>,
397 /// Status of the condition, one of True, False, Unknown.
398 #[prost(string, optional, tag = "2")]
399 pub status: ::core::option::Option<::prost::alloc::string::String>,
400 /// The last time the condition transitioned from one status to another.
401 /// +optional
402 #[prost(message, optional, tag = "3")]
403 pub last_transition_time:
404 ::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::Time>,
405 /// The reason for the condition's last transition.
406 /// +optional
407 #[prost(string, optional, tag = "4")]
408 pub reason: ::core::option::Option<::prost::alloc::string::String>,
409 /// A human readable message indicating details about the transition.
410 /// +optional
411 #[prost(string, optional, tag = "5")]
412 pub message: ::core::option::Option<::prost::alloc::string::String>,
413}
414/// ReplicaSetList is a collection of ReplicaSets.
415#[derive(Clone, PartialEq, ::prost::Message)]
416pub struct ReplicaSetList {
417 /// Standard list metadata.
418 /// More info: <https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds>
419 /// +optional
420 #[prost(message, optional, tag = "1")]
421 pub metadata: ::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::ListMeta>,
422 /// List of ReplicaSets.
423 /// More info: <https://kubernetes.io/docs/concepts/workloads/controllers/replicaset>
424 #[prost(message, repeated, tag = "2")]
425 pub items: ::prost::alloc::vec::Vec<ReplicaSet>,
426}
427/// ReplicaSetSpec is the specification of a ReplicaSet.
428#[derive(Clone, PartialEq, ::prost::Message)]
429pub struct ReplicaSetSpec {
430 /// Replicas is the number of desired pods.
431 /// This is a pointer to distinguish between explicit zero and unspecified.
432 /// Defaults to 1.
433 /// More info: <https://kubernetes.io/docs/concepts/workloads/controllers/replicaset>
434 /// +optional
435 #[prost(int32, optional, tag = "1")]
436 pub replicas: ::core::option::Option<i32>,
437 /// Minimum number of seconds for which a newly created pod should be ready
438 /// without any of its container crashing, for it to be considered available.
439 /// Defaults to 0 (pod will be considered available as soon as it is ready)
440 /// +optional
441 #[prost(int32, optional, tag = "4")]
442 pub min_ready_seconds: ::core::option::Option<i32>,
443 /// Selector is a label query over pods that should match the replica count.
444 /// Label keys and values that must match in order to be controlled by this replica set.
445 /// It must match the pod template's labels.
446 /// More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors>
447 #[prost(message, optional, tag = "2")]
448 pub selector:
449 ::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::LabelSelector>,
450 /// Template is the object that describes the pod that will be created if
451 /// insufficient replicas are detected.
452 /// More info: <https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/#pod-template>
453 /// +optional
454 #[prost(message, optional, tag = "3")]
455 pub template: ::core::option::Option<super::super::core::v1::PodTemplateSpec>,
456}
457/// ReplicaSetStatus represents the current status of a ReplicaSet.
458#[derive(Clone, PartialEq, ::prost::Message)]
459pub struct ReplicaSetStatus {
460 /// Replicas is the most recently observed number of non-terminating pods.
461 /// More info: <https://kubernetes.io/docs/concepts/workloads/controllers/replicaset>
462 #[prost(int32, optional, tag = "1")]
463 pub replicas: ::core::option::Option<i32>,
464 /// The number of non-terminating pods that have labels matching the labels of the pod template of the replicaset.
465 /// +optional
466 #[prost(int32, optional, tag = "2")]
467 pub fully_labeled_replicas: ::core::option::Option<i32>,
468 /// The number of non-terminating pods targeted by this ReplicaSet with a Ready Condition.
469 /// +optional
470 #[prost(int32, optional, tag = "4")]
471 pub ready_replicas: ::core::option::Option<i32>,
472 /// The number of available non-terminating pods (ready for at least minReadySeconds) for this replica set.
473 /// +optional
474 #[prost(int32, optional, tag = "5")]
475 pub available_replicas: ::core::option::Option<i32>,
476 /// The number of terminating pods for this replica set. Terminating pods have a non-null .metadata.deletionTimestamp
477 /// and have not yet reached the Failed or Succeeded .status.phase.
478 ///
479 /// This is a beta field and requires enabling DeploymentReplicaSetTerminatingReplicas feature (enabled by default).
480 /// +optional
481 #[prost(int32, optional, tag = "7")]
482 pub terminating_replicas: ::core::option::Option<i32>,
483 /// ObservedGeneration reflects the generation of the most recently observed ReplicaSet.
484 /// +optional
485 #[prost(int64, optional, tag = "3")]
486 pub observed_generation: ::core::option::Option<i64>,
487 /// Represents the latest available observations of a replica set's current state.
488 /// +optional
489 /// +patchMergeKey=type
490 /// +patchStrategy=merge
491 /// +listType=map
492 /// +listMapKey=type
493 #[prost(message, repeated, tag = "6")]
494 pub conditions: ::prost::alloc::vec::Vec<ReplicaSetCondition>,
495}
496/// Spec to control the desired behavior of daemon set rolling update.
497#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
498pub struct RollingUpdateDaemonSet {
499 /// The maximum number of DaemonSet pods that can be unavailable during the
500 /// update. Value can be an absolute number (ex: 5) or a percentage of total
501 /// number of DaemonSet pods at the start of the update (ex: 10%). Absolute
502 /// number is calculated from percentage by rounding up.
503 /// This cannot be 0 if MaxSurge is 0
504 /// Default value is 1.
505 /// Example: when this is set to 30%, at most 30% of the total number of nodes
506 /// that should be running the daemon pod (i.e. status.desiredNumberScheduled)
507 /// can have their pods stopped for an update at any given time. The update
508 /// starts by stopping at most 30% of those DaemonSet pods and then brings
509 /// up new DaemonSet pods in their place. Once the new pods are available,
510 /// it then proceeds onto other DaemonSet pods, thus ensuring that at least
511 /// 70% of original number of DaemonSet pods are available at all times during
512 /// the update.
513 /// +optional
514 #[prost(message, optional, tag = "1")]
515 pub max_unavailable:
516 ::core::option::Option<super::super::super::apimachinery::pkg::util::intstr::IntOrString>,
517 /// The maximum number of nodes with an existing available DaemonSet pod that
518 /// can have an updated DaemonSet pod during during an update.
519 /// Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
520 /// This can not be 0 if MaxUnavailable is 0.
521 /// Absolute number is calculated from percentage by rounding up to a minimum of 1.
522 /// Default value is 0.
523 /// Example: when this is set to 30%, at most 30% of the total number of nodes
524 /// that should be running the daemon pod (i.e. status.desiredNumberScheduled)
525 /// can have their a new pod created before the old pod is marked as deleted.
526 /// The update starts by launching new pods on 30% of nodes. Once an updated
527 /// pod is available (Ready for at least minReadySeconds) the old DaemonSet pod
528 /// on that node is marked deleted. If the old pod becomes unavailable for any
529 /// reason (Ready transitions to false, is evicted, or is drained) an updated
530 /// pod is immediately created on that node without considering surge limits.
531 /// Allowing surge implies the possibility that the resources consumed by the
532 /// daemonset on any given node can double if the readiness check fails, and
533 /// so resource intensive daemonsets should take into account that they may
534 /// cause evictions during disruption.
535 /// +optional
536 #[prost(message, optional, tag = "2")]
537 pub max_surge: ::core::option::Option<super::super::super::apimachinery::pkg::util::intstr::IntOrString>,
538}
539/// Spec to control the desired behavior of rolling update.
540#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
541pub struct RollingUpdateDeployment {
542 /// The maximum number of pods that can be unavailable during the update.
543 /// Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
544 /// Absolute number is calculated from percentage by rounding down.
545 /// This can not be 0 if MaxSurge is 0.
546 /// Defaults to 25%.
547 /// Example: when this is set to 30%, the old ReplicaSet can be scaled down to 70% of desired pods
548 /// immediately when the rolling update starts. Once new pods are ready, old ReplicaSet
549 /// can be scaled down further, followed by scaling up the new ReplicaSet, ensuring
550 /// that the total number of pods available at all times during the update is at
551 /// least 70% of desired pods.
552 /// +optional
553 #[prost(message, optional, tag = "1")]
554 pub max_unavailable:
555 ::core::option::Option<super::super::super::apimachinery::pkg::util::intstr::IntOrString>,
556 /// The maximum number of pods that can be scheduled above the desired number of
557 /// pods.
558 /// Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
559 /// This can not be 0 if MaxUnavailable is 0.
560 /// Absolute number is calculated from percentage by rounding up.
561 /// Defaults to 25%.
562 /// Example: when this is set to 30%, the new ReplicaSet can be scaled up immediately when
563 /// the rolling update starts, such that the total number of old and new pods do not exceed
564 /// 130% of desired pods. Once old pods have been killed,
565 /// new ReplicaSet can be scaled up further, ensuring that total number of pods running
566 /// at any time during the update is at most 130% of desired pods.
567 /// +optional
568 #[prost(message, optional, tag = "2")]
569 pub max_surge: ::core::option::Option<super::super::super::apimachinery::pkg::util::intstr::IntOrString>,
570}
571/// RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.
572#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
573pub struct RollingUpdateStatefulSetStrategy {
574 /// Partition indicates the ordinal at which the StatefulSet should be partitioned
575 /// for updates. During a rolling update, all pods from ordinal Replicas-1 to
576 /// Partition are updated. All pods from ordinal Partition-1 to 0 remain untouched.
577 /// This is helpful in being able to do a canary based deployment. The default value is 0.
578 /// +optional
579 #[prost(int32, optional, tag = "1")]
580 pub partition: ::core::option::Option<i32>,
581 /// The maximum number of pods that can be unavailable during the update.
582 /// Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
583 /// Absolute number is calculated from percentage by rounding up. This can not be 0.
584 /// Defaults to 1. This field is beta-level and is enabled by default. The field applies to all pods in the range 0 to
585 /// Replicas-1. That means if there is any unavailable pod in the range 0 to Replicas-1, it
586 /// will be counted towards MaxUnavailable.
587 /// This setting might not be effective for the OrderedReady podManagementPolicy. That policy ensures pods are created and become ready one at a time.
588 ///
589 /// +featureGate=MaxUnavailableStatefulSet
590 /// +optional
591 #[prost(message, optional, tag = "2")]
592 pub max_unavailable:
593 ::core::option::Option<super::super::super::apimachinery::pkg::util::intstr::IntOrString>,
594}
595/// StatefulSet represents a set of pods with consistent identities.
596/// Identities are defined as:
597/// - Network: A single stable DNS and hostname.
598/// - Storage: As many VolumeClaims as requested.
599///
600/// The StatefulSet guarantees that a given network identity will always
601/// map to the same storage identity.
602#[derive(Clone, PartialEq, ::prost::Message)]
603pub struct StatefulSet {
604 /// Standard object's metadata.
605 /// More info: <https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata>
606 /// +optional
607 #[prost(message, optional, tag = "1")]
608 pub metadata: ::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::ObjectMeta>,
609 /// Spec defines the desired identities of pods in this set.
610 /// +optional
611 #[prost(message, optional, tag = "2")]
612 pub spec: ::core::option::Option<StatefulSetSpec>,
613 /// Status is the current status of Pods in this StatefulSet. This data
614 /// may be out of date by some window of time.
615 /// +optional
616 #[prost(message, optional, tag = "3")]
617 pub status: ::core::option::Option<StatefulSetStatus>,
618}
619/// StatefulSetCondition describes the state of a statefulset at a certain point.
620#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
621pub struct StatefulSetCondition {
622 /// Type of statefulset condition.
623 #[prost(string, optional, tag = "1")]
624 pub r#type: ::core::option::Option<::prost::alloc::string::String>,
625 /// Status of the condition, one of True, False, Unknown.
626 #[prost(string, optional, tag = "2")]
627 pub status: ::core::option::Option<::prost::alloc::string::String>,
628 /// Last time the condition transitioned from one status to another.
629 /// +optional
630 #[prost(message, optional, tag = "3")]
631 pub last_transition_time:
632 ::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::Time>,
633 /// The reason for the condition's last transition.
634 /// +optional
635 #[prost(string, optional, tag = "4")]
636 pub reason: ::core::option::Option<::prost::alloc::string::String>,
637 /// A human readable message indicating details about the transition.
638 /// +optional
639 #[prost(string, optional, tag = "5")]
640 pub message: ::core::option::Option<::prost::alloc::string::String>,
641}
642/// StatefulSetList is a collection of StatefulSets.
643#[derive(Clone, PartialEq, ::prost::Message)]
644pub struct StatefulSetList {
645 /// Standard list's metadata.
646 /// More info: <https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata>
647 /// +optional
648 #[prost(message, optional, tag = "1")]
649 pub metadata: ::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::ListMeta>,
650 /// Items is the list of stateful sets.
651 #[prost(message, repeated, tag = "2")]
652 pub items: ::prost::alloc::vec::Vec<StatefulSet>,
653}
654/// StatefulSetOrdinals describes the policy used for replica ordinal assignment
655/// in this StatefulSet.
656#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
657pub struct StatefulSetOrdinals {
658 /// start is the number representing the first replica's index. It may be used
659 /// to number replicas from an alternate index (eg: 1-indexed) over the default
660 /// 0-indexed names, or to orchestrate progressive movement of replicas from
661 /// one StatefulSet to another.
662 /// If set, replica indices will be in the range:
663 /// [.spec.ordinals.start, .spec.ordinals.start + .spec.replicas).
664 /// If unset, defaults to 0. Replica indices will be in the range:
665 /// [0, .spec.replicas).
666 /// +optional
667 #[prost(int32, optional, tag = "1")]
668 pub start: ::core::option::Option<i32>,
669}
670/// StatefulSetPersistentVolumeClaimRetentionPolicy describes the policy used for PVCs
671/// created from the StatefulSet VolumeClaimTemplates.
672#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
673pub struct StatefulSetPersistentVolumeClaimRetentionPolicy {
674 /// WhenDeleted specifies what happens to PVCs created from StatefulSet
675 /// VolumeClaimTemplates when the StatefulSet is deleted. The default policy
676 /// of `Retain` causes PVCs to not be affected by StatefulSet deletion. The
677 /// `Delete` policy causes those PVCs to be deleted.
678 #[prost(string, optional, tag = "1")]
679 pub when_deleted: ::core::option::Option<::prost::alloc::string::String>,
680 /// WhenScaled specifies what happens to PVCs created from StatefulSet
681 /// VolumeClaimTemplates when the StatefulSet is scaled down. The default
682 /// policy of `Retain` causes PVCs to not be affected by a scaledown. The
683 /// `Delete` policy causes the associated PVCs for any excess pods above
684 /// the replica count to be deleted.
685 #[prost(string, optional, tag = "2")]
686 pub when_scaled: ::core::option::Option<::prost::alloc::string::String>,
687}
688/// A StatefulSetSpec is the specification of a StatefulSet.
689#[derive(Clone, PartialEq, ::prost::Message)]
690pub struct StatefulSetSpec {
691 /// replicas is the desired number of replicas of the given Template.
692 /// These are replicas in the sense that they are instantiations of the
693 /// same Template, but individual replicas also have a consistent identity.
694 /// If unspecified, defaults to 1.
695 /// TODO: Consider a rename of this field.
696 /// +optional
697 #[prost(int32, optional, tag = "1")]
698 pub replicas: ::core::option::Option<i32>,
699 /// selector is a label query over pods that should match the replica count.
700 /// It must match the pod template's labels.
701 /// More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors>
702 #[prost(message, optional, tag = "2")]
703 pub selector:
704 ::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::LabelSelector>,
705 /// template is the object that describes the pod that will be created if
706 /// insufficient replicas are detected. Each pod stamped out by the StatefulSet
707 /// will fulfill this Template, but have a unique identity from the rest
708 /// of the StatefulSet. Each pod will be named with the format
709 /// <statefulsetname>-<podindex>. For example, a pod in a StatefulSet named
710 /// "web" with index number "3" would be named "web-3".
711 /// The only allowed template.spec.restartPolicy value is "Always".
712 #[prost(message, optional, tag = "3")]
713 pub template: ::core::option::Option<super::super::core::v1::PodTemplateSpec>,
714 /// volumeClaimTemplates is a list of claims that pods are allowed to reference.
715 /// The StatefulSet controller is responsible for mapping network identities to
716 /// claims in a way that maintains the identity of a pod. Every claim in
717 /// this list must have at least one matching (by name) volumeMount in one
718 /// container in the template. A claim in this list takes precedence over
719 /// any volumes in the template, with the same name.
720 /// TODO: Define the behavior if a claim already exists with the same name.
721 /// +optional
722 /// +listType=atomic
723 #[prost(message, repeated, tag = "4")]
724 pub volume_claim_templates: ::prost::alloc::vec::Vec<super::super::core::v1::PersistentVolumeClaim>,
725 /// serviceName is the name of the service that governs this StatefulSet.
726 /// This service must exist before the StatefulSet, and is responsible for
727 /// the network identity of the set. Pods get DNS/hostnames that follow the
728 /// pattern: pod-specific-string.serviceName.default.svc.cluster.local
729 /// where "pod-specific-string" is managed by the StatefulSet controller.
730 /// +optional
731 #[prost(string, optional, tag = "5")]
732 pub service_name: ::core::option::Option<::prost::alloc::string::String>,
733 /// podManagementPolicy controls how pods are created during initial scale up,
734 /// when replacing pods on nodes, or when scaling down. The default policy is
735 /// `OrderedReady`, where pods are created in increasing order (pod-0, then
736 /// pod-1, etc) and the controller will wait until each pod is ready before
737 /// continuing. When scaling down, the pods are removed in the opposite order.
738 /// The alternative policy is `Parallel` which will create pods in parallel
739 /// to match the desired scale without waiting, and on scale down will delete
740 /// all pods at once.
741 /// +optional
742 #[prost(string, optional, tag = "6")]
743 pub pod_management_policy: ::core::option::Option<::prost::alloc::string::String>,
744 /// updateStrategy indicates the StatefulSetUpdateStrategy that will be
745 /// employed to update Pods in the StatefulSet when a revision is made to
746 /// Template.
747 #[prost(message, optional, tag = "7")]
748 pub update_strategy: ::core::option::Option<StatefulSetUpdateStrategy>,
749 /// revisionHistoryLimit is the maximum number of revisions that will
750 /// be maintained in the StatefulSet's revision history. The revision history
751 /// consists of all revisions not represented by a currently applied
752 /// StatefulSetSpec version. The default value is 10.
753 #[prost(int32, optional, tag = "8")]
754 pub revision_history_limit: ::core::option::Option<i32>,
755 /// Minimum number of seconds for which a newly created pod should be ready
756 /// without any of its container crashing for it to be considered available.
757 /// Defaults to 0 (pod will be considered available as soon as it is ready)
758 /// +optional
759 #[prost(int32, optional, tag = "9")]
760 pub min_ready_seconds: ::core::option::Option<i32>,
761 /// persistentVolumeClaimRetentionPolicy describes the lifecycle of persistent
762 /// volume claims created from volumeClaimTemplates. By default, all persistent
763 /// volume claims are created as needed and retained until manually deleted. This
764 /// policy allows the lifecycle to be altered, for example by deleting persistent
765 /// volume claims when their stateful set is deleted, or when their pod is scaled
766 /// down.
767 /// +optional
768 #[prost(message, optional, tag = "10")]
769 pub persistent_volume_claim_retention_policy:
770 ::core::option::Option<StatefulSetPersistentVolumeClaimRetentionPolicy>,
771 /// ordinals controls the numbering of replica indices in a StatefulSet. The
772 /// default ordinals behavior assigns a "0" index to the first replica and
773 /// increments the index by one for each additional replica requested.
774 /// +optional
775 #[prost(message, optional, tag = "11")]
776 pub ordinals: ::core::option::Option<StatefulSetOrdinals>,
777}
778/// StatefulSetStatus represents the current state of a StatefulSet.
779#[derive(Clone, PartialEq, ::prost::Message)]
780pub struct StatefulSetStatus {
781 /// observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the
782 /// StatefulSet's generation, which is updated on mutation by the API Server.
783 /// +optional
784 #[prost(int64, optional, tag = "1")]
785 pub observed_generation: ::core::option::Option<i64>,
786 /// replicas is the number of Pods created by the StatefulSet controller.
787 #[prost(int32, optional, tag = "2")]
788 pub replicas: ::core::option::Option<i32>,
789 /// readyReplicas is the number of pods created for this StatefulSet with a Ready Condition.
790 #[prost(int32, optional, tag = "3")]
791 pub ready_replicas: ::core::option::Option<i32>,
792 /// currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version
793 /// indicated by currentRevision.
794 #[prost(int32, optional, tag = "4")]
795 pub current_replicas: ::core::option::Option<i32>,
796 /// updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version
797 /// indicated by updateRevision.
798 #[prost(int32, optional, tag = "5")]
799 pub updated_replicas: ::core::option::Option<i32>,
800 /// currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the
801 /// sequence [0,currentReplicas).
802 #[prost(string, optional, tag = "6")]
803 pub current_revision: ::core::option::Option<::prost::alloc::string::String>,
804 /// updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence
805 /// [replicas-updatedReplicas,replicas)
806 #[prost(string, optional, tag = "7")]
807 pub update_revision: ::core::option::Option<::prost::alloc::string::String>,
808 /// collisionCount is the count of hash collisions for the StatefulSet. The StatefulSet controller
809 /// uses this field as a collision avoidance mechanism when it needs to create the name for the
810 /// newest ControllerRevision.
811 /// +optional
812 #[prost(int32, optional, tag = "9")]
813 pub collision_count: ::core::option::Option<i32>,
814 /// Represents the latest available observations of a statefulset's current state.
815 /// +optional
816 /// +patchMergeKey=type
817 /// +patchStrategy=merge
818 /// +listType=map
819 /// +listMapKey=type
820 #[prost(message, repeated, tag = "10")]
821 pub conditions: ::prost::alloc::vec::Vec<StatefulSetCondition>,
822 /// Total number of available pods (ready for at least minReadySeconds) targeted by this statefulset.
823 /// +optional
824 #[prost(int32, optional, tag = "11")]
825 pub available_replicas: ::core::option::Option<i32>,
826}
827/// StatefulSetUpdateStrategy indicates the strategy that the StatefulSet
828/// controller will use to perform updates. It includes any additional parameters
829/// necessary to perform the update for the indicated strategy.
830#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
831pub struct StatefulSetUpdateStrategy {
832 /// Type indicates the type of the StatefulSetUpdateStrategy.
833 /// Default is RollingUpdate.
834 /// +optional
835 #[prost(string, optional, tag = "1")]
836 pub r#type: ::core::option::Option<::prost::alloc::string::String>,
837 /// RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType.
838 /// +optional
839 #[prost(message, optional, tag = "2")]
840 pub rolling_update: ::core::option::Option<RollingUpdateStatefulSetStrategy>,
841}
842
843impl crate::Resource for ControllerRevision {
844 const API_VERSION: &'static str = "apps/v1";
845 const GROUP: &'static str = "apps";
846 const VERSION: &'static str = "v1";
847 const KIND: &'static str = "ControllerRevision";
848 const URL_PATH_SEGMENT: &'static str = "controllerrevisions";
849 type Scope = crate::NamespaceResourceScope;
850}
851impl crate::Metadata for ControllerRevision {
852 type Ty = crate::apimachinery::pkg::apis::meta::v1::ObjectMeta;
853 fn metadata(&self) -> Option<&<Self as crate::Metadata>::Ty> {
854 self.metadata.as_ref()
855 }
856 fn metadata_mut(&mut self) -> Option<&mut <Self as crate::Metadata>::Ty> {
857 self.metadata.as_mut()
858 }
859}
860
861impl crate::Resource for DaemonSet {
862 const API_VERSION: &'static str = "apps/v1";
863 const GROUP: &'static str = "apps";
864 const VERSION: &'static str = "v1";
865 const KIND: &'static str = "DaemonSet";
866 const URL_PATH_SEGMENT: &'static str = "daemonsets";
867 type Scope = crate::NamespaceResourceScope;
868}
869impl crate::Metadata for DaemonSet {
870 type Ty = crate::apimachinery::pkg::apis::meta::v1::ObjectMeta;
871 fn metadata(&self) -> Option<&<Self as crate::Metadata>::Ty> {
872 self.metadata.as_ref()
873 }
874 fn metadata_mut(&mut self) -> Option<&mut <Self as crate::Metadata>::Ty> {
875 self.metadata.as_mut()
876 }
877}
878impl crate::HasSpec for DaemonSet {
879 type Spec = crate::api::apps::v1::DaemonSetSpec;
880 fn spec(&self) -> Option<&<Self as crate::HasSpec>::Spec> {
881 self.spec.as_ref()
882 }
883 fn spec_mut(&mut self) -> Option<&mut <Self as crate::HasSpec>::Spec> {
884 self.spec.as_mut()
885 }
886}
887impl crate::HasStatus for DaemonSet {
888 type Status = crate::api::apps::v1::DaemonSetStatus;
889 fn status(&self) -> Option<&<Self as crate::HasStatus>::Status> {
890 self.status.as_ref()
891 }
892 fn status_mut(&mut self) -> Option<&mut <Self as crate::HasStatus>::Status> {
893 self.status.as_mut()
894 }
895}
896impl crate::HasConditions for DaemonSet {
897 type Condition = crate::api::apps::v1::DaemonSetCondition;
898 fn conditions(&self) -> Option<&[<Self as crate::HasConditions>::Condition]> {
899 self.status.as_ref().map(|s| s.conditions.as_slice())
900 }
901 fn conditions_mut(&mut self) -> Option<&mut Vec<<Self as crate::HasConditions>::Condition>> {
902 self.status.as_mut().and_then(|s| Some(s.conditions.as_mut()))
903 }
904}
905
906impl crate::Resource for Deployment {
907 const API_VERSION: &'static str = "apps/v1";
908 const GROUP: &'static str = "apps";
909 const VERSION: &'static str = "v1";
910 const KIND: &'static str = "Deployment";
911 const URL_PATH_SEGMENT: &'static str = "deployments";
912 type Scope = crate::NamespaceResourceScope;
913}
914impl crate::Metadata for Deployment {
915 type Ty = crate::apimachinery::pkg::apis::meta::v1::ObjectMeta;
916 fn metadata(&self) -> Option<&<Self as crate::Metadata>::Ty> {
917 self.metadata.as_ref()
918 }
919 fn metadata_mut(&mut self) -> Option<&mut <Self as crate::Metadata>::Ty> {
920 self.metadata.as_mut()
921 }
922}
923impl crate::HasSpec for Deployment {
924 type Spec = crate::api::apps::v1::DeploymentSpec;
925 fn spec(&self) -> Option<&<Self as crate::HasSpec>::Spec> {
926 self.spec.as_ref()
927 }
928 fn spec_mut(&mut self) -> Option<&mut <Self as crate::HasSpec>::Spec> {
929 self.spec.as_mut()
930 }
931}
932impl crate::HasStatus for Deployment {
933 type Status = crate::api::apps::v1::DeploymentStatus;
934 fn status(&self) -> Option<&<Self as crate::HasStatus>::Status> {
935 self.status.as_ref()
936 }
937 fn status_mut(&mut self) -> Option<&mut <Self as crate::HasStatus>::Status> {
938 self.status.as_mut()
939 }
940}
941impl crate::HasConditions for Deployment {
942 type Condition = crate::api::apps::v1::DeploymentCondition;
943 fn conditions(&self) -> Option<&[<Self as crate::HasConditions>::Condition]> {
944 self.status.as_ref().map(|s| s.conditions.as_slice())
945 }
946 fn conditions_mut(&mut self) -> Option<&mut Vec<<Self as crate::HasConditions>::Condition>> {
947 self.status.as_mut().and_then(|s| Some(s.conditions.as_mut()))
948 }
949}
950
951impl crate::Resource for ReplicaSet {
952 const API_VERSION: &'static str = "apps/v1";
953 const GROUP: &'static str = "apps";
954 const VERSION: &'static str = "v1";
955 const KIND: &'static str = "ReplicaSet";
956 const URL_PATH_SEGMENT: &'static str = "replicasets";
957 type Scope = crate::NamespaceResourceScope;
958}
959impl crate::Metadata for ReplicaSet {
960 type Ty = crate::apimachinery::pkg::apis::meta::v1::ObjectMeta;
961 fn metadata(&self) -> Option<&<Self as crate::Metadata>::Ty> {
962 self.metadata.as_ref()
963 }
964 fn metadata_mut(&mut self) -> Option<&mut <Self as crate::Metadata>::Ty> {
965 self.metadata.as_mut()
966 }
967}
968impl crate::HasSpec for ReplicaSet {
969 type Spec = crate::api::apps::v1::ReplicaSetSpec;
970 fn spec(&self) -> Option<&<Self as crate::HasSpec>::Spec> {
971 self.spec.as_ref()
972 }
973 fn spec_mut(&mut self) -> Option<&mut <Self as crate::HasSpec>::Spec> {
974 self.spec.as_mut()
975 }
976}
977impl crate::HasStatus for ReplicaSet {
978 type Status = crate::api::apps::v1::ReplicaSetStatus;
979 fn status(&self) -> Option<&<Self as crate::HasStatus>::Status> {
980 self.status.as_ref()
981 }
982 fn status_mut(&mut self) -> Option<&mut <Self as crate::HasStatus>::Status> {
983 self.status.as_mut()
984 }
985}
986impl crate::HasConditions for ReplicaSet {
987 type Condition = crate::api::apps::v1::ReplicaSetCondition;
988 fn conditions(&self) -> Option<&[<Self as crate::HasConditions>::Condition]> {
989 self.status.as_ref().map(|s| s.conditions.as_slice())
990 }
991 fn conditions_mut(&mut self) -> Option<&mut Vec<<Self as crate::HasConditions>::Condition>> {
992 self.status.as_mut().and_then(|s| Some(s.conditions.as_mut()))
993 }
994}
995
996impl crate::Resource for StatefulSet {
997 const API_VERSION: &'static str = "apps/v1";
998 const GROUP: &'static str = "apps";
999 const VERSION: &'static str = "v1";
1000 const KIND: &'static str = "StatefulSet";
1001 const URL_PATH_SEGMENT: &'static str = "statefulsets";
1002 type Scope = crate::NamespaceResourceScope;
1003}
1004impl crate::Metadata for StatefulSet {
1005 type Ty = crate::apimachinery::pkg::apis::meta::v1::ObjectMeta;
1006 fn metadata(&self) -> Option<&<Self as crate::Metadata>::Ty> {
1007 self.metadata.as_ref()
1008 }
1009 fn metadata_mut(&mut self) -> Option<&mut <Self as crate::Metadata>::Ty> {
1010 self.metadata.as_mut()
1011 }
1012}
1013impl crate::HasSpec for StatefulSet {
1014 type Spec = crate::api::apps::v1::StatefulSetSpec;
1015 fn spec(&self) -> Option<&<Self as crate::HasSpec>::Spec> {
1016 self.spec.as_ref()
1017 }
1018 fn spec_mut(&mut self) -> Option<&mut <Self as crate::HasSpec>::Spec> {
1019 self.spec.as_mut()
1020 }
1021}
1022impl crate::HasStatus for StatefulSet {
1023 type Status = crate::api::apps::v1::StatefulSetStatus;
1024 fn status(&self) -> Option<&<Self as crate::HasStatus>::Status> {
1025 self.status.as_ref()
1026 }
1027 fn status_mut(&mut self) -> Option<&mut <Self as crate::HasStatus>::Status> {
1028 self.status.as_mut()
1029 }
1030}
1031impl crate::HasConditions for StatefulSet {
1032 type Condition = crate::api::apps::v1::StatefulSetCondition;
1033 fn conditions(&self) -> Option<&[<Self as crate::HasConditions>::Condition]> {
1034 self.status.as_ref().map(|s| s.conditions.as_slice())
1035 }
1036 fn conditions_mut(&mut self) -> Option<&mut Vec<<Self as crate::HasConditions>::Condition>> {
1037 self.status.as_mut().and_then(|s| Some(s.conditions.as_mut()))
1038 }
1039}