1#[derive(Clone, Debug, Default, PartialEq)]
5pub struct PodCertificateRequestSpec {
6 pub max_expiration_seconds: Option<i32>,
12
13 pub node_name: std::string::String,
15
16 pub node_uid: std::string::String,
18
19 pub pkix_public_key: Option<crate::ByteString>,
27
28 pub pod_name: std::string::String,
30
31 pub pod_uid: std::string::String,
33
34 pub proof_of_possession: Option<crate::ByteString>,
48
49 pub service_account_name: std::string::String,
51
52 pub service_account_uid: std::string::String,
54
55 pub signer_name: std::string::String,
59
60 pub stub_pkc_s10_request: crate::ByteString,
68
69 pub unverified_user_annotations: Option<std::collections::BTreeMap<std::string::String, std::string::String>>,
75}
76
77impl crate::DeepMerge for PodCertificateRequestSpec {
78 fn merge_from(&mut self, other: Self) {
79 crate::DeepMerge::merge_from(&mut self.max_expiration_seconds, other.max_expiration_seconds);
80 crate::DeepMerge::merge_from(&mut self.node_name, other.node_name);
81 crate::DeepMerge::merge_from(&mut self.node_uid, other.node_uid);
82 crate::DeepMerge::merge_from(&mut self.pkix_public_key, other.pkix_public_key);
83 crate::DeepMerge::merge_from(&mut self.pod_name, other.pod_name);
84 crate::DeepMerge::merge_from(&mut self.pod_uid, other.pod_uid);
85 crate::DeepMerge::merge_from(&mut self.proof_of_possession, other.proof_of_possession);
86 crate::DeepMerge::merge_from(&mut self.service_account_name, other.service_account_name);
87 crate::DeepMerge::merge_from(&mut self.service_account_uid, other.service_account_uid);
88 crate::DeepMerge::merge_from(&mut self.signer_name, other.signer_name);
89 crate::DeepMerge::merge_from(&mut self.stub_pkc_s10_request, other.stub_pkc_s10_request);
90 crate::merge_strategies::map::granular(&mut self.unverified_user_annotations, other.unverified_user_annotations, |current_item, other_item| {
91 crate::DeepMerge::merge_from(current_item, other_item);
92 });
93 }
94}
95
96impl<'de> crate::serde::Deserialize<'de> for PodCertificateRequestSpec {
97 fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where D: crate::serde::Deserializer<'de> {
98 #[allow(non_camel_case_types)]
99 enum Field {
100 Key_max_expiration_seconds,
101 Key_node_name,
102 Key_node_uid,
103 Key_pkix_public_key,
104 Key_pod_name,
105 Key_pod_uid,
106 Key_proof_of_possession,
107 Key_service_account_name,
108 Key_service_account_uid,
109 Key_signer_name,
110 Key_stub_pkc_s10_request,
111 Key_unverified_user_annotations,
112 Other,
113 }
114
115 impl<'de> crate::serde::Deserialize<'de> for Field {
116 fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where D: crate::serde::Deserializer<'de> {
117 struct Visitor;
118
119 impl crate::serde::de::Visitor<'_> for Visitor {
120 type Value = Field;
121
122 fn expecting(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
123 f.write_str("field identifier")
124 }
125
126 fn visit_str<E>(self, v: &str) -> Result<Self::Value, E> where E: crate::serde::de::Error {
127 Ok(match v {
128 "maxExpirationSeconds" => Field::Key_max_expiration_seconds,
129 "nodeName" => Field::Key_node_name,
130 "nodeUID" => Field::Key_node_uid,
131 "pkixPublicKey" => Field::Key_pkix_public_key,
132 "podName" => Field::Key_pod_name,
133 "podUID" => Field::Key_pod_uid,
134 "proofOfPossession" => Field::Key_proof_of_possession,
135 "serviceAccountName" => Field::Key_service_account_name,
136 "serviceAccountUID" => Field::Key_service_account_uid,
137 "signerName" => Field::Key_signer_name,
138 "stubPKCS10Request" => Field::Key_stub_pkc_s10_request,
139 "unverifiedUserAnnotations" => Field::Key_unverified_user_annotations,
140 _ => Field::Other,
141 })
142 }
143 }
144
145 deserializer.deserialize_identifier(Visitor)
146 }
147 }
148
149 struct Visitor;
150
151 impl<'de> crate::serde::de::Visitor<'de> for Visitor {
152 type Value = PodCertificateRequestSpec;
153
154 fn expecting(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
155 f.write_str("PodCertificateRequestSpec")
156 }
157
158 fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error> where A: crate::serde::de::MapAccess<'de> {
159 let mut value_max_expiration_seconds: Option<i32> = None;
160 let mut value_node_name: Option<std::string::String> = None;
161 let mut value_node_uid: Option<std::string::String> = None;
162 let mut value_pkix_public_key: Option<crate::ByteString> = None;
163 let mut value_pod_name: Option<std::string::String> = None;
164 let mut value_pod_uid: Option<std::string::String> = None;
165 let mut value_proof_of_possession: Option<crate::ByteString> = None;
166 let mut value_service_account_name: Option<std::string::String> = None;
167 let mut value_service_account_uid: Option<std::string::String> = None;
168 let mut value_signer_name: Option<std::string::String> = None;
169 let mut value_stub_pkc_s10_request: Option<crate::ByteString> = None;
170 let mut value_unverified_user_annotations: Option<std::collections::BTreeMap<std::string::String, std::string::String>> = None;
171
172 while let Some(key) = crate::serde::de::MapAccess::next_key::<Field>(&mut map)? {
173 match key {
174 Field::Key_max_expiration_seconds => value_max_expiration_seconds = crate::serde::de::MapAccess::next_value(&mut map)?,
175 Field::Key_node_name => value_node_name = crate::serde::de::MapAccess::next_value(&mut map)?,
176 Field::Key_node_uid => value_node_uid = crate::serde::de::MapAccess::next_value(&mut map)?,
177 Field::Key_pkix_public_key => value_pkix_public_key = crate::serde::de::MapAccess::next_value(&mut map)?,
178 Field::Key_pod_name => value_pod_name = crate::serde::de::MapAccess::next_value(&mut map)?,
179 Field::Key_pod_uid => value_pod_uid = crate::serde::de::MapAccess::next_value(&mut map)?,
180 Field::Key_proof_of_possession => value_proof_of_possession = crate::serde::de::MapAccess::next_value(&mut map)?,
181 Field::Key_service_account_name => value_service_account_name = crate::serde::de::MapAccess::next_value(&mut map)?,
182 Field::Key_service_account_uid => value_service_account_uid = crate::serde::de::MapAccess::next_value(&mut map)?,
183 Field::Key_signer_name => value_signer_name = crate::serde::de::MapAccess::next_value(&mut map)?,
184 Field::Key_stub_pkc_s10_request => value_stub_pkc_s10_request = crate::serde::de::MapAccess::next_value(&mut map)?,
185 Field::Key_unverified_user_annotations => value_unverified_user_annotations = crate::serde::de::MapAccess::next_value(&mut map)?,
186 Field::Other => { let _: crate::serde::de::IgnoredAny = crate::serde::de::MapAccess::next_value(&mut map)?; },
187 }
188 }
189
190 Ok(PodCertificateRequestSpec {
191 max_expiration_seconds: value_max_expiration_seconds,
192 node_name: value_node_name.unwrap_or_default(),
193 node_uid: value_node_uid.unwrap_or_default(),
194 pkix_public_key: value_pkix_public_key,
195 pod_name: value_pod_name.unwrap_or_default(),
196 pod_uid: value_pod_uid.unwrap_or_default(),
197 proof_of_possession: value_proof_of_possession,
198 service_account_name: value_service_account_name.unwrap_or_default(),
199 service_account_uid: value_service_account_uid.unwrap_or_default(),
200 signer_name: value_signer_name.unwrap_or_default(),
201 stub_pkc_s10_request: value_stub_pkc_s10_request.unwrap_or_default(),
202 unverified_user_annotations: value_unverified_user_annotations,
203 })
204 }
205 }
206
207 deserializer.deserialize_struct(
208 "PodCertificateRequestSpec",
209 &[
210 "maxExpirationSeconds",
211 "nodeName",
212 "nodeUID",
213 "pkixPublicKey",
214 "podName",
215 "podUID",
216 "proofOfPossession",
217 "serviceAccountName",
218 "serviceAccountUID",
219 "signerName",
220 "stubPKCS10Request",
221 "unverifiedUserAnnotations",
222 ],
223 Visitor,
224 )
225 }
226}
227
228impl crate::serde::Serialize for PodCertificateRequestSpec {
229 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where S: crate::serde::Serializer {
230 let mut state = serializer.serialize_struct(
231 "PodCertificateRequestSpec",
232 8 +
233 self.max_expiration_seconds.as_ref().map_or(0, |_| 1) +
234 self.pkix_public_key.as_ref().map_or(0, |_| 1) +
235 self.proof_of_possession.as_ref().map_or(0, |_| 1) +
236 self.unverified_user_annotations.as_ref().map_or(0, |_| 1),
237 )?;
238 if let Some(value) = &self.max_expiration_seconds {
239 crate::serde::ser::SerializeStruct::serialize_field(&mut state, "maxExpirationSeconds", value)?;
240 }
241 crate::serde::ser::SerializeStruct::serialize_field(&mut state, "nodeName", &self.node_name)?;
242 crate::serde::ser::SerializeStruct::serialize_field(&mut state, "nodeUID", &self.node_uid)?;
243 if let Some(value) = &self.pkix_public_key {
244 crate::serde::ser::SerializeStruct::serialize_field(&mut state, "pkixPublicKey", value)?;
245 }
246 crate::serde::ser::SerializeStruct::serialize_field(&mut state, "podName", &self.pod_name)?;
247 crate::serde::ser::SerializeStruct::serialize_field(&mut state, "podUID", &self.pod_uid)?;
248 if let Some(value) = &self.proof_of_possession {
249 crate::serde::ser::SerializeStruct::serialize_field(&mut state, "proofOfPossession", value)?;
250 }
251 crate::serde::ser::SerializeStruct::serialize_field(&mut state, "serviceAccountName", &self.service_account_name)?;
252 crate::serde::ser::SerializeStruct::serialize_field(&mut state, "serviceAccountUID", &self.service_account_uid)?;
253 crate::serde::ser::SerializeStruct::serialize_field(&mut state, "signerName", &self.signer_name)?;
254 crate::serde::ser::SerializeStruct::serialize_field(&mut state, "stubPKCS10Request", &self.stub_pkc_s10_request)?;
255 if let Some(value) = &self.unverified_user_annotations {
256 crate::serde::ser::SerializeStruct::serialize_field(&mut state, "unverifiedUserAnnotations", value)?;
257 }
258 crate::serde::ser::SerializeStruct::end(state)
259 }
260}
261
262#[cfg(feature = "schemars")]
263impl crate::schemars::JsonSchema for PodCertificateRequestSpec {
264 fn schema_name() -> std::borrow::Cow<'static, str> {
265 "io.k8s.api.certificates.v1beta1.PodCertificateRequestSpec".into()
266 }
267
268 fn json_schema(__gen: &mut crate::schemars::SchemaGenerator) -> crate::schemars::Schema {
269 crate::schemars::json_schema!({
270 "description": "PodCertificateRequestSpec describes the certificate request. All fields are immutable after creation.",
271 "type": "object",
272 "properties": {
273 "maxExpirationSeconds": {
274 "description": "maxExpirationSeconds is the maximum lifetime permitted for the certificate.\n\nIf omitted, kube-apiserver will set it to 86400(24 hours). kube-apiserver will reject values shorter than 3600 (1 hour). The maximum allowable value is 7862400 (91 days).\n\nThe signer implementation is then free to issue a certificate with any lifetime *shorter* than MaxExpirationSeconds, but no shorter than 3600 seconds (1 hour). This constraint is enforced by kube-apiserver. `kubernetes.io` signers will never issue certificates with a lifetime longer than 24 hours.",
275 "type": "integer",
276 "format": "int32",
277 },
278 "nodeName": {
279 "description": "nodeName is the name of the node the pod is assigned to.",
280 "type": "string",
281 },
282 "nodeUID": {
283 "description": "nodeUID is the UID of the node the pod is assigned to.",
284 "type": "string",
285 },
286 "pkixPublicKey": {
287 "description": "The PKIX-serialized public key the signer will issue the certificate to.\n\nThe key must be one of RSA3072, RSA4096, ECDSAP256, ECDSAP384, ECDSAP521, or ED25519. Note that this list may be expanded in the future.\n\nSigner implementations do not need to support all key types supported by kube-apiserver and kubelet. If a signer does not support the key type used for a given PodCertificateRequest, it must deny the request by setting a status.conditions entry with a type of \"Denied\" and a reason of \"UnsupportedKeyType\". It may also suggest a key type that it does support in the message field.\n\nDeprecated: This field is replaced by StubPKCS10Request. If StubPKCS10Request is set, this field must be empty. Signer implementations should extract the public key from the StubPKCS10Request field.",
288 "type": "string",
289 "format": "byte",
290 },
291 "podName": {
292 "description": "podName is the name of the pod into which the certificate will be mounted.",
293 "type": "string",
294 },
295 "podUID": {
296 "description": "podUID is the UID of the pod into which the certificate will be mounted.",
297 "type": "string",
298 },
299 "proofOfPossession": {
300 "description": "A proof that the requesting kubelet holds the private key corresponding to pkixPublicKey.\n\nIt is contructed by signing the ASCII bytes of the pod's UID using `pkixPublicKey`.\n\nkube-apiserver validates the proof of possession during creation of the PodCertificateRequest.\n\nIf the key is an RSA key, then the signature is over the ASCII bytes of the pod UID, using RSASSA-PSS from RFC 8017 (as implemented by the golang function crypto/rsa.SignPSS with nil options).\n\nIf the key is an ECDSA key, then the signature is as described by [SEC 1, Version 2.0](https://www.secg.org/sec1-v2.pdf) (as implemented by the golang library function crypto/ecdsa.SignASN1)\n\nIf the key is an ED25519 key, the the signature is as described by the [ED25519 Specification](https://ed25519.cr.yp.to/) (as implemented by the golang library crypto/ed25519.Sign).\n\nDeprecated: This field is replaced by StubPKCS10Request. If StubPKCS10Request is set, this field must be empty.",
301 "type": "string",
302 "format": "byte",
303 },
304 "serviceAccountName": {
305 "description": "serviceAccountName is the name of the service account the pod is running as.",
306 "type": "string",
307 },
308 "serviceAccountUID": {
309 "description": "serviceAccountUID is the UID of the service account the pod is running as.",
310 "type": "string",
311 },
312 "signerName": {
313 "description": "signerName indicates the requested signer.\n\nAll signer names beginning with `kubernetes.io` are reserved for use by the Kubernetes project. There is currently one well-known signer documented by the Kubernetes project, `kubernetes.io/kube-apiserver-client-pod`, which will issue client certificates understood by kube-apiserver. It is currently unimplemented.",
314 "type": "string",
315 },
316 "stubPKCS10Request": {
317 "description": "A PKCS#10 certificate signing request (DER-serialized) generated by Kubelet using the subject private key.\n\nMost signer implementations will ignore the contents of the CSR except to extract the subject public key. The API server automatically verifies the CSR signature during admission, so the signer does not need to repeat the verification. CSRs generated by kubelet are completely empty.\n\nThe subject public key must be one of RSA3072, RSA4096, ECDSAP256, ECDSAP384, ECDSAP521, or ED25519. Note that this list may be expanded in the future.\n\nSigner implementations do not need to support all key types supported by kube-apiserver and kubelet. If a signer does not support the key type used for a given PodCertificateRequest, it must deny the request by setting a status.conditions entry with a type of \"Denied\" and a reason of \"UnsupportedKeyType\". It may also suggest a key type that it does support in the message field.",
318 "type": "string",
319 "format": "byte",
320 },
321 "unverifiedUserAnnotations": {
322 "description": "unverifiedUserAnnotations allow pod authors to pass additional information to the signer implementation. Kubernetes does not restrict or validate this metadata in any way.\n\nEntries are subject to the same validation as object metadata annotations, with the addition that all keys must be domain-prefixed. No restrictions are placed on values, except an overall size limitation on the entire field.\n\nSigners should document the keys and values they support. Signers should deny requests that contain keys they do not recognize.",
323 "type": "object",
324 "additionalProperties": {
325 "type": "string",
326 },
327 },
328 },
329 "required": [
330 "nodeName",
331 "nodeUID",
332 "podName",
333 "podUID",
334 "serviceAccountName",
335 "serviceAccountUID",
336 "signerName",
337 "stubPKCS10Request",
338 ],
339 })
340 }
341}
342
343#[cfg(feature = "schemars08")]
344impl crate::schemars08::JsonSchema for PodCertificateRequestSpec {
345 fn schema_name() -> std::string::String {
346 "io.k8s.api.certificates.v1beta1.PodCertificateRequestSpec".into()
347 }
348
349 fn json_schema(__gen: &mut crate::schemars08::gen::SchemaGenerator) -> crate::schemars08::schema::Schema {
350 crate::schemars08::schema::Schema::Object(crate::schemars08::schema::SchemaObject {
351 metadata: Some(std::boxed::Box::new(crate::schemars08::schema::Metadata {
352 description: Some("PodCertificateRequestSpec describes the certificate request. All fields are immutable after creation.".into()),
353 ..Default::default()
354 })),
355 instance_type: Some(crate::schemars08::schema::SingleOrVec::Single(std::boxed::Box::new(crate::schemars08::schema::InstanceType::Object))),
356 object: Some(std::boxed::Box::new(crate::schemars08::schema::ObjectValidation {
357 properties: [
358 (
359 "maxExpirationSeconds".into(),
360 crate::schemars08::schema::Schema::Object(crate::schemars08::schema::SchemaObject {
361 metadata: Some(std::boxed::Box::new(crate::schemars08::schema::Metadata {
362 description: Some("maxExpirationSeconds is the maximum lifetime permitted for the certificate.\n\nIf omitted, kube-apiserver will set it to 86400(24 hours). kube-apiserver will reject values shorter than 3600 (1 hour). The maximum allowable value is 7862400 (91 days).\n\nThe signer implementation is then free to issue a certificate with any lifetime *shorter* than MaxExpirationSeconds, but no shorter than 3600 seconds (1 hour). This constraint is enforced by kube-apiserver. `kubernetes.io` signers will never issue certificates with a lifetime longer than 24 hours.".into()),
363 ..Default::default()
364 })),
365 instance_type: Some(crate::schemars08::schema::SingleOrVec::Single(std::boxed::Box::new(crate::schemars08::schema::InstanceType::Integer))),
366 format: Some("int32".into()),
367 ..Default::default()
368 }),
369 ),
370 (
371 "nodeName".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("nodeName is the name of the node the pod is assigned to.".into()),
375 ..Default::default()
376 })),
377 instance_type: Some(crate::schemars08::schema::SingleOrVec::Single(std::boxed::Box::new(crate::schemars08::schema::InstanceType::String))),
378 ..Default::default()
379 }),
380 ),
381 (
382 "nodeUID".into(),
383 crate::schemars08::schema::Schema::Object(crate::schemars08::schema::SchemaObject {
384 metadata: Some(std::boxed::Box::new(crate::schemars08::schema::Metadata {
385 description: Some("nodeUID is the UID of the node the pod is assigned to.".into()),
386 ..Default::default()
387 })),
388 instance_type: Some(crate::schemars08::schema::SingleOrVec::Single(std::boxed::Box::new(crate::schemars08::schema::InstanceType::String))),
389 ..Default::default()
390 }),
391 ),
392 (
393 "pkixPublicKey".into(),
394 crate::schemars08::schema::Schema::Object(crate::schemars08::schema::SchemaObject {
395 metadata: Some(std::boxed::Box::new(crate::schemars08::schema::Metadata {
396 description: Some("The PKIX-serialized public key the signer will issue the certificate to.\n\nThe key must be one of RSA3072, RSA4096, ECDSAP256, ECDSAP384, ECDSAP521, or ED25519. Note that this list may be expanded in the future.\n\nSigner implementations do not need to support all key types supported by kube-apiserver and kubelet. If a signer does not support the key type used for a given PodCertificateRequest, it must deny the request by setting a status.conditions entry with a type of \"Denied\" and a reason of \"UnsupportedKeyType\". It may also suggest a key type that it does support in the message field.\n\nDeprecated: This field is replaced by StubPKCS10Request. If StubPKCS10Request is set, this field must be empty. Signer implementations should extract the public key from the StubPKCS10Request field.".into()),
397 ..Default::default()
398 })),
399 instance_type: Some(crate::schemars08::schema::SingleOrVec::Single(std::boxed::Box::new(crate::schemars08::schema::InstanceType::String))),
400 format: Some("byte".into()),
401 ..Default::default()
402 }),
403 ),
404 (
405 "podName".into(),
406 crate::schemars08::schema::Schema::Object(crate::schemars08::schema::SchemaObject {
407 metadata: Some(std::boxed::Box::new(crate::schemars08::schema::Metadata {
408 description: Some("podName is the name of the pod into which the certificate will be mounted.".into()),
409 ..Default::default()
410 })),
411 instance_type: Some(crate::schemars08::schema::SingleOrVec::Single(std::boxed::Box::new(crate::schemars08::schema::InstanceType::String))),
412 ..Default::default()
413 }),
414 ),
415 (
416 "podUID".into(),
417 crate::schemars08::schema::Schema::Object(crate::schemars08::schema::SchemaObject {
418 metadata: Some(std::boxed::Box::new(crate::schemars08::schema::Metadata {
419 description: Some("podUID is the UID of the pod into which the certificate will be mounted.".into()),
420 ..Default::default()
421 })),
422 instance_type: Some(crate::schemars08::schema::SingleOrVec::Single(std::boxed::Box::new(crate::schemars08::schema::InstanceType::String))),
423 ..Default::default()
424 }),
425 ),
426 (
427 "proofOfPossession".into(),
428 crate::schemars08::schema::Schema::Object(crate::schemars08::schema::SchemaObject {
429 metadata: Some(std::boxed::Box::new(crate::schemars08::schema::Metadata {
430 description: Some("A proof that the requesting kubelet holds the private key corresponding to pkixPublicKey.\n\nIt is contructed by signing the ASCII bytes of the pod's UID using `pkixPublicKey`.\n\nkube-apiserver validates the proof of possession during creation of the PodCertificateRequest.\n\nIf the key is an RSA key, then the signature is over the ASCII bytes of the pod UID, using RSASSA-PSS from RFC 8017 (as implemented by the golang function crypto/rsa.SignPSS with nil options).\n\nIf the key is an ECDSA key, then the signature is as described by [SEC 1, Version 2.0](https://www.secg.org/sec1-v2.pdf) (as implemented by the golang library function crypto/ecdsa.SignASN1)\n\nIf the key is an ED25519 key, the the signature is as described by the [ED25519 Specification](https://ed25519.cr.yp.to/) (as implemented by the golang library crypto/ed25519.Sign).\n\nDeprecated: This field is replaced by StubPKCS10Request. If StubPKCS10Request is set, this field must be empty.".into()),
431 ..Default::default()
432 })),
433 instance_type: Some(crate::schemars08::schema::SingleOrVec::Single(std::boxed::Box::new(crate::schemars08::schema::InstanceType::String))),
434 format: Some("byte".into()),
435 ..Default::default()
436 }),
437 ),
438 (
439 "serviceAccountName".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("serviceAccountName is the name of the service account the pod is running as.".into()),
443 ..Default::default()
444 })),
445 instance_type: Some(crate::schemars08::schema::SingleOrVec::Single(std::boxed::Box::new(crate::schemars08::schema::InstanceType::String))),
446 ..Default::default()
447 }),
448 ),
449 (
450 "serviceAccountUID".into(),
451 crate::schemars08::schema::Schema::Object(crate::schemars08::schema::SchemaObject {
452 metadata: Some(std::boxed::Box::new(crate::schemars08::schema::Metadata {
453 description: Some("serviceAccountUID is the UID of the service account the pod is running as.".into()),
454 ..Default::default()
455 })),
456 instance_type: Some(crate::schemars08::schema::SingleOrVec::Single(std::boxed::Box::new(crate::schemars08::schema::InstanceType::String))),
457 ..Default::default()
458 }),
459 ),
460 (
461 "signerName".into(),
462 crate::schemars08::schema::Schema::Object(crate::schemars08::schema::SchemaObject {
463 metadata: Some(std::boxed::Box::new(crate::schemars08::schema::Metadata {
464 description: Some("signerName indicates the requested signer.\n\nAll signer names beginning with `kubernetes.io` are reserved for use by the Kubernetes project. There is currently one well-known signer documented by the Kubernetes project, `kubernetes.io/kube-apiserver-client-pod`, which will issue client certificates understood by kube-apiserver. It is currently unimplemented.".into()),
465 ..Default::default()
466 })),
467 instance_type: Some(crate::schemars08::schema::SingleOrVec::Single(std::boxed::Box::new(crate::schemars08::schema::InstanceType::String))),
468 ..Default::default()
469 }),
470 ),
471 (
472 "stubPKCS10Request".into(),
473 crate::schemars08::schema::Schema::Object(crate::schemars08::schema::SchemaObject {
474 metadata: Some(std::boxed::Box::new(crate::schemars08::schema::Metadata {
475 description: Some("A PKCS#10 certificate signing request (DER-serialized) generated by Kubelet using the subject private key.\n\nMost signer implementations will ignore the contents of the CSR except to extract the subject public key. The API server automatically verifies the CSR signature during admission, so the signer does not need to repeat the verification. CSRs generated by kubelet are completely empty.\n\nThe subject public key must be one of RSA3072, RSA4096, ECDSAP256, ECDSAP384, ECDSAP521, or ED25519. Note that this list may be expanded in the future.\n\nSigner implementations do not need to support all key types supported by kube-apiserver and kubelet. If a signer does not support the key type used for a given PodCertificateRequest, it must deny the request by setting a status.conditions entry with a type of \"Denied\" and a reason of \"UnsupportedKeyType\". It may also suggest a key type that it does support in the message field.".into()),
476 ..Default::default()
477 })),
478 instance_type: Some(crate::schemars08::schema::SingleOrVec::Single(std::boxed::Box::new(crate::schemars08::schema::InstanceType::String))),
479 format: Some("byte".into()),
480 ..Default::default()
481 }),
482 ),
483 (
484 "unverifiedUserAnnotations".into(),
485 crate::schemars08::schema::Schema::Object(crate::schemars08::schema::SchemaObject {
486 metadata: Some(std::boxed::Box::new(crate::schemars08::schema::Metadata {
487 description: Some("unverifiedUserAnnotations allow pod authors to pass additional information to the signer implementation. Kubernetes does not restrict or validate this metadata in any way.\n\nEntries are subject to the same validation as object metadata annotations, with the addition that all keys must be domain-prefixed. No restrictions are placed on values, except an overall size limitation on the entire field.\n\nSigners should document the keys and values they support. Signers should deny requests that contain keys they do not recognize.".into()),
488 ..Default::default()
489 })),
490 instance_type: Some(crate::schemars08::schema::SingleOrVec::Single(std::boxed::Box::new(crate::schemars08::schema::InstanceType::Object))),
491 object: Some(std::boxed::Box::new(crate::schemars08::schema::ObjectValidation {
492 additional_properties: Some(std::boxed::Box::new(
493 crate::schemars08::schema::Schema::Object(crate::schemars08::schema::SchemaObject {
494 instance_type: Some(crate::schemars08::schema::SingleOrVec::Single(std::boxed::Box::new(crate::schemars08::schema::InstanceType::String))),
495 ..Default::default()
496 })
497 )),
498 ..Default::default()
499 })),
500 ..Default::default()
501 }),
502 ),
503 ].into(),
504 required: [
505 "nodeName".into(),
506 "nodeUID".into(),
507 "podName".into(),
508 "podUID".into(),
509 "serviceAccountName".into(),
510 "serviceAccountUID".into(),
511 "signerName".into(),
512 "stubPKCS10Request".into(),
513 ].into(),
514 ..Default::default()
515 })),
516 ..Default::default()
517 })
518 }
519}