1#[derive(Clone, Debug, Default, PartialEq)]
5pub struct StatefulSetSpec {
6 pub min_ready_seconds: Option<i32>,
8
9 pub ordinals: Option<crate::api::apps::v1::StatefulSetOrdinals>,
11
12 pub persistent_volume_claim_retention_policy: Option<crate::api::apps::v1::StatefulSetPersistentVolumeClaimRetentionPolicy>,
14
15 pub pod_management_policy: Option<std::string::String>,
17
18 pub replicas: Option<i32>,
20
21 pub revision_history_limit: Option<i32>,
23
24 pub selector: crate::apimachinery::pkg::apis::meta::v1::LabelSelector,
26
27 pub service_name: Option<std::string::String>,
29
30 pub template: crate::api::core::v1::PodTemplateSpec,
32
33 pub update_strategy: Option<crate::api::apps::v1::StatefulSetUpdateStrategy>,
35
36 pub volume_claim_templates: Option<std::vec::Vec<crate::api::core::v1::PersistentVolumeClaim>>,
38}
39
40impl crate::DeepMerge for StatefulSetSpec {
41 fn merge_from(&mut self, other: Self) {
42 crate::DeepMerge::merge_from(&mut self.min_ready_seconds, other.min_ready_seconds);
43 crate::DeepMerge::merge_from(&mut self.ordinals, other.ordinals);
44 crate::DeepMerge::merge_from(&mut self.persistent_volume_claim_retention_policy, other.persistent_volume_claim_retention_policy);
45 crate::DeepMerge::merge_from(&mut self.pod_management_policy, other.pod_management_policy);
46 crate::DeepMerge::merge_from(&mut self.replicas, other.replicas);
47 crate::DeepMerge::merge_from(&mut self.revision_history_limit, other.revision_history_limit);
48 crate::DeepMerge::merge_from(&mut self.selector, other.selector);
49 crate::DeepMerge::merge_from(&mut self.service_name, other.service_name);
50 crate::DeepMerge::merge_from(&mut self.template, other.template);
51 crate::DeepMerge::merge_from(&mut self.update_strategy, other.update_strategy);
52 crate::merge_strategies::list::map(
53 &mut self.volume_claim_templates,
54 other.volume_claim_templates,
55 &[|lhs, rhs| lhs.metadata.name == rhs.metadata.name],
56 |current_item, other_item| {
57 crate::DeepMerge::merge_from(current_item, other_item);
58 },
59 );
60 }
61}
62
63impl<'de> crate::serde::Deserialize<'de> for StatefulSetSpec {
64 fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where D: crate::serde::Deserializer<'de> {
65 #[allow(non_camel_case_types)]
66 enum Field {
67 Key_min_ready_seconds,
68 Key_ordinals,
69 Key_persistent_volume_claim_retention_policy,
70 Key_pod_management_policy,
71 Key_replicas,
72 Key_revision_history_limit,
73 Key_selector,
74 Key_service_name,
75 Key_template,
76 Key_update_strategy,
77 Key_volume_claim_templates,
78 Other,
79 }
80
81 impl<'de> crate::serde::Deserialize<'de> for Field {
82 fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where D: crate::serde::Deserializer<'de> {
83 struct Visitor;
84
85 impl crate::serde::de::Visitor<'_> for Visitor {
86 type Value = Field;
87
88 fn expecting(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
89 f.write_str("field identifier")
90 }
91
92 fn visit_str<E>(self, v: &str) -> Result<Self::Value, E> where E: crate::serde::de::Error {
93 Ok(match v {
94 "minReadySeconds" => Field::Key_min_ready_seconds,
95 "ordinals" => Field::Key_ordinals,
96 "persistentVolumeClaimRetentionPolicy" => Field::Key_persistent_volume_claim_retention_policy,
97 "podManagementPolicy" => Field::Key_pod_management_policy,
98 "replicas" => Field::Key_replicas,
99 "revisionHistoryLimit" => Field::Key_revision_history_limit,
100 "selector" => Field::Key_selector,
101 "serviceName" => Field::Key_service_name,
102 "template" => Field::Key_template,
103 "updateStrategy" => Field::Key_update_strategy,
104 "volumeClaimTemplates" => Field::Key_volume_claim_templates,
105 _ => Field::Other,
106 })
107 }
108 }
109
110 deserializer.deserialize_identifier(Visitor)
111 }
112 }
113
114 struct Visitor;
115
116 impl<'de> crate::serde::de::Visitor<'de> for Visitor {
117 type Value = StatefulSetSpec;
118
119 fn expecting(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
120 f.write_str("StatefulSetSpec")
121 }
122
123 fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error> where A: crate::serde::de::MapAccess<'de> {
124 let mut value_min_ready_seconds: Option<i32> = None;
125 let mut value_ordinals: Option<crate::api::apps::v1::StatefulSetOrdinals> = None;
126 let mut value_persistent_volume_claim_retention_policy: Option<crate::api::apps::v1::StatefulSetPersistentVolumeClaimRetentionPolicy> = None;
127 let mut value_pod_management_policy: Option<std::string::String> = None;
128 let mut value_replicas: Option<i32> = None;
129 let mut value_revision_history_limit: Option<i32> = None;
130 let mut value_selector: Option<crate::apimachinery::pkg::apis::meta::v1::LabelSelector> = None;
131 let mut value_service_name: Option<std::string::String> = None;
132 let mut value_template: Option<crate::api::core::v1::PodTemplateSpec> = None;
133 let mut value_update_strategy: Option<crate::api::apps::v1::StatefulSetUpdateStrategy> = None;
134 let mut value_volume_claim_templates: Option<std::vec::Vec<crate::api::core::v1::PersistentVolumeClaim>> = None;
135
136 while let Some(key) = crate::serde::de::MapAccess::next_key::<Field>(&mut map)? {
137 match key {
138 Field::Key_min_ready_seconds => value_min_ready_seconds = crate::serde::de::MapAccess::next_value(&mut map)?,
139 Field::Key_ordinals => value_ordinals = crate::serde::de::MapAccess::next_value(&mut map)?,
140 Field::Key_persistent_volume_claim_retention_policy => value_persistent_volume_claim_retention_policy = crate::serde::de::MapAccess::next_value(&mut map)?,
141 Field::Key_pod_management_policy => value_pod_management_policy = crate::serde::de::MapAccess::next_value(&mut map)?,
142 Field::Key_replicas => value_replicas = crate::serde::de::MapAccess::next_value(&mut map)?,
143 Field::Key_revision_history_limit => value_revision_history_limit = crate::serde::de::MapAccess::next_value(&mut map)?,
144 Field::Key_selector => value_selector = crate::serde::de::MapAccess::next_value(&mut map)?,
145 Field::Key_service_name => value_service_name = crate::serde::de::MapAccess::next_value(&mut map)?,
146 Field::Key_template => value_template = crate::serde::de::MapAccess::next_value(&mut map)?,
147 Field::Key_update_strategy => value_update_strategy = crate::serde::de::MapAccess::next_value(&mut map)?,
148 Field::Key_volume_claim_templates => value_volume_claim_templates = crate::serde::de::MapAccess::next_value(&mut map)?,
149 Field::Other => { let _: crate::serde::de::IgnoredAny = crate::serde::de::MapAccess::next_value(&mut map)?; },
150 }
151 }
152
153 Ok(StatefulSetSpec {
154 min_ready_seconds: value_min_ready_seconds,
155 ordinals: value_ordinals,
156 persistent_volume_claim_retention_policy: value_persistent_volume_claim_retention_policy,
157 pod_management_policy: value_pod_management_policy,
158 replicas: value_replicas,
159 revision_history_limit: value_revision_history_limit,
160 selector: value_selector.unwrap_or_default(),
161 service_name: value_service_name,
162 template: value_template.unwrap_or_default(),
163 update_strategy: value_update_strategy,
164 volume_claim_templates: value_volume_claim_templates,
165 })
166 }
167 }
168
169 deserializer.deserialize_struct(
170 "StatefulSetSpec",
171 &[
172 "minReadySeconds",
173 "ordinals",
174 "persistentVolumeClaimRetentionPolicy",
175 "podManagementPolicy",
176 "replicas",
177 "revisionHistoryLimit",
178 "selector",
179 "serviceName",
180 "template",
181 "updateStrategy",
182 "volumeClaimTemplates",
183 ],
184 Visitor,
185 )
186 }
187}
188
189impl crate::serde::Serialize for StatefulSetSpec {
190 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where S: crate::serde::Serializer {
191 let mut state = serializer.serialize_struct(
192 "StatefulSetSpec",
193 2 +
194 self.min_ready_seconds.as_ref().map_or(0, |_| 1) +
195 self.ordinals.as_ref().map_or(0, |_| 1) +
196 self.persistent_volume_claim_retention_policy.as_ref().map_or(0, |_| 1) +
197 self.pod_management_policy.as_ref().map_or(0, |_| 1) +
198 self.replicas.as_ref().map_or(0, |_| 1) +
199 self.revision_history_limit.as_ref().map_or(0, |_| 1) +
200 self.service_name.as_ref().map_or(0, |_| 1) +
201 self.update_strategy.as_ref().map_or(0, |_| 1) +
202 self.volume_claim_templates.as_ref().map_or(0, |_| 1),
203 )?;
204 if let Some(value) = &self.min_ready_seconds {
205 crate::serde::ser::SerializeStruct::serialize_field(&mut state, "minReadySeconds", value)?;
206 }
207 if let Some(value) = &self.ordinals {
208 crate::serde::ser::SerializeStruct::serialize_field(&mut state, "ordinals", value)?;
209 }
210 if let Some(value) = &self.persistent_volume_claim_retention_policy {
211 crate::serde::ser::SerializeStruct::serialize_field(&mut state, "persistentVolumeClaimRetentionPolicy", value)?;
212 }
213 if let Some(value) = &self.pod_management_policy {
214 crate::serde::ser::SerializeStruct::serialize_field(&mut state, "podManagementPolicy", value)?;
215 }
216 if let Some(value) = &self.replicas {
217 crate::serde::ser::SerializeStruct::serialize_field(&mut state, "replicas", value)?;
218 }
219 if let Some(value) = &self.revision_history_limit {
220 crate::serde::ser::SerializeStruct::serialize_field(&mut state, "revisionHistoryLimit", value)?;
221 }
222 crate::serde::ser::SerializeStruct::serialize_field(&mut state, "selector", &self.selector)?;
223 if let Some(value) = &self.service_name {
224 crate::serde::ser::SerializeStruct::serialize_field(&mut state, "serviceName", value)?;
225 }
226 crate::serde::ser::SerializeStruct::serialize_field(&mut state, "template", &self.template)?;
227 if let Some(value) = &self.update_strategy {
228 crate::serde::ser::SerializeStruct::serialize_field(&mut state, "updateStrategy", value)?;
229 }
230 if let Some(value) = &self.volume_claim_templates {
231 crate::serde::ser::SerializeStruct::serialize_field(&mut state, "volumeClaimTemplates", value)?;
232 }
233 crate::serde::ser::SerializeStruct::end(state)
234 }
235}
236
237#[cfg(feature = "schemars")]
238impl crate::schemars::JsonSchema for StatefulSetSpec {
239 fn schema_name() -> std::borrow::Cow<'static, str> {
240 "io.k8s.api.apps.v1.StatefulSetSpec".into()
241 }
242
243 fn json_schema(__gen: &mut crate::schemars::SchemaGenerator) -> crate::schemars::Schema {
244 crate::schemars::json_schema!({
245 "description": "A StatefulSetSpec is the specification of a StatefulSet.",
246 "type": "object",
247 "properties": {
248 "minReadySeconds": {
249 "description": "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)",
250 "type": "integer",
251 "format": "int32",
252 },
253 "ordinals": ({
254 let mut schema_obj = __gen.subschema_for::<crate::api::apps::v1::StatefulSetOrdinals>();
255 schema_obj.ensure_object().insert("description".into(), "ordinals controls the numbering of replica indices in a StatefulSet. The default ordinals behavior assigns a \"0\" index to the first replica and increments the index by one for each additional replica requested.".into());
256 schema_obj
257 }),
258 "persistentVolumeClaimRetentionPolicy": ({
259 let mut schema_obj = __gen.subschema_for::<crate::api::apps::v1::StatefulSetPersistentVolumeClaimRetentionPolicy>();
260 schema_obj.ensure_object().insert("description".into(), "persistentVolumeClaimRetentionPolicy describes the lifecycle of persistent volume claims created from volumeClaimTemplates. By default, all persistent volume claims are created as needed and retained until manually deleted. This policy allows the lifecycle to be altered, for example by deleting persistent volume claims when their stateful set is deleted, or when their pod is scaled down.".into());
261 schema_obj
262 }),
263 "podManagementPolicy": {
264 "description": "podManagementPolicy controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down. The default policy is `OrderedReady`, where pods are created in increasing order (pod-0, then pod-1, etc) and the controller will wait until each pod is ready before continuing. When scaling down, the pods are removed in the opposite order. The alternative policy is `Parallel` which will create pods in parallel to match the desired scale without waiting, and on scale down will delete all pods at once.",
265 "type": "string",
266 },
267 "replicas": {
268 "description": "replicas is the desired number of replicas of the given Template. These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1.",
269 "type": "integer",
270 "format": "int32",
271 },
272 "revisionHistoryLimit": {
273 "description": "revisionHistoryLimit is the maximum number of revisions that will be maintained in the StatefulSet's revision history. The revision history consists of all revisions not represented by a currently applied StatefulSetSpec version. The default value is 10.",
274 "type": "integer",
275 "format": "int32",
276 },
277 "selector": ({
278 let mut schema_obj = __gen.subschema_for::<crate::apimachinery::pkg::apis::meta::v1::LabelSelector>();
279 schema_obj.ensure_object().insert("description".into(), "selector is a label query over pods that should match the replica count. It must match the pod template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors".into());
280 schema_obj
281 }),
282 "serviceName": {
283 "description": "serviceName is the name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where \"pod-specific-string\" is managed by the StatefulSet controller.",
284 "type": "string",
285 },
286 "template": ({
287 let mut schema_obj = __gen.subschema_for::<crate::api::core::v1::PodTemplateSpec>();
288 schema_obj.ensure_object().insert("description".into(), "template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet. Each pod will be named with the format <statefulsetname>-<podindex>. For example, a pod in a StatefulSet named \"web\" with index number \"3\" would be named \"web-3\". The only allowed template.spec.restartPolicy value is \"Always\".".into());
289 schema_obj
290 }),
291 "updateStrategy": ({
292 let mut schema_obj = __gen.subschema_for::<crate::api::apps::v1::StatefulSetUpdateStrategy>();
293 schema_obj.ensure_object().insert("description".into(), "updateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template.".into());
294 schema_obj
295 }),
296 "volumeClaimTemplates": {
297 "description": "volumeClaimTemplates is a list of claims that pods are allowed to reference. The StatefulSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name.",
298 "type": "array",
299 "items": (__gen.subschema_for::<crate::api::core::v1::PersistentVolumeClaim>()),
300 },
301 },
302 "required": [
303 "selector",
304 "template",
305 ],
306 })
307 }
308}
309
310#[cfg(feature = "schemars08")]
311impl crate::schemars08::JsonSchema for StatefulSetSpec {
312 fn schema_name() -> std::string::String {
313 "io.k8s.api.apps.v1.StatefulSetSpec".into()
314 }
315
316 fn json_schema(__gen: &mut crate::schemars08::gen::SchemaGenerator) -> crate::schemars08::schema::Schema {
317 crate::schemars08::schema::Schema::Object(crate::schemars08::schema::SchemaObject {
318 metadata: Some(std::boxed::Box::new(crate::schemars08::schema::Metadata {
319 description: Some("A StatefulSetSpec is the specification of a StatefulSet.".into()),
320 ..Default::default()
321 })),
322 instance_type: Some(crate::schemars08::schema::SingleOrVec::Single(std::boxed::Box::new(crate::schemars08::schema::InstanceType::Object))),
323 object: Some(std::boxed::Box::new(crate::schemars08::schema::ObjectValidation {
324 properties: [
325 (
326 "minReadySeconds".into(),
327 crate::schemars08::schema::Schema::Object(crate::schemars08::schema::SchemaObject {
328 metadata: Some(std::boxed::Box::new(crate::schemars08::schema::Metadata {
329 description: Some("Minimum number of seconds for which a newly created pod should be ready without any of its container crashing for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)".into()),
330 ..Default::default()
331 })),
332 instance_type: Some(crate::schemars08::schema::SingleOrVec::Single(std::boxed::Box::new(crate::schemars08::schema::InstanceType::Integer))),
333 format: Some("int32".into()),
334 ..Default::default()
335 }),
336 ),
337 (
338 "ordinals".into(),
339 {
340 let mut schema_obj = __gen.subschema_for::<crate::api::apps::v1::StatefulSetOrdinals>().into_object();
341 schema_obj.metadata = Some(std::boxed::Box::new(crate::schemars08::schema::Metadata {
342 description: Some("ordinals controls the numbering of replica indices in a StatefulSet. The default ordinals behavior assigns a \"0\" index to the first replica and increments the index by one for each additional replica requested.".into()),
343 ..Default::default()
344 }));
345 crate::schemars08::schema::Schema::Object(schema_obj)
346 },
347 ),
348 (
349 "persistentVolumeClaimRetentionPolicy".into(),
350 {
351 let mut schema_obj = __gen.subschema_for::<crate::api::apps::v1::StatefulSetPersistentVolumeClaimRetentionPolicy>().into_object();
352 schema_obj.metadata = Some(std::boxed::Box::new(crate::schemars08::schema::Metadata {
353 description: Some("persistentVolumeClaimRetentionPolicy describes the lifecycle of persistent volume claims created from volumeClaimTemplates. By default, all persistent volume claims are created as needed and retained until manually deleted. This policy allows the lifecycle to be altered, for example by deleting persistent volume claims when their stateful set is deleted, or when their pod is scaled down.".into()),
354 ..Default::default()
355 }));
356 crate::schemars08::schema::Schema::Object(schema_obj)
357 },
358 ),
359 (
360 "podManagementPolicy".into(),
361 crate::schemars08::schema::Schema::Object(crate::schemars08::schema::SchemaObject {
362 metadata: Some(std::boxed::Box::new(crate::schemars08::schema::Metadata {
363 description: Some("podManagementPolicy controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down. The default policy is `OrderedReady`, where pods are created in increasing order (pod-0, then pod-1, etc) and the controller will wait until each pod is ready before continuing. When scaling down, the pods are removed in the opposite order. The alternative policy is `Parallel` which will create pods in parallel to match the desired scale without waiting, and on scale down will delete all pods at once.".into()),
364 ..Default::default()
365 })),
366 instance_type: Some(crate::schemars08::schema::SingleOrVec::Single(std::boxed::Box::new(crate::schemars08::schema::InstanceType::String))),
367 ..Default::default()
368 }),
369 ),
370 (
371 "replicas".into(),
372 crate::schemars08::schema::Schema::Object(crate::schemars08::schema::SchemaObject {
373 metadata: Some(std::boxed::Box::new(crate::schemars08::schema::Metadata {
374 description: Some("replicas is the desired number of replicas of the given Template. These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1.".into()),
375 ..Default::default()
376 })),
377 instance_type: Some(crate::schemars08::schema::SingleOrVec::Single(std::boxed::Box::new(crate::schemars08::schema::InstanceType::Integer))),
378 format: Some("int32".into()),
379 ..Default::default()
380 }),
381 ),
382 (
383 "revisionHistoryLimit".into(),
384 crate::schemars08::schema::Schema::Object(crate::schemars08::schema::SchemaObject {
385 metadata: Some(std::boxed::Box::new(crate::schemars08::schema::Metadata {
386 description: Some("revisionHistoryLimit is the maximum number of revisions that will be maintained in the StatefulSet's revision history. The revision history consists of all revisions not represented by a currently applied StatefulSetSpec version. The default value is 10.".into()),
387 ..Default::default()
388 })),
389 instance_type: Some(crate::schemars08::schema::SingleOrVec::Single(std::boxed::Box::new(crate::schemars08::schema::InstanceType::Integer))),
390 format: Some("int32".into()),
391 ..Default::default()
392 }),
393 ),
394 (
395 "selector".into(),
396 {
397 let mut schema_obj = __gen.subschema_for::<crate::apimachinery::pkg::apis::meta::v1::LabelSelector>().into_object();
398 schema_obj.metadata = Some(std::boxed::Box::new(crate::schemars08::schema::Metadata {
399 description: Some("selector is a label query over pods that should match the replica count. It must match the pod template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors".into()),
400 ..Default::default()
401 }));
402 crate::schemars08::schema::Schema::Object(schema_obj)
403 },
404 ),
405 (
406 "serviceName".into(),
407 crate::schemars08::schema::Schema::Object(crate::schemars08::schema::SchemaObject {
408 metadata: Some(std::boxed::Box::new(crate::schemars08::schema::Metadata {
409 description: Some("serviceName is the name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where \"pod-specific-string\" is managed by the StatefulSet controller.".into()),
410 ..Default::default()
411 })),
412 instance_type: Some(crate::schemars08::schema::SingleOrVec::Single(std::boxed::Box::new(crate::schemars08::schema::InstanceType::String))),
413 ..Default::default()
414 }),
415 ),
416 (
417 "template".into(),
418 {
419 let mut schema_obj = __gen.subschema_for::<crate::api::core::v1::PodTemplateSpec>().into_object();
420 schema_obj.metadata = Some(std::boxed::Box::new(crate::schemars08::schema::Metadata {
421 description: Some("template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet. Each pod will be named with the format <statefulsetname>-<podindex>. For example, a pod in a StatefulSet named \"web\" with index number \"3\" would be named \"web-3\". The only allowed template.spec.restartPolicy value is \"Always\".".into()),
422 ..Default::default()
423 }));
424 crate::schemars08::schema::Schema::Object(schema_obj)
425 },
426 ),
427 (
428 "updateStrategy".into(),
429 {
430 let mut schema_obj = __gen.subschema_for::<crate::api::apps::v1::StatefulSetUpdateStrategy>().into_object();
431 schema_obj.metadata = Some(std::boxed::Box::new(crate::schemars08::schema::Metadata {
432 description: Some("updateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template.".into()),
433 ..Default::default()
434 }));
435 crate::schemars08::schema::Schema::Object(schema_obj)
436 },
437 ),
438 (
439 "volumeClaimTemplates".into(),
440 crate::schemars08::schema::Schema::Object(crate::schemars08::schema::SchemaObject {
441 metadata: Some(std::boxed::Box::new(crate::schemars08::schema::Metadata {
442 description: Some("volumeClaimTemplates is a list of claims that pods are allowed to reference. The StatefulSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name.".into()),
443 ..Default::default()
444 })),
445 instance_type: Some(crate::schemars08::schema::SingleOrVec::Single(std::boxed::Box::new(crate::schemars08::schema::InstanceType::Array))),
446 array: Some(std::boxed::Box::new(crate::schemars08::schema::ArrayValidation {
447 items: Some(crate::schemars08::schema::SingleOrVec::Single(std::boxed::Box::new(__gen.subschema_for::<crate::api::core::v1::PersistentVolumeClaim>()))),
448 ..Default::default()
449 })),
450 ..Default::default()
451 }),
452 ),
453 ].into(),
454 required: [
455 "selector".into(),
456 "template".into(),
457 ].into(),
458 ..Default::default()
459 })),
460 ..Default::default()
461 })
462 }
463}