k8s_crds_cert_manager/acme/
challenges.rs

1// WARNING: generated by kopium - manual changes will be overwritten
2// kopium command: kopium -f challenges.yml --schema=derived --docs -b --derive=Default --derive=PartialEq --smart-derive-elision
3// kopium version: 0.21.2
4
5#[allow(unused_imports)]
6mod prelude {
7    pub use k8s_openapi::apimachinery::pkg::util::intstr::IntOrString;
8    pub use kube_derive::CustomResource;
9    #[cfg(feature = "schemars")]
10    pub use schemars::JsonSchema;
11    pub use serde::{Deserialize, Serialize};
12    pub use std::collections::BTreeMap;
13    #[cfg(feature = "builder")]
14    pub use typed_builder::TypedBuilder;
15}
16use self::prelude::*;
17
18#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, PartialEq)]
19#[cfg_attr(feature = "builder", derive(TypedBuilder))]
20#[cfg_attr(feature = "schemars", derive(JsonSchema))]
21#[cfg_attr(not(feature = "schemars"), kube(schema = "disabled"))]
22#[kube(
23    group = "acme.cert-manager.io",
24    version = "v1",
25    kind = "Challenge",
26    plural = "challenges"
27)]
28#[kube(namespaced)]
29#[kube(status = "ChallengeStatus")]
30#[kube(derive = "PartialEq")]
31pub struct ChallengeSpec {
32    /// The URL to the ACME Authorization resource that this
33    /// challenge is a part of.
34    #[serde(rename = "authorizationURL")]
35    pub authorization_url: String,
36    /// dnsName is the identifier that this challenge is for, e.g., example.com.
37    /// If the requested DNSName is a 'wildcard', this field MUST be set to the
38    /// non-wildcard domain, e.g., for `*.example.com`, it must be `example.com`.
39    #[serde(rename = "dnsName")]
40    pub dns_name: String,
41    /// References a properly configured ACME-type Issuer which should
42    /// be used to create this Challenge.
43    /// If the Issuer does not exist, processing will be retried.
44    /// If the Issuer is not an 'ACME' Issuer, an error will be returned and the
45    /// Challenge will be marked as failed.
46    #[serde(rename = "issuerRef")]
47    pub issuer_ref: ChallengeIssuerRef,
48    /// The ACME challenge key for this challenge
49    /// For HTTP01 challenges, this is the value that must be responded with to
50    /// complete the HTTP01 challenge in the format:
51    /// `<private key JWK thumbprint>.<key from acme server for challenge>`.
52    /// For DNS01 challenges, this is the base64 encoded SHA256 sum of the
53    /// `<private key JWK thumbprint>.<key from acme server for challenge>`
54    /// text that must be set as the TXT record content.
55    pub key: String,
56    /// Contains the domain solving configuration that should be used to
57    /// solve this challenge resource.
58    pub solver: ChallengeSolver,
59    /// The ACME challenge token for this challenge.
60    /// This is the raw value returned from the ACME server.
61    pub token: String,
62    /// The type of ACME challenge this resource represents.
63    /// One of "HTTP-01" or "DNS-01".
64    #[serde(rename = "type")]
65    pub r#type: ChallengeType,
66    /// The URL of the ACME Challenge resource for this challenge.
67    /// This can be used to lookup details about the status of this challenge.
68    pub url: String,
69    /// wildcard will be true if this challenge is for a wildcard identifier,
70    /// for example '*.example.com'.
71    #[serde(default, skip_serializing_if = "Option::is_none")]
72    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
73    pub wildcard: Option<bool>,
74}
75
76/// References a properly configured ACME-type Issuer which should
77/// be used to create this Challenge.
78/// If the Issuer does not exist, processing will be retried.
79/// If the Issuer is not an 'ACME' Issuer, an error will be returned and the
80/// Challenge will be marked as failed.
81#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
82#[cfg_attr(feature = "builder", derive(TypedBuilder))]
83#[cfg_attr(feature = "schemars", derive(JsonSchema))]
84pub struct ChallengeIssuerRef {
85    /// Group of the issuer being referred to.
86    /// Defaults to 'cert-manager.io'.
87    #[serde(default, skip_serializing_if = "Option::is_none")]
88    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
89    pub group: Option<String>,
90    /// Kind of the issuer being referred to.
91    /// Defaults to 'Issuer'.
92    #[serde(default, skip_serializing_if = "Option::is_none")]
93    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
94    pub kind: Option<String>,
95    /// Name of the issuer being referred to.
96    pub name: String,
97}
98
99/// Contains the domain solving configuration that should be used to
100/// solve this challenge resource.
101#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
102#[cfg_attr(feature = "builder", derive(TypedBuilder))]
103#[cfg_attr(feature = "schemars", derive(JsonSchema))]
104pub struct ChallengeSolver {
105    /// Configures cert-manager to attempt to complete authorizations by
106    /// performing the DNS01 challenge flow.
107    #[serde(default, skip_serializing_if = "Option::is_none")]
108    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
109    pub dns01: Option<ChallengeSolverDns01>,
110    /// Configures cert-manager to attempt to complete authorizations by
111    /// performing the HTTP01 challenge flow.
112    /// It is not possible to obtain certificates for wildcard domain names
113    /// (e.g., `*.example.com`) using the HTTP01 challenge mechanism.
114    #[serde(default, skip_serializing_if = "Option::is_none")]
115    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
116    pub http01: Option<ChallengeSolverHttp01>,
117    /// Selector selects a set of DNSNames on the Certificate resource that
118    /// should be solved using this challenge solver.
119    /// If not specified, the solver will be treated as the 'default' solver
120    /// with the lowest priority, i.e. if any other solver has a more specific
121    /// match, it will be used instead.
122    #[serde(default, skip_serializing_if = "Option::is_none")]
123    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
124    pub selector: Option<ChallengeSolverSelector>,
125}
126
127/// Configures cert-manager to attempt to complete authorizations by
128/// performing the DNS01 challenge flow.
129#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
130#[cfg_attr(feature = "builder", derive(TypedBuilder))]
131#[cfg_attr(feature = "schemars", derive(JsonSchema))]
132pub struct ChallengeSolverDns01 {
133    /// Use the 'ACME DNS' (https://github.com/joohoi/acme-dns) API to manage
134    /// DNS01 challenge records.
135    #[serde(default, skip_serializing_if = "Option::is_none", rename = "acmeDNS")]
136    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
137    pub acme_dns: Option<ChallengeSolverDns01AcmeDns>,
138    /// Use the Akamai DNS zone management API to manage DNS01 challenge records.
139    #[serde(default, skip_serializing_if = "Option::is_none")]
140    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
141    pub akamai: Option<ChallengeSolverDns01Akamai>,
142    /// Use the Microsoft Azure DNS API to manage DNS01 challenge records.
143    #[serde(default, skip_serializing_if = "Option::is_none", rename = "azureDNS")]
144    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
145    pub azure_dns: Option<ChallengeSolverDns01AzureDns>,
146    /// Use the Google Cloud DNS API to manage DNS01 challenge records.
147    #[serde(default, skip_serializing_if = "Option::is_none", rename = "cloudDNS")]
148    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
149    pub cloud_dns: Option<ChallengeSolverDns01CloudDns>,
150    /// Use the Cloudflare API to manage DNS01 challenge records.
151    #[serde(default, skip_serializing_if = "Option::is_none")]
152    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
153    pub cloudflare: Option<ChallengeSolverDns01Cloudflare>,
154    /// CNAMEStrategy configures how the DNS01 provider should handle CNAME
155    /// records when found in DNS zones.
156    #[serde(
157        default,
158        skip_serializing_if = "Option::is_none",
159        rename = "cnameStrategy"
160    )]
161    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
162    pub cname_strategy: Option<ChallengeSolverDns01CnameStrategy>,
163    /// Use the DigitalOcean DNS API to manage DNS01 challenge records.
164    #[serde(default, skip_serializing_if = "Option::is_none")]
165    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
166    pub digitalocean: Option<ChallengeSolverDns01Digitalocean>,
167    /// Use RFC2136 ("Dynamic Updates in the Domain Name System") (https://datatracker.ietf.org/doc/rfc2136/)
168    /// to manage DNS01 challenge records.
169    #[serde(default, skip_serializing_if = "Option::is_none")]
170    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
171    pub rfc2136: Option<ChallengeSolverDns01Rfc2136>,
172    /// Use the AWS Route53 API to manage DNS01 challenge records.
173    #[serde(default, skip_serializing_if = "Option::is_none")]
174    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
175    pub route53: Option<ChallengeSolverDns01Route53>,
176    /// Configure an external webhook based DNS01 challenge solver to manage
177    /// DNS01 challenge records.
178    #[serde(default, skip_serializing_if = "Option::is_none")]
179    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
180    pub webhook: Option<ChallengeSolverDns01Webhook>,
181}
182
183/// Use the 'ACME DNS' (https://github.com/joohoi/acme-dns) API to manage
184/// DNS01 challenge records.
185#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
186#[cfg_attr(feature = "builder", derive(TypedBuilder))]
187#[cfg_attr(feature = "schemars", derive(JsonSchema))]
188pub struct ChallengeSolverDns01AcmeDns {
189    /// A reference to a specific 'key' within a Secret resource.
190    /// In some instances, `key` is a required field.
191    #[serde(rename = "accountSecretRef")]
192    pub account_secret_ref: ChallengeSolverDns01AcmeDnsAccountSecretRef,
193    pub host: String,
194}
195
196/// A reference to a specific 'key' within a Secret resource.
197/// In some instances, `key` is a required field.
198#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
199#[cfg_attr(feature = "builder", derive(TypedBuilder))]
200#[cfg_attr(feature = "schemars", derive(JsonSchema))]
201pub struct ChallengeSolverDns01AcmeDnsAccountSecretRef {
202    /// The key of the entry in the Secret resource's `data` field to be used.
203    /// Some instances of this field may be defaulted, in others it may be
204    /// required.
205    #[serde(default, skip_serializing_if = "Option::is_none")]
206    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
207    pub key: Option<String>,
208    /// Name of the resource being referred to.
209    /// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
210    pub name: String,
211}
212
213/// Use the Akamai DNS zone management API to manage DNS01 challenge records.
214#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
215#[cfg_attr(feature = "builder", derive(TypedBuilder))]
216#[cfg_attr(feature = "schemars", derive(JsonSchema))]
217pub struct ChallengeSolverDns01Akamai {
218    /// A reference to a specific 'key' within a Secret resource.
219    /// In some instances, `key` is a required field.
220    #[serde(rename = "accessTokenSecretRef")]
221    pub access_token_secret_ref: ChallengeSolverDns01AkamaiAccessTokenSecretRef,
222    /// A reference to a specific 'key' within a Secret resource.
223    /// In some instances, `key` is a required field.
224    #[serde(rename = "clientSecretSecretRef")]
225    pub client_secret_secret_ref: ChallengeSolverDns01AkamaiClientSecretSecretRef,
226    /// A reference to a specific 'key' within a Secret resource.
227    /// In some instances, `key` is a required field.
228    #[serde(rename = "clientTokenSecretRef")]
229    pub client_token_secret_ref: ChallengeSolverDns01AkamaiClientTokenSecretRef,
230    #[serde(rename = "serviceConsumerDomain")]
231    pub service_consumer_domain: String,
232}
233
234/// A reference to a specific 'key' within a Secret resource.
235/// In some instances, `key` is a required field.
236#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
237#[cfg_attr(feature = "builder", derive(TypedBuilder))]
238#[cfg_attr(feature = "schemars", derive(JsonSchema))]
239pub struct ChallengeSolverDns01AkamaiAccessTokenSecretRef {
240    /// The key of the entry in the Secret resource's `data` field to be used.
241    /// Some instances of this field may be defaulted, in others it may be
242    /// required.
243    #[serde(default, skip_serializing_if = "Option::is_none")]
244    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
245    pub key: Option<String>,
246    /// Name of the resource being referred to.
247    /// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
248    pub name: String,
249}
250
251/// A reference to a specific 'key' within a Secret resource.
252/// In some instances, `key` is a required field.
253#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
254#[cfg_attr(feature = "builder", derive(TypedBuilder))]
255#[cfg_attr(feature = "schemars", derive(JsonSchema))]
256pub struct ChallengeSolverDns01AkamaiClientSecretSecretRef {
257    /// The key of the entry in the Secret resource's `data` field to be used.
258    /// Some instances of this field may be defaulted, in others it may be
259    /// required.
260    #[serde(default, skip_serializing_if = "Option::is_none")]
261    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
262    pub key: Option<String>,
263    /// Name of the resource being referred to.
264    /// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
265    pub name: String,
266}
267
268/// A reference to a specific 'key' within a Secret resource.
269/// In some instances, `key` is a required field.
270#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
271#[cfg_attr(feature = "builder", derive(TypedBuilder))]
272#[cfg_attr(feature = "schemars", derive(JsonSchema))]
273pub struct ChallengeSolverDns01AkamaiClientTokenSecretRef {
274    /// The key of the entry in the Secret resource's `data` field to be used.
275    /// Some instances of this field may be defaulted, in others it may be
276    /// required.
277    #[serde(default, skip_serializing_if = "Option::is_none")]
278    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
279    pub key: Option<String>,
280    /// Name of the resource being referred to.
281    /// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
282    pub name: String,
283}
284
285/// Use the Microsoft Azure DNS API to manage DNS01 challenge records.
286#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
287#[cfg_attr(feature = "builder", derive(TypedBuilder))]
288#[cfg_attr(feature = "schemars", derive(JsonSchema))]
289pub struct ChallengeSolverDns01AzureDns {
290    /// Auth: Azure Service Principal:
291    /// The ClientID of the Azure Service Principal used to authenticate with Azure DNS.
292    /// If set, ClientSecret and TenantID must also be set.
293    #[serde(default, skip_serializing_if = "Option::is_none", rename = "clientID")]
294    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
295    pub client_id: Option<String>,
296    /// Auth: Azure Service Principal:
297    /// A reference to a Secret containing the password associated with the Service Principal.
298    /// If set, ClientID and TenantID must also be set.
299    #[serde(
300        default,
301        skip_serializing_if = "Option::is_none",
302        rename = "clientSecretSecretRef"
303    )]
304    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
305    pub client_secret_secret_ref: Option<ChallengeSolverDns01AzureDnsClientSecretSecretRef>,
306    /// name of the Azure environment (default AzurePublicCloud)
307    #[serde(default, skip_serializing_if = "Option::is_none")]
308    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
309    pub environment: Option<ChallengeSolverDns01AzureDnsEnvironment>,
310    /// name of the DNS zone that should be used
311    #[serde(
312        default,
313        skip_serializing_if = "Option::is_none",
314        rename = "hostedZoneName"
315    )]
316    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
317    pub hosted_zone_name: Option<String>,
318    /// Auth: Azure Workload Identity or Azure Managed Service Identity:
319    /// Settings to enable Azure Workload Identity or Azure Managed Service Identity
320    /// If set, ClientID, ClientSecret and TenantID must not be set.
321    #[serde(
322        default,
323        skip_serializing_if = "Option::is_none",
324        rename = "managedIdentity"
325    )]
326    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
327    pub managed_identity: Option<ChallengeSolverDns01AzureDnsManagedIdentity>,
328    /// resource group the DNS zone is located in
329    #[serde(rename = "resourceGroupName")]
330    pub resource_group_name: String,
331    /// ID of the Azure subscription
332    #[serde(rename = "subscriptionID")]
333    pub subscription_id: String,
334    /// Auth: Azure Service Principal:
335    /// The TenantID of the Azure Service Principal used to authenticate with Azure DNS.
336    /// If set, ClientID and ClientSecret must also be set.
337    #[serde(default, skip_serializing_if = "Option::is_none", rename = "tenantID")]
338    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
339    pub tenant_id: Option<String>,
340}
341
342/// Auth: Azure Service Principal:
343/// A reference to a Secret containing the password associated with the Service Principal.
344/// If set, ClientID and TenantID must also be set.
345#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
346#[cfg_attr(feature = "builder", derive(TypedBuilder))]
347#[cfg_attr(feature = "schemars", derive(JsonSchema))]
348pub struct ChallengeSolverDns01AzureDnsClientSecretSecretRef {
349    /// The key of the entry in the Secret resource's `data` field to be used.
350    /// Some instances of this field may be defaulted, in others it may be
351    /// required.
352    #[serde(default, skip_serializing_if = "Option::is_none")]
353    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
354    pub key: Option<String>,
355    /// Name of the resource being referred to.
356    /// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
357    pub name: String,
358}
359
360/// Use the Microsoft Azure DNS API to manage DNS01 challenge records.
361#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
362#[cfg_attr(feature = "schemars", derive(JsonSchema))]
363pub enum ChallengeSolverDns01AzureDnsEnvironment {
364    AzurePublicCloud,
365    AzureChinaCloud,
366    AzureGermanCloud,
367    #[serde(rename = "AzureUSGovernmentCloud")]
368    AzureUsGovernmentCloud,
369}
370
371/// Auth: Azure Workload Identity or Azure Managed Service Identity:
372/// Settings to enable Azure Workload Identity or Azure Managed Service Identity
373/// If set, ClientID, ClientSecret and TenantID must not be set.
374#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
375#[cfg_attr(feature = "builder", derive(TypedBuilder))]
376#[cfg_attr(feature = "schemars", derive(JsonSchema))]
377pub struct ChallengeSolverDns01AzureDnsManagedIdentity {
378    /// client ID of the managed identity, cannot be used at the same time as resourceID
379    #[serde(default, skip_serializing_if = "Option::is_none", rename = "clientID")]
380    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
381    pub client_id: Option<String>,
382    /// resource ID of the managed identity, cannot be used at the same time as clientID
383    /// Cannot be used for Azure Managed Service Identity
384    #[serde(
385        default,
386        skip_serializing_if = "Option::is_none",
387        rename = "resourceID"
388    )]
389    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
390    pub resource_id: Option<String>,
391    /// tenant ID of the managed identity, cannot be used at the same time as resourceID
392    #[serde(default, skip_serializing_if = "Option::is_none", rename = "tenantID")]
393    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
394    pub tenant_id: Option<String>,
395}
396
397/// Use the Google Cloud DNS API to manage DNS01 challenge records.
398#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
399#[cfg_attr(feature = "builder", derive(TypedBuilder))]
400#[cfg_attr(feature = "schemars", derive(JsonSchema))]
401pub struct ChallengeSolverDns01CloudDns {
402    /// HostedZoneName is an optional field that tells cert-manager in which
403    /// Cloud DNS zone the challenge record has to be created.
404    /// If left empty cert-manager will automatically choose a zone.
405    #[serde(
406        default,
407        skip_serializing_if = "Option::is_none",
408        rename = "hostedZoneName"
409    )]
410    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
411    pub hosted_zone_name: Option<String>,
412    pub project: String,
413    /// A reference to a specific 'key' within a Secret resource.
414    /// In some instances, `key` is a required field.
415    #[serde(
416        default,
417        skip_serializing_if = "Option::is_none",
418        rename = "serviceAccountSecretRef"
419    )]
420    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
421    pub service_account_secret_ref: Option<ChallengeSolverDns01CloudDnsServiceAccountSecretRef>,
422}
423
424/// A reference to a specific 'key' within a Secret resource.
425/// In some instances, `key` is a required field.
426#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
427#[cfg_attr(feature = "builder", derive(TypedBuilder))]
428#[cfg_attr(feature = "schemars", derive(JsonSchema))]
429pub struct ChallengeSolverDns01CloudDnsServiceAccountSecretRef {
430    /// The key of the entry in the Secret resource's `data` field to be used.
431    /// Some instances of this field may be defaulted, in others it may be
432    /// required.
433    #[serde(default, skip_serializing_if = "Option::is_none")]
434    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
435    pub key: Option<String>,
436    /// Name of the resource being referred to.
437    /// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
438    pub name: String,
439}
440
441/// Use the Cloudflare API to manage DNS01 challenge records.
442#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
443#[cfg_attr(feature = "builder", derive(TypedBuilder))]
444#[cfg_attr(feature = "schemars", derive(JsonSchema))]
445pub struct ChallengeSolverDns01Cloudflare {
446    /// API key to use to authenticate with Cloudflare.
447    /// Note: using an API token to authenticate is now the recommended method
448    /// as it allows greater control of permissions.
449    #[serde(
450        default,
451        skip_serializing_if = "Option::is_none",
452        rename = "apiKeySecretRef"
453    )]
454    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
455    pub api_key_secret_ref: Option<ChallengeSolverDns01CloudflareApiKeySecretRef>,
456    /// API token used to authenticate with Cloudflare.
457    #[serde(
458        default,
459        skip_serializing_if = "Option::is_none",
460        rename = "apiTokenSecretRef"
461    )]
462    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
463    pub api_token_secret_ref: Option<ChallengeSolverDns01CloudflareApiTokenSecretRef>,
464    /// Email of the account, only required when using API key based authentication.
465    #[serde(default, skip_serializing_if = "Option::is_none")]
466    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
467    pub email: Option<String>,
468}
469
470/// API key to use to authenticate with Cloudflare.
471/// Note: using an API token to authenticate is now the recommended method
472/// as it allows greater control of permissions.
473#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
474#[cfg_attr(feature = "builder", derive(TypedBuilder))]
475#[cfg_attr(feature = "schemars", derive(JsonSchema))]
476pub struct ChallengeSolverDns01CloudflareApiKeySecretRef {
477    /// The key of the entry in the Secret resource's `data` field to be used.
478    /// Some instances of this field may be defaulted, in others it may be
479    /// required.
480    #[serde(default, skip_serializing_if = "Option::is_none")]
481    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
482    pub key: Option<String>,
483    /// Name of the resource being referred to.
484    /// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
485    pub name: String,
486}
487
488/// API token used to authenticate with Cloudflare.
489#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
490#[cfg_attr(feature = "builder", derive(TypedBuilder))]
491#[cfg_attr(feature = "schemars", derive(JsonSchema))]
492pub struct ChallengeSolverDns01CloudflareApiTokenSecretRef {
493    /// The key of the entry in the Secret resource's `data` field to be used.
494    /// Some instances of this field may be defaulted, in others it may be
495    /// required.
496    #[serde(default, skip_serializing_if = "Option::is_none")]
497    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
498    pub key: Option<String>,
499    /// Name of the resource being referred to.
500    /// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
501    pub name: String,
502}
503
504/// Configures cert-manager to attempt to complete authorizations by
505/// performing the DNS01 challenge flow.
506#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
507#[cfg_attr(feature = "schemars", derive(JsonSchema))]
508pub enum ChallengeSolverDns01CnameStrategy {
509    None,
510    Follow,
511}
512
513/// Use the DigitalOcean DNS API to manage DNS01 challenge records.
514#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
515#[cfg_attr(feature = "builder", derive(TypedBuilder))]
516#[cfg_attr(feature = "schemars", derive(JsonSchema))]
517pub struct ChallengeSolverDns01Digitalocean {
518    /// A reference to a specific 'key' within a Secret resource.
519    /// In some instances, `key` is a required field.
520    #[serde(rename = "tokenSecretRef")]
521    pub token_secret_ref: ChallengeSolverDns01DigitaloceanTokenSecretRef,
522}
523
524/// A reference to a specific 'key' within a Secret resource.
525/// In some instances, `key` is a required field.
526#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
527#[cfg_attr(feature = "builder", derive(TypedBuilder))]
528#[cfg_attr(feature = "schemars", derive(JsonSchema))]
529pub struct ChallengeSolverDns01DigitaloceanTokenSecretRef {
530    /// The key of the entry in the Secret resource's `data` field to be used.
531    /// Some instances of this field may be defaulted, in others it may be
532    /// required.
533    #[serde(default, skip_serializing_if = "Option::is_none")]
534    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
535    pub key: Option<String>,
536    /// Name of the resource being referred to.
537    /// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
538    pub name: String,
539}
540
541/// Use RFC2136 ("Dynamic Updates in the Domain Name System") (https://datatracker.ietf.org/doc/rfc2136/)
542/// to manage DNS01 challenge records.
543#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
544#[cfg_attr(feature = "builder", derive(TypedBuilder))]
545#[cfg_attr(feature = "schemars", derive(JsonSchema))]
546pub struct ChallengeSolverDns01Rfc2136 {
547    /// The IP address or hostname of an authoritative DNS server supporting
548    /// RFC2136 in the form host:port. If the host is an IPv6 address it must be
549    /// enclosed in square brackets (e.g [2001:db8::1]) ; port is optional.
550    /// This field is required.
551    pub nameserver: String,
552    /// Protocol to use for dynamic DNS update queries. Valid values are (case-sensitive) ``TCP`` and ``UDP``; ``UDP`` (default).
553    #[serde(default, skip_serializing_if = "Option::is_none")]
554    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
555    pub protocol: Option<ChallengeSolverDns01Rfc2136Protocol>,
556    /// The TSIG Algorithm configured in the DNS supporting RFC2136. Used only
557    /// when ``tsigSecretSecretRef`` and ``tsigKeyName`` are defined.
558    /// Supported values are (case-insensitive): ``HMACMD5`` (default),
559    /// ``HMACSHA1``, ``HMACSHA256`` or ``HMACSHA512``.
560    #[serde(
561        default,
562        skip_serializing_if = "Option::is_none",
563        rename = "tsigAlgorithm"
564    )]
565    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
566    pub tsig_algorithm: Option<String>,
567    /// The TSIG Key name configured in the DNS.
568    /// If ``tsigSecretSecretRef`` is defined, this field is required.
569    #[serde(
570        default,
571        skip_serializing_if = "Option::is_none",
572        rename = "tsigKeyName"
573    )]
574    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
575    pub tsig_key_name: Option<String>,
576    /// The name of the secret containing the TSIG value.
577    /// If ``tsigKeyName`` is defined, this field is required.
578    #[serde(
579        default,
580        skip_serializing_if = "Option::is_none",
581        rename = "tsigSecretSecretRef"
582    )]
583    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
584    pub tsig_secret_secret_ref: Option<ChallengeSolverDns01Rfc2136TsigSecretSecretRef>,
585}
586
587/// Use RFC2136 ("Dynamic Updates in the Domain Name System") (https://datatracker.ietf.org/doc/rfc2136/)
588/// to manage DNS01 challenge records.
589#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
590#[cfg_attr(feature = "schemars", derive(JsonSchema))]
591pub enum ChallengeSolverDns01Rfc2136Protocol {
592    #[serde(rename = "TCP")]
593    Tcp,
594    #[serde(rename = "UDP")]
595    Udp,
596}
597
598/// The name of the secret containing the TSIG value.
599/// If ``tsigKeyName`` is defined, this field is required.
600#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
601#[cfg_attr(feature = "builder", derive(TypedBuilder))]
602#[cfg_attr(feature = "schemars", derive(JsonSchema))]
603pub struct ChallengeSolverDns01Rfc2136TsigSecretSecretRef {
604    /// The key of the entry in the Secret resource's `data` field to be used.
605    /// Some instances of this field may be defaulted, in others it may be
606    /// required.
607    #[serde(default, skip_serializing_if = "Option::is_none")]
608    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
609    pub key: Option<String>,
610    /// Name of the resource being referred to.
611    /// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
612    pub name: String,
613}
614
615/// Use the AWS Route53 API to manage DNS01 challenge records.
616#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
617#[cfg_attr(feature = "builder", derive(TypedBuilder))]
618#[cfg_attr(feature = "schemars", derive(JsonSchema))]
619pub struct ChallengeSolverDns01Route53 {
620    /// The AccessKeyID is used for authentication.
621    /// Cannot be set when SecretAccessKeyID is set.
622    /// If neither the Access Key nor Key ID are set, we fall-back to using env
623    /// vars, shared credentials file or AWS Instance metadata,
624    /// see: https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#specifying-credentials
625    #[serde(
626        default,
627        skip_serializing_if = "Option::is_none",
628        rename = "accessKeyID"
629    )]
630    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
631    pub access_key_id: Option<String>,
632    /// The SecretAccessKey is used for authentication. If set, pull the AWS
633    /// access key ID from a key within a Kubernetes Secret.
634    /// Cannot be set when AccessKeyID is set.
635    /// If neither the Access Key nor Key ID are set, we fall-back to using env
636    /// vars, shared credentials file or AWS Instance metadata,
637    /// see: https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#specifying-credentials
638    #[serde(
639        default,
640        skip_serializing_if = "Option::is_none",
641        rename = "accessKeyIDSecretRef"
642    )]
643    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
644    pub access_key_id_secret_ref: Option<ChallengeSolverDns01Route53AccessKeyIdSecretRef>,
645    /// Auth configures how cert-manager authenticates.
646    #[serde(default, skip_serializing_if = "Option::is_none")]
647    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
648    pub auth: Option<ChallengeSolverDns01Route53Auth>,
649    /// If set, the provider will manage only this zone in Route53 and will not do a lookup using the route53:ListHostedZonesByName api call.
650    #[serde(
651        default,
652        skip_serializing_if = "Option::is_none",
653        rename = "hostedZoneID"
654    )]
655    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
656    pub hosted_zone_id: Option<String>,
657    /// Override the AWS region.
658    ///
659    /// Route53 is a global service and does not have regional endpoints but the
660    /// region specified here (or via environment variables) is used as a hint to
661    /// help compute the correct AWS credential scope and partition when it
662    /// connects to Route53. See:
663    /// - [Amazon Route 53 endpoints and quotas](https://docs.aws.amazon.com/general/latest/gr/r53.html)
664    /// - [Global services](https://docs.aws.amazon.com/whitepapers/latest/aws-fault-isolation-boundaries/global-services.html)
665    ///
666    /// If you omit this region field, cert-manager will use the region from
667    /// AWS_REGION and AWS_DEFAULT_REGION environment variables, if they are set
668    /// in the cert-manager controller Pod.
669    ///
670    /// The `region` field is not needed if you use [IAM Roles for Service Accounts (IRSA)](https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html).
671    /// Instead an AWS_REGION environment variable is added to the cert-manager controller Pod by:
672    /// [Amazon EKS Pod Identity Webhook](https://github.com/aws/amazon-eks-pod-identity-webhook).
673    /// In this case this `region` field value is ignored.
674    ///
675    /// The `region` field is not needed if you use [EKS Pod Identities](https://docs.aws.amazon.com/eks/latest/userguide/pod-identities.html).
676    /// Instead an AWS_REGION environment variable is added to the cert-manager controller Pod by:
677    /// [Amazon EKS Pod Identity Agent](https://github.com/aws/eks-pod-identity-agent),
678    /// In this case this `region` field value is ignored.
679    #[serde(default, skip_serializing_if = "Option::is_none")]
680    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
681    pub region: Option<String>,
682    /// Role is a Role ARN which the Route53 provider will assume using either the explicit credentials AccessKeyID/SecretAccessKey
683    /// or the inferred credentials from environment variables, shared credentials file or AWS Instance metadata
684    #[serde(default, skip_serializing_if = "Option::is_none")]
685    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
686    pub role: Option<String>,
687    /// The SecretAccessKey is used for authentication.
688    /// If neither the Access Key nor Key ID are set, we fall-back to using env
689    /// vars, shared credentials file or AWS Instance metadata,
690    /// see: https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#specifying-credentials
691    #[serde(
692        default,
693        skip_serializing_if = "Option::is_none",
694        rename = "secretAccessKeySecretRef"
695    )]
696    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
697    pub secret_access_key_secret_ref: Option<ChallengeSolverDns01Route53SecretAccessKeySecretRef>,
698}
699
700/// The SecretAccessKey is used for authentication. If set, pull the AWS
701/// access key ID from a key within a Kubernetes Secret.
702/// Cannot be set when AccessKeyID is set.
703/// If neither the Access Key nor Key ID are set, we fall-back to using env
704/// vars, shared credentials file or AWS Instance metadata,
705/// see: https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#specifying-credentials
706#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
707#[cfg_attr(feature = "builder", derive(TypedBuilder))]
708#[cfg_attr(feature = "schemars", derive(JsonSchema))]
709pub struct ChallengeSolverDns01Route53AccessKeyIdSecretRef {
710    /// The key of the entry in the Secret resource's `data` field to be used.
711    /// Some instances of this field may be defaulted, in others it may be
712    /// required.
713    #[serde(default, skip_serializing_if = "Option::is_none")]
714    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
715    pub key: Option<String>,
716    /// Name of the resource being referred to.
717    /// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
718    pub name: String,
719}
720
721/// Auth configures how cert-manager authenticates.
722#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
723#[cfg_attr(feature = "builder", derive(TypedBuilder))]
724#[cfg_attr(feature = "schemars", derive(JsonSchema))]
725pub struct ChallengeSolverDns01Route53Auth {
726    /// Kubernetes authenticates with Route53 using AssumeRoleWithWebIdentity
727    /// by passing a bound ServiceAccount token.
728    pub kubernetes: ChallengeSolverDns01Route53AuthKubernetes,
729}
730
731/// Kubernetes authenticates with Route53 using AssumeRoleWithWebIdentity
732/// by passing a bound ServiceAccount token.
733#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
734#[cfg_attr(feature = "builder", derive(TypedBuilder))]
735#[cfg_attr(feature = "schemars", derive(JsonSchema))]
736pub struct ChallengeSolverDns01Route53AuthKubernetes {
737    /// A reference to a service account that will be used to request a bound
738    /// token (also known as "projected token"). To use this field, you must
739    /// configure an RBAC rule to let cert-manager request a token.
740    #[serde(rename = "serviceAccountRef")]
741    pub service_account_ref: ChallengeSolverDns01Route53AuthKubernetesServiceAccountRef,
742}
743
744/// A reference to a service account that will be used to request a bound
745/// token (also known as "projected token"). To use this field, you must
746/// configure an RBAC rule to let cert-manager request a token.
747#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
748#[cfg_attr(feature = "builder", derive(TypedBuilder))]
749#[cfg_attr(feature = "schemars", derive(JsonSchema))]
750pub struct ChallengeSolverDns01Route53AuthKubernetesServiceAccountRef {
751    /// TokenAudiences is an optional list of audiences to include in the
752    /// token passed to AWS. The default token consisting of the issuer's namespace
753    /// and name is always included.
754    /// If unset the audience defaults to `sts.amazonaws.com`.
755    #[serde(default, skip_serializing_if = "Option::is_none")]
756    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
757    pub audiences: Option<Vec<String>>,
758    /// Name of the ServiceAccount used to request a token.
759    pub name: String,
760}
761
762/// The SecretAccessKey is used for authentication.
763/// If neither the Access Key nor Key ID are set, we fall-back to using env
764/// vars, shared credentials file or AWS Instance metadata,
765/// see: https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#specifying-credentials
766#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
767#[cfg_attr(feature = "builder", derive(TypedBuilder))]
768#[cfg_attr(feature = "schemars", derive(JsonSchema))]
769pub struct ChallengeSolverDns01Route53SecretAccessKeySecretRef {
770    /// The key of the entry in the Secret resource's `data` field to be used.
771    /// Some instances of this field may be defaulted, in others it may be
772    /// required.
773    #[serde(default, skip_serializing_if = "Option::is_none")]
774    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
775    pub key: Option<String>,
776    /// Name of the resource being referred to.
777    /// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
778    pub name: String,
779}
780
781/// Configure an external webhook based DNS01 challenge solver to manage
782/// DNS01 challenge records.
783#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
784#[cfg_attr(feature = "builder", derive(TypedBuilder))]
785#[cfg_attr(feature = "schemars", derive(JsonSchema))]
786pub struct ChallengeSolverDns01Webhook {
787    /// Additional configuration that should be passed to the webhook apiserver
788    /// when challenges are processed.
789    /// This can contain arbitrary JSON data.
790    /// Secret values should not be specified in this stanza.
791    /// If secret values are needed (e.g., credentials for a DNS service), you
792    /// should use a SecretKeySelector to reference a Secret resource.
793    /// For details on the schema of this field, consult the webhook provider
794    /// implementation's documentation.
795    #[serde(default, skip_serializing_if = "Option::is_none")]
796    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
797    pub config: Option<serde_json::Value>,
798    /// The API group name that should be used when POSTing ChallengePayload
799    /// resources to the webhook apiserver.
800    /// This should be the same as the GroupName specified in the webhook
801    /// provider implementation.
802    #[serde(rename = "groupName")]
803    pub group_name: String,
804    /// The name of the solver to use, as defined in the webhook provider
805    /// implementation.
806    /// This will typically be the name of the provider, e.g., 'cloudflare'.
807    #[serde(rename = "solverName")]
808    pub solver_name: String,
809}
810
811/// Configures cert-manager to attempt to complete authorizations by
812/// performing the HTTP01 challenge flow.
813/// It is not possible to obtain certificates for wildcard domain names
814/// (e.g., `*.example.com`) using the HTTP01 challenge mechanism.
815#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
816#[cfg_attr(feature = "builder", derive(TypedBuilder))]
817#[cfg_attr(feature = "schemars", derive(JsonSchema))]
818pub struct ChallengeSolverHttp01 {
819    /// The Gateway API is a sig-network community API that models service networking
820    /// in Kubernetes (https://gateway-api.sigs.k8s.io/). The Gateway solver will
821    /// create HTTPRoutes with the specified labels in the same namespace as the challenge.
822    /// This solver is experimental, and fields / behaviour may change in the future.
823    #[serde(
824        default,
825        skip_serializing_if = "Option::is_none",
826        rename = "gatewayHTTPRoute"
827    )]
828    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
829    pub gateway_http_route: Option<ChallengeSolverHttp01GatewayHttpRoute>,
830    /// The ingress based HTTP01 challenge solver will solve challenges by
831    /// creating or modifying Ingress resources in order to route requests for
832    /// '/.well-known/acme-challenge/XYZ' to 'challenge solver' pods that are
833    /// provisioned by cert-manager for each Challenge to be completed.
834    #[serde(default, skip_serializing_if = "Option::is_none")]
835    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
836    pub ingress: Option<ChallengeSolverHttp01Ingress>,
837}
838
839/// The Gateway API is a sig-network community API that models service networking
840/// in Kubernetes (https://gateway-api.sigs.k8s.io/). The Gateway solver will
841/// create HTTPRoutes with the specified labels in the same namespace as the challenge.
842/// This solver is experimental, and fields / behaviour may change in the future.
843#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
844#[cfg_attr(feature = "builder", derive(TypedBuilder))]
845#[cfg_attr(feature = "schemars", derive(JsonSchema))]
846pub struct ChallengeSolverHttp01GatewayHttpRoute {
847    /// Custom labels that will be applied to HTTPRoutes created by cert-manager
848    /// while solving HTTP-01 challenges.
849    #[serde(default, skip_serializing_if = "Option::is_none")]
850    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
851    pub labels: Option<BTreeMap<String, String>>,
852    /// When solving an HTTP-01 challenge, cert-manager creates an HTTPRoute.
853    /// cert-manager needs to know which parentRefs should be used when creating
854    /// the HTTPRoute. Usually, the parentRef references a Gateway. See:
855    /// https://gateway-api.sigs.k8s.io/api-types/httproute/#attaching-to-gateways
856    #[serde(
857        default,
858        skip_serializing_if = "Option::is_none",
859        rename = "parentRefs"
860    )]
861    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
862    pub parent_refs: Option<Vec<ChallengeSolverHttp01GatewayHttpRouteParentRefs>>,
863    /// Optional pod template used to configure the ACME challenge solver pods
864    /// used for HTTP01 challenges.
865    #[serde(
866        default,
867        skip_serializing_if = "Option::is_none",
868        rename = "podTemplate"
869    )]
870    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
871    pub pod_template: Option<ChallengeSolverHttp01GatewayHttpRoutePodTemplate>,
872    /// Optional service type for Kubernetes solver service. Supported values
873    /// are NodePort or ClusterIP. If unset, defaults to NodePort.
874    #[serde(
875        default,
876        skip_serializing_if = "Option::is_none",
877        rename = "serviceType"
878    )]
879    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
880    pub service_type: Option<String>,
881}
882
883/// ParentReference identifies an API object (usually a Gateway) that can be considered
884/// a parent of this resource (usually a route). There are two kinds of parent resources
885/// with "Core" support:
886///
887/// * Gateway (Gateway conformance profile)
888/// * Service (Mesh conformance profile, ClusterIP Services only)
889///
890/// This API may be extended in the future to support additional kinds of parent
891/// resources.
892///
893/// The API object must be valid in the cluster; the Group and Kind must
894/// be registered in the cluster for this reference to be valid.
895#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
896#[cfg_attr(feature = "builder", derive(TypedBuilder))]
897#[cfg_attr(feature = "schemars", derive(JsonSchema))]
898pub struct ChallengeSolverHttp01GatewayHttpRouteParentRefs {
899    /// Group is the group of the referent.
900    /// When unspecified, "gateway.networking.k8s.io" is inferred.
901    /// To set the core API group (such as for a "Service" kind referent),
902    /// Group must be explicitly set to "" (empty string).
903    ///
904    /// Support: Core
905    #[serde(default, skip_serializing_if = "Option::is_none")]
906    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
907    pub group: Option<String>,
908    /// Kind is kind of the referent.
909    ///
910    /// There are two kinds of parent resources with "Core" support:
911    ///
912    /// * Gateway (Gateway conformance profile)
913    /// * Service (Mesh conformance profile, ClusterIP Services only)
914    ///
915    /// Support for other resources is Implementation-Specific.
916    #[serde(default, skip_serializing_if = "Option::is_none")]
917    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
918    pub kind: Option<String>,
919    /// Name is the name of the referent.
920    ///
921    /// Support: Core
922    pub name: String,
923    /// Namespace is the namespace of the referent. When unspecified, this refers
924    /// to the local namespace of the Route.
925    ///
926    /// Note that there are specific rules for ParentRefs which cross namespace
927    /// boundaries. Cross-namespace references are only valid if they are explicitly
928    /// allowed by something in the namespace they are referring to. For example:
929    /// Gateway has the AllowedRoutes field, and ReferenceGrant provides a
930    /// generic way to enable any other kind of cross-namespace reference.
931    ///
932    /// <gateway:experimental:description>
933    /// ParentRefs from a Route to a Service in the same namespace are "producer"
934    /// routes, which apply default routing rules to inbound connections from
935    /// any namespace to the Service.
936    ///
937    /// ParentRefs from a Route to a Service in a different namespace are
938    /// "consumer" routes, and these routing rules are only applied to outbound
939    /// connections originating from the same namespace as the Route, for which
940    /// the intended destination of the connections are a Service targeted as a
941    /// ParentRef of the Route.
942    /// </gateway:experimental:description>
943    ///
944    /// Support: Core
945    #[serde(default, skip_serializing_if = "Option::is_none")]
946    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
947    pub namespace: Option<String>,
948    /// Port is the network port this Route targets. It can be interpreted
949    /// differently based on the type of parent resource.
950    ///
951    /// When the parent resource is a Gateway, this targets all listeners
952    /// listening on the specified port that also support this kind of Route(and
953    /// select this Route). It's not recommended to set `Port` unless the
954    /// networking behaviors specified in a Route must apply to a specific port
955    /// as opposed to a listener(s) whose port(s) may be changed. When both Port
956    /// and SectionName are specified, the name and port of the selected listener
957    /// must match both specified values.
958    ///
959    /// <gateway:experimental:description>
960    /// When the parent resource is a Service, this targets a specific port in the
961    /// Service spec. When both Port (experimental) and SectionName are specified,
962    /// the name and port of the selected port must match both specified values.
963    /// </gateway:experimental:description>
964    ///
965    /// Implementations MAY choose to support other parent resources.
966    /// Implementations supporting other types of parent resources MUST clearly
967    /// document how/if Port is interpreted.
968    ///
969    /// For the purpose of status, an attachment is considered successful as
970    /// long as the parent resource accepts it partially. For example, Gateway
971    /// listeners can restrict which Routes can attach to them by Route kind,
972    /// namespace, or hostname. If 1 of 2 Gateway listeners accept attachment
973    /// from the referencing Route, the Route MUST be considered successfully
974    /// attached. If no Gateway listeners accept attachment from this Route,
975    /// the Route MUST be considered detached from the Gateway.
976    ///
977    /// Support: Extended
978    #[serde(default, skip_serializing_if = "Option::is_none")]
979    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
980    pub port: Option<i32>,
981    /// SectionName is the name of a section within the target resource. In the
982    /// following resources, SectionName is interpreted as the following:
983    ///
984    /// * Gateway: Listener name. When both Port (experimental) and SectionName
985    /// are specified, the name and port of the selected listener must match
986    /// both specified values.
987    /// * Service: Port name. When both Port (experimental) and SectionName
988    /// are specified, the name and port of the selected listener must match
989    /// both specified values.
990    ///
991    /// Implementations MAY choose to support attaching Routes to other resources.
992    /// If that is the case, they MUST clearly document how SectionName is
993    /// interpreted.
994    ///
995    /// When unspecified (empty string), this will reference the entire resource.
996    /// For the purpose of status, an attachment is considered successful if at
997    /// least one section in the parent resource accepts it. For example, Gateway
998    /// listeners can restrict which Routes can attach to them by Route kind,
999    /// namespace, or hostname. If 1 of 2 Gateway listeners accept attachment from
1000    /// the referencing Route, the Route MUST be considered successfully
1001    /// attached. If no Gateway listeners accept attachment from this Route, the
1002    /// Route MUST be considered detached from the Gateway.
1003    ///
1004    /// Support: Core
1005    #[serde(
1006        default,
1007        skip_serializing_if = "Option::is_none",
1008        rename = "sectionName"
1009    )]
1010    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1011    pub section_name: Option<String>,
1012}
1013
1014/// Optional pod template used to configure the ACME challenge solver pods
1015/// used for HTTP01 challenges.
1016#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1017#[cfg_attr(feature = "builder", derive(TypedBuilder))]
1018#[cfg_attr(feature = "schemars", derive(JsonSchema))]
1019pub struct ChallengeSolverHttp01GatewayHttpRoutePodTemplate {
1020    /// ObjectMeta overrides for the pod used to solve HTTP01 challenges.
1021    /// Only the 'labels' and 'annotations' fields may be set.
1022    /// If labels or annotations overlap with in-built values, the values here
1023    /// will override the in-built values.
1024    #[serde(default, skip_serializing_if = "Option::is_none")]
1025    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1026    pub metadata: Option<ChallengeSolverHttp01GatewayHttpRoutePodTemplateMetadata>,
1027    /// PodSpec defines overrides for the HTTP01 challenge solver pod.
1028    /// Check ACMEChallengeSolverHTTP01IngressPodSpec to find out currently supported fields.
1029    /// All other fields will be ignored.
1030    #[serde(default, skip_serializing_if = "Option::is_none")]
1031    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1032    pub spec: Option<ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpec>,
1033}
1034
1035/// ObjectMeta overrides for the pod used to solve HTTP01 challenges.
1036/// Only the 'labels' and 'annotations' fields may be set.
1037/// If labels or annotations overlap with in-built values, the values here
1038/// will override the in-built values.
1039#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1040#[cfg_attr(feature = "builder", derive(TypedBuilder))]
1041#[cfg_attr(feature = "schemars", derive(JsonSchema))]
1042pub struct ChallengeSolverHttp01GatewayHttpRoutePodTemplateMetadata {
1043    /// Annotations that should be added to the created ACME HTTP01 solver pods.
1044    #[serde(default, skip_serializing_if = "Option::is_none")]
1045    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1046    pub annotations: Option<BTreeMap<String, String>>,
1047    /// Labels that should be added to the created ACME HTTP01 solver pods.
1048    #[serde(default, skip_serializing_if = "Option::is_none")]
1049    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1050    pub labels: Option<BTreeMap<String, String>>,
1051}
1052
1053/// PodSpec defines overrides for the HTTP01 challenge solver pod.
1054/// Check ACMEChallengeSolverHTTP01IngressPodSpec to find out currently supported fields.
1055/// All other fields will be ignored.
1056#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1057#[cfg_attr(feature = "builder", derive(TypedBuilder))]
1058#[cfg_attr(feature = "schemars", derive(JsonSchema))]
1059pub struct ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpec {
1060    /// If specified, the pod's scheduling constraints
1061    #[serde(default, skip_serializing_if = "Option::is_none")]
1062    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1063    pub affinity: Option<ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinity>,
1064    /// If specified, the pod's imagePullSecrets
1065    #[serde(
1066        default,
1067        skip_serializing_if = "Option::is_none",
1068        rename = "imagePullSecrets"
1069    )]
1070    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1071    pub image_pull_secrets:
1072        Option<Vec<ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecImagePullSecrets>>,
1073    /// NodeSelector is a selector which must be true for the pod to fit on a node.
1074    /// Selector which must match a node's labels for the pod to be scheduled on that node.
1075    /// More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
1076    #[serde(
1077        default,
1078        skip_serializing_if = "Option::is_none",
1079        rename = "nodeSelector"
1080    )]
1081    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1082    pub node_selector: Option<BTreeMap<String, String>>,
1083    /// If specified, the pod's priorityClassName.
1084    #[serde(
1085        default,
1086        skip_serializing_if = "Option::is_none",
1087        rename = "priorityClassName"
1088    )]
1089    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1090    pub priority_class_name: Option<String>,
1091    /// If specified, the pod's resource requirements.
1092    /// These values override the global resource configuration flags.
1093    /// Note that when only specifying resource limits, ensure they are greater than or equal
1094    /// to the corresponding global resource requests configured via controller flags
1095    /// (--acme-http01-solver-resource-request-cpu, --acme-http01-solver-resource-request-memory).
1096    /// Kubernetes will reject pod creation if limits are lower than requests, causing challenge failures.
1097    #[serde(default, skip_serializing_if = "Option::is_none")]
1098    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1099    pub resources: Option<ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecResources>,
1100    /// If specified, the pod's security context
1101    #[serde(
1102        default,
1103        skip_serializing_if = "Option::is_none",
1104        rename = "securityContext"
1105    )]
1106    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1107    pub security_context:
1108        Option<ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecSecurityContext>,
1109    /// If specified, the pod's service account
1110    #[serde(
1111        default,
1112        skip_serializing_if = "Option::is_none",
1113        rename = "serviceAccountName"
1114    )]
1115    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1116    pub service_account_name: Option<String>,
1117    /// If specified, the pod's tolerations.
1118    #[serde(default, skip_serializing_if = "Option::is_none")]
1119    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1120    pub tolerations: Option<Vec<ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecTolerations>>,
1121}
1122
1123/// If specified, the pod's scheduling constraints
1124#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1125#[cfg_attr(feature = "builder", derive(TypedBuilder))]
1126#[cfg_attr(feature = "schemars", derive(JsonSchema))]
1127pub struct ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinity {
1128    /// Describes node affinity scheduling rules for the pod.
1129    #[serde(
1130        default,
1131        skip_serializing_if = "Option::is_none",
1132        rename = "nodeAffinity"
1133    )]
1134    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1135    pub node_affinity:
1136        Option<ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityNodeAffinity>,
1137    /// Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).
1138    #[serde(
1139        default,
1140        skip_serializing_if = "Option::is_none",
1141        rename = "podAffinity"
1142    )]
1143    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1144    pub pod_affinity:
1145        Option<ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityPodAffinity>,
1146    /// Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).
1147    #[serde(
1148        default,
1149        skip_serializing_if = "Option::is_none",
1150        rename = "podAntiAffinity"
1151    )]
1152    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1153    pub pod_anti_affinity:
1154        Option<ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityPodAntiAffinity>,
1155}
1156
1157/// Describes node affinity scheduling rules for the pod.
1158#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1159#[cfg_attr(feature = "builder", derive(TypedBuilder))]
1160#[cfg_attr(feature = "schemars", derive(JsonSchema))]
1161pub struct ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityNodeAffinity {
1162    /// The scheduler will prefer to schedule pods to nodes that satisfy
1163    /// the affinity expressions specified by this field, but it may choose
1164    /// a node that violates one or more of the expressions. The node that is
1165    /// most preferred is the one with the greatest sum of weights, i.e.
1166    /// for each node that meets all of the scheduling requirements (resource
1167    /// request, requiredDuringScheduling affinity expressions, etc.),
1168    /// compute a sum by iterating through the elements of this field and adding
1169    /// "weight" to the sum if the node matches the corresponding matchExpressions; the
1170    /// node(s) with the highest sum are the most preferred.
1171    #[serde(default, skip_serializing_if = "Option::is_none", rename = "preferredDuringSchedulingIgnoredDuringExecution")]
1172#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1173    pub preferred_during_scheduling_ignored_during_execution: Option<Vec<ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecution>>,
1174    /// If the affinity requirements specified by this field are not met at
1175    /// scheduling time, the pod will not be scheduled onto the node.
1176    /// If the affinity requirements specified by this field cease to be met
1177    /// at some point during pod execution (e.g. due to an update), the system
1178    /// may or may not try to eventually evict the pod from its node.
1179    #[serde(default, skip_serializing_if = "Option::is_none", rename = "requiredDuringSchedulingIgnoredDuringExecution")]
1180#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1181    pub required_during_scheduling_ignored_during_execution: Option<ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecution>,
1182}
1183
1184/// An empty preferred scheduling term matches all objects with implicit weight 0
1185/// (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).
1186#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1187#[cfg_attr(feature = "builder", derive(TypedBuilder))]
1188#[cfg_attr(feature = "schemars", derive(JsonSchema))]
1189pub struct ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecution {
1190    /// A node selector term, associated with the corresponding weight.
1191    pub preference: ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionPreference,
1192    /// Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.
1193    pub weight: i32,
1194}
1195
1196/// A node selector term, associated with the corresponding weight.
1197#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1198#[cfg_attr(feature = "builder", derive(TypedBuilder))]
1199#[cfg_attr(feature = "schemars", derive(JsonSchema))]
1200pub struct ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionPreference {
1201    /// A list of node selector requirements by node's labels.
1202    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")]
1203#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1204    pub match_expressions: Option<Vec<ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionPreferenceMatchExpressions>>,
1205    /// A list of node selector requirements by node's fields.
1206    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchFields")]
1207#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1208    pub match_fields: Option<Vec<ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionPreferenceMatchFields>>,
1209}
1210
1211/// A node selector requirement is a selector that contains values, a key, and an operator
1212/// that relates the key and values.
1213#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1214#[cfg_attr(feature = "builder", derive(TypedBuilder))]
1215#[cfg_attr(feature = "schemars", derive(JsonSchema))]
1216pub struct ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionPreferenceMatchExpressions
1217{
1218    /// The label key that the selector applies to.
1219    pub key: String,
1220    /// Represents a key's relationship to a set of values.
1221    /// Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
1222    pub operator: String,
1223    /// An array of string values. If the operator is In or NotIn,
1224    /// the values array must be non-empty. If the operator is Exists or DoesNotExist,
1225    /// the values array must be empty. If the operator is Gt or Lt, the values
1226    /// array must have a single element, which will be interpreted as an integer.
1227    /// This array is replaced during a strategic merge patch.
1228    #[serde(default, skip_serializing_if = "Option::is_none")]
1229    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1230    pub values: Option<Vec<String>>,
1231}
1232
1233/// A node selector requirement is a selector that contains values, a key, and an operator
1234/// that relates the key and values.
1235#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1236#[cfg_attr(feature = "builder", derive(TypedBuilder))]
1237#[cfg_attr(feature = "schemars", derive(JsonSchema))]
1238pub struct ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionPreferenceMatchFields
1239{
1240    /// The label key that the selector applies to.
1241    pub key: String,
1242    /// Represents a key's relationship to a set of values.
1243    /// Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
1244    pub operator: String,
1245    /// An array of string values. If the operator is In or NotIn,
1246    /// the values array must be non-empty. If the operator is Exists or DoesNotExist,
1247    /// the values array must be empty. If the operator is Gt or Lt, the values
1248    /// array must have a single element, which will be interpreted as an integer.
1249    /// This array is replaced during a strategic merge patch.
1250    #[serde(default, skip_serializing_if = "Option::is_none")]
1251    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1252    pub values: Option<Vec<String>>,
1253}
1254
1255/// If the affinity requirements specified by this field are not met at
1256/// scheduling time, the pod will not be scheduled onto the node.
1257/// If the affinity requirements specified by this field cease to be met
1258/// at some point during pod execution (e.g. due to an update), the system
1259/// may or may not try to eventually evict the pod from its node.
1260#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1261#[cfg_attr(feature = "builder", derive(TypedBuilder))]
1262#[cfg_attr(feature = "schemars", derive(JsonSchema))]
1263pub struct ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecution {
1264    /// Required. A list of node selector terms. The terms are ORed.
1265    #[serde(rename = "nodeSelectorTerms")]
1266#[cfg_attr(feature = "builder", builder(default))]
1267    pub node_selector_terms: Vec<ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionNodeSelectorTerms>,
1268}
1269
1270/// A null or empty node selector term matches no objects. The requirements of
1271/// them are ANDed.
1272/// The TopologySelectorTerm type implements a subset of the NodeSelectorTerm.
1273#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1274#[cfg_attr(feature = "builder", derive(TypedBuilder))]
1275#[cfg_attr(feature = "schemars", derive(JsonSchema))]
1276pub struct ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionNodeSelectorTerms {
1277    /// A list of node selector requirements by node's labels.
1278    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")]
1279#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1280    pub match_expressions: Option<Vec<ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionNodeSelectorTermsMatchExpressions>>,
1281    /// A list of node selector requirements by node's fields.
1282    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchFields")]
1283#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1284    pub match_fields: Option<Vec<ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionNodeSelectorTermsMatchFields>>,
1285}
1286
1287/// A node selector requirement is a selector that contains values, a key, and an operator
1288/// that relates the key and values.
1289#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1290#[cfg_attr(feature = "builder", derive(TypedBuilder))]
1291#[cfg_attr(feature = "schemars", derive(JsonSchema))]
1292pub struct ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionNodeSelectorTermsMatchExpressions
1293{
1294    /// The label key that the selector applies to.
1295    pub key: String,
1296    /// Represents a key's relationship to a set of values.
1297    /// Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
1298    pub operator: String,
1299    /// An array of string values. If the operator is In or NotIn,
1300    /// the values array must be non-empty. If the operator is Exists or DoesNotExist,
1301    /// the values array must be empty. If the operator is Gt or Lt, the values
1302    /// array must have a single element, which will be interpreted as an integer.
1303    /// This array is replaced during a strategic merge patch.
1304    #[serde(default, skip_serializing_if = "Option::is_none")]
1305    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1306    pub values: Option<Vec<String>>,
1307}
1308
1309/// A node selector requirement is a selector that contains values, a key, and an operator
1310/// that relates the key and values.
1311#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1312#[cfg_attr(feature = "builder", derive(TypedBuilder))]
1313#[cfg_attr(feature = "schemars", derive(JsonSchema))]
1314pub struct ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionNodeSelectorTermsMatchFields
1315{
1316    /// The label key that the selector applies to.
1317    pub key: String,
1318    /// Represents a key's relationship to a set of values.
1319    /// Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
1320    pub operator: String,
1321    /// An array of string values. If the operator is In or NotIn,
1322    /// the values array must be non-empty. If the operator is Exists or DoesNotExist,
1323    /// the values array must be empty. If the operator is Gt or Lt, the values
1324    /// array must have a single element, which will be interpreted as an integer.
1325    /// This array is replaced during a strategic merge patch.
1326    #[serde(default, skip_serializing_if = "Option::is_none")]
1327    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1328    pub values: Option<Vec<String>>,
1329}
1330
1331/// Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).
1332#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1333#[cfg_attr(feature = "builder", derive(TypedBuilder))]
1334#[cfg_attr(feature = "schemars", derive(JsonSchema))]
1335pub struct ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityPodAffinity {
1336    /// The scheduler will prefer to schedule pods to nodes that satisfy
1337    /// the affinity expressions specified by this field, but it may choose
1338    /// a node that violates one or more of the expressions. The node that is
1339    /// most preferred is the one with the greatest sum of weights, i.e.
1340    /// for each node that meets all of the scheduling requirements (resource
1341    /// request, requiredDuringScheduling affinity expressions, etc.),
1342    /// compute a sum by iterating through the elements of this field and adding
1343    /// "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the
1344    /// node(s) with the highest sum are the most preferred.
1345    #[serde(default, skip_serializing_if = "Option::is_none", rename = "preferredDuringSchedulingIgnoredDuringExecution")]
1346#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1347    pub preferred_during_scheduling_ignored_during_execution: Option<Vec<ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityPodAffinityPreferredDuringSchedulingIgnoredDuringExecution>>,
1348    /// If the affinity requirements specified by this field are not met at
1349    /// scheduling time, the pod will not be scheduled onto the node.
1350    /// If the affinity requirements specified by this field cease to be met
1351    /// at some point during pod execution (e.g. due to a pod label update), the
1352    /// system may or may not try to eventually evict the pod from its node.
1353    /// When there are multiple elements, the lists of nodes corresponding to each
1354    /// podAffinityTerm are intersected, i.e. all terms must be satisfied.
1355    #[serde(default, skip_serializing_if = "Option::is_none", rename = "requiredDuringSchedulingIgnoredDuringExecution")]
1356#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1357    pub required_during_scheduling_ignored_during_execution: Option<Vec<ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityPodAffinityRequiredDuringSchedulingIgnoredDuringExecution>>,
1358}
1359
1360/// The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)
1361#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1362#[cfg_attr(feature = "builder", derive(TypedBuilder))]
1363#[cfg_attr(feature = "schemars", derive(JsonSchema))]
1364pub struct ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityPodAffinityPreferredDuringSchedulingIgnoredDuringExecution {
1365    /// Required. A pod affinity term, associated with the corresponding weight.
1366    #[serde(rename = "podAffinityTerm")]
1367    pub pod_affinity_term: ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityPodAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTerm,
1368    /// weight associated with matching the corresponding podAffinityTerm,
1369    /// in the range 1-100.
1370    pub weight: i32,
1371}
1372
1373/// Required. A pod affinity term, associated with the corresponding weight.
1374#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1375#[cfg_attr(feature = "builder", derive(TypedBuilder))]
1376#[cfg_attr(feature = "schemars", derive(JsonSchema))]
1377pub struct ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityPodAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTerm {
1378    /// A label query over a set of resources, in this case pods.
1379    /// If it's null, this PodAffinityTerm matches with no Pods.
1380    #[serde(default, skip_serializing_if = "Option::is_none", rename = "labelSelector")]
1381#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1382    pub label_selector: Option<ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityPodAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermLabelSelector>,
1383    /// MatchLabelKeys is a set of pod label keys to select which pods will
1384    /// be taken into consideration. The keys are used to lookup values from the
1385    /// incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)`
1386    /// to select the group of existing pods which pods will be taken into consideration
1387    /// for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming
1388    /// pod labels will be ignored. The default value is empty.
1389    /// The same key is forbidden to exist in both matchLabelKeys and labelSelector.
1390    /// Also, matchLabelKeys cannot be set when labelSelector isn't set.
1391    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabelKeys")]
1392#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1393    pub match_label_keys: Option<Vec<String>>,
1394    /// MismatchLabelKeys is a set of pod label keys to select which pods will
1395    /// be taken into consideration. The keys are used to lookup values from the
1396    /// incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)`
1397    /// to select the group of existing pods which pods will be taken into consideration
1398    /// for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming
1399    /// pod labels will be ignored. The default value is empty.
1400    /// The same key is forbidden to exist in both mismatchLabelKeys and labelSelector.
1401    /// Also, mismatchLabelKeys cannot be set when labelSelector isn't set.
1402    #[serde(default, skip_serializing_if = "Option::is_none", rename = "mismatchLabelKeys")]
1403#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1404    pub mismatch_label_keys: Option<Vec<String>>,
1405    /// A label query over the set of namespaces that the term applies to.
1406    /// The term is applied to the union of the namespaces selected by this field
1407    /// and the ones listed in the namespaces field.
1408    /// null selector and null or empty namespaces list means "this pod's namespace".
1409    /// An empty selector ({}) matches all namespaces.
1410    #[serde(default, skip_serializing_if = "Option::is_none", rename = "namespaceSelector")]
1411#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1412    pub namespace_selector: Option<ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityPodAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermNamespaceSelector>,
1413    /// namespaces specifies a static list of namespace names that the term applies to.
1414    /// The term is applied to the union of the namespaces listed in this field
1415    /// and the ones selected by namespaceSelector.
1416    /// null or empty namespaces list and null namespaceSelector means "this pod's namespace".
1417    #[serde(default, skip_serializing_if = "Option::is_none")]
1418#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1419    pub namespaces: Option<Vec<String>>,
1420    /// This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching
1421    /// the labelSelector in the specified namespaces, where co-located is defined as running on a node
1422    /// whose value of the label with key topologyKey matches that of any node on which any of the
1423    /// selected pods is running.
1424    /// Empty topologyKey is not allowed.
1425    #[serde(rename = "topologyKey")]
1426    pub topology_key: String,
1427}
1428
1429/// A label query over a set of resources, in this case pods.
1430/// If it's null, this PodAffinityTerm matches with no Pods.
1431#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1432#[cfg_attr(feature = "builder", derive(TypedBuilder))]
1433#[cfg_attr(feature = "schemars", derive(JsonSchema))]
1434pub struct ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityPodAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermLabelSelector {
1435    /// matchExpressions is a list of label selector requirements. The requirements are ANDed.
1436    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")]
1437#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1438    pub match_expressions: Option<Vec<ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityPodAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermLabelSelectorMatchExpressions>>,
1439    /// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
1440    /// map is equivalent to an element of matchExpressions, whose key field is "key", the
1441    /// operator is "In", and the values array contains only "value". The requirements are ANDed.
1442    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")]
1443#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1444    pub match_labels: Option<BTreeMap<String, String>>,
1445}
1446
1447/// A label selector requirement is a selector that contains values, a key, and an operator that
1448/// relates the key and values.
1449#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1450#[cfg_attr(feature = "builder", derive(TypedBuilder))]
1451#[cfg_attr(feature = "schemars", derive(JsonSchema))]
1452pub struct ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityPodAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermLabelSelectorMatchExpressions
1453{
1454    /// key is the label key that the selector applies to.
1455    pub key: String,
1456    /// operator represents a key's relationship to a set of values.
1457    /// Valid operators are In, NotIn, Exists and DoesNotExist.
1458    pub operator: String,
1459    /// values is an array of string values. If the operator is In or NotIn,
1460    /// the values array must be non-empty. If the operator is Exists or DoesNotExist,
1461    /// the values array must be empty. This array is replaced during a strategic
1462    /// merge patch.
1463    #[serde(default, skip_serializing_if = "Option::is_none")]
1464    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1465    pub values: Option<Vec<String>>,
1466}
1467
1468/// A label query over the set of namespaces that the term applies to.
1469/// The term is applied to the union of the namespaces selected by this field
1470/// and the ones listed in the namespaces field.
1471/// null selector and null or empty namespaces list means "this pod's namespace".
1472/// An empty selector ({}) matches all namespaces.
1473#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1474#[cfg_attr(feature = "builder", derive(TypedBuilder))]
1475#[cfg_attr(feature = "schemars", derive(JsonSchema))]
1476pub struct ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityPodAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermNamespaceSelector {
1477    /// matchExpressions is a list of label selector requirements. The requirements are ANDed.
1478    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")]
1479#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1480    pub match_expressions: Option<Vec<ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityPodAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermNamespaceSelectorMatchExpressions>>,
1481    /// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
1482    /// map is equivalent to an element of matchExpressions, whose key field is "key", the
1483    /// operator is "In", and the values array contains only "value". The requirements are ANDed.
1484    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")]
1485#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1486    pub match_labels: Option<BTreeMap<String, String>>,
1487}
1488
1489/// A label selector requirement is a selector that contains values, a key, and an operator that
1490/// relates the key and values.
1491#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1492#[cfg_attr(feature = "builder", derive(TypedBuilder))]
1493#[cfg_attr(feature = "schemars", derive(JsonSchema))]
1494pub struct ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityPodAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermNamespaceSelectorMatchExpressions
1495{
1496    /// key is the label key that the selector applies to.
1497    pub key: String,
1498    /// operator represents a key's relationship to a set of values.
1499    /// Valid operators are In, NotIn, Exists and DoesNotExist.
1500    pub operator: String,
1501    /// values is an array of string values. If the operator is In or NotIn,
1502    /// the values array must be non-empty. If the operator is Exists or DoesNotExist,
1503    /// the values array must be empty. This array is replaced during a strategic
1504    /// merge patch.
1505    #[serde(default, skip_serializing_if = "Option::is_none")]
1506    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1507    pub values: Option<Vec<String>>,
1508}
1509
1510/// Defines a set of pods (namely those matching the labelSelector
1511/// relative to the given namespace(s)) that this pod should be
1512/// co-located (affinity) or not co-located (anti-affinity) with,
1513/// where co-located is defined as running on a node whose value of
1514/// the label with key <topologyKey> matches that of any node on which
1515/// a pod of the set of pods is running
1516#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1517#[cfg_attr(feature = "builder", derive(TypedBuilder))]
1518#[cfg_attr(feature = "schemars", derive(JsonSchema))]
1519pub struct ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityPodAffinityRequiredDuringSchedulingIgnoredDuringExecution {
1520    /// A label query over a set of resources, in this case pods.
1521    /// If it's null, this PodAffinityTerm matches with no Pods.
1522    #[serde(default, skip_serializing_if = "Option::is_none", rename = "labelSelector")]
1523#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1524    pub label_selector: Option<ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityPodAffinityRequiredDuringSchedulingIgnoredDuringExecutionLabelSelector>,
1525    /// MatchLabelKeys is a set of pod label keys to select which pods will
1526    /// be taken into consideration. The keys are used to lookup values from the
1527    /// incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)`
1528    /// to select the group of existing pods which pods will be taken into consideration
1529    /// for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming
1530    /// pod labels will be ignored. The default value is empty.
1531    /// The same key is forbidden to exist in both matchLabelKeys and labelSelector.
1532    /// Also, matchLabelKeys cannot be set when labelSelector isn't set.
1533    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabelKeys")]
1534#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1535    pub match_label_keys: Option<Vec<String>>,
1536    /// MismatchLabelKeys is a set of pod label keys to select which pods will
1537    /// be taken into consideration. The keys are used to lookup values from the
1538    /// incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)`
1539    /// to select the group of existing pods which pods will be taken into consideration
1540    /// for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming
1541    /// pod labels will be ignored. The default value is empty.
1542    /// The same key is forbidden to exist in both mismatchLabelKeys and labelSelector.
1543    /// Also, mismatchLabelKeys cannot be set when labelSelector isn't set.
1544    #[serde(default, skip_serializing_if = "Option::is_none", rename = "mismatchLabelKeys")]
1545#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1546    pub mismatch_label_keys: Option<Vec<String>>,
1547    /// A label query over the set of namespaces that the term applies to.
1548    /// The term is applied to the union of the namespaces selected by this field
1549    /// and the ones listed in the namespaces field.
1550    /// null selector and null or empty namespaces list means "this pod's namespace".
1551    /// An empty selector ({}) matches all namespaces.
1552    #[serde(default, skip_serializing_if = "Option::is_none", rename = "namespaceSelector")]
1553#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1554    pub namespace_selector: Option<ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityPodAffinityRequiredDuringSchedulingIgnoredDuringExecutionNamespaceSelector>,
1555    /// namespaces specifies a static list of namespace names that the term applies to.
1556    /// The term is applied to the union of the namespaces listed in this field
1557    /// and the ones selected by namespaceSelector.
1558    /// null or empty namespaces list and null namespaceSelector means "this pod's namespace".
1559    #[serde(default, skip_serializing_if = "Option::is_none")]
1560#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1561    pub namespaces: Option<Vec<String>>,
1562    /// This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching
1563    /// the labelSelector in the specified namespaces, where co-located is defined as running on a node
1564    /// whose value of the label with key topologyKey matches that of any node on which any of the
1565    /// selected pods is running.
1566    /// Empty topologyKey is not allowed.
1567    #[serde(rename = "topologyKey")]
1568    pub topology_key: String,
1569}
1570
1571/// A label query over a set of resources, in this case pods.
1572/// If it's null, this PodAffinityTerm matches with no Pods.
1573#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1574#[cfg_attr(feature = "builder", derive(TypedBuilder))]
1575#[cfg_attr(feature = "schemars", derive(JsonSchema))]
1576pub struct ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityPodAffinityRequiredDuringSchedulingIgnoredDuringExecutionLabelSelector {
1577    /// matchExpressions is a list of label selector requirements. The requirements are ANDed.
1578    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")]
1579#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1580    pub match_expressions: Option<Vec<ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityPodAffinityRequiredDuringSchedulingIgnoredDuringExecutionLabelSelectorMatchExpressions>>,
1581    /// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
1582    /// map is equivalent to an element of matchExpressions, whose key field is "key", the
1583    /// operator is "In", and the values array contains only "value". The requirements are ANDed.
1584    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")]
1585#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1586    pub match_labels: Option<BTreeMap<String, String>>,
1587}
1588
1589/// A label selector requirement is a selector that contains values, a key, and an operator that
1590/// relates the key and values.
1591#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1592#[cfg_attr(feature = "builder", derive(TypedBuilder))]
1593#[cfg_attr(feature = "schemars", derive(JsonSchema))]
1594pub struct ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityPodAffinityRequiredDuringSchedulingIgnoredDuringExecutionLabelSelectorMatchExpressions
1595{
1596    /// key is the label key that the selector applies to.
1597    pub key: String,
1598    /// operator represents a key's relationship to a set of values.
1599    /// Valid operators are In, NotIn, Exists and DoesNotExist.
1600    pub operator: String,
1601    /// values is an array of string values. If the operator is In or NotIn,
1602    /// the values array must be non-empty. If the operator is Exists or DoesNotExist,
1603    /// the values array must be empty. This array is replaced during a strategic
1604    /// merge patch.
1605    #[serde(default, skip_serializing_if = "Option::is_none")]
1606    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1607    pub values: Option<Vec<String>>,
1608}
1609
1610/// A label query over the set of namespaces that the term applies to.
1611/// The term is applied to the union of the namespaces selected by this field
1612/// and the ones listed in the namespaces field.
1613/// null selector and null or empty namespaces list means "this pod's namespace".
1614/// An empty selector ({}) matches all namespaces.
1615#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1616#[cfg_attr(feature = "builder", derive(TypedBuilder))]
1617#[cfg_attr(feature = "schemars", derive(JsonSchema))]
1618pub struct ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityPodAffinityRequiredDuringSchedulingIgnoredDuringExecutionNamespaceSelector {
1619    /// matchExpressions is a list of label selector requirements. The requirements are ANDed.
1620    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")]
1621#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1622    pub match_expressions: Option<Vec<ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityPodAffinityRequiredDuringSchedulingIgnoredDuringExecutionNamespaceSelectorMatchExpressions>>,
1623    /// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
1624    /// map is equivalent to an element of matchExpressions, whose key field is "key", the
1625    /// operator is "In", and the values array contains only "value". The requirements are ANDed.
1626    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")]
1627#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1628    pub match_labels: Option<BTreeMap<String, String>>,
1629}
1630
1631/// A label selector requirement is a selector that contains values, a key, and an operator that
1632/// relates the key and values.
1633#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1634#[cfg_attr(feature = "builder", derive(TypedBuilder))]
1635#[cfg_attr(feature = "schemars", derive(JsonSchema))]
1636pub struct ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityPodAffinityRequiredDuringSchedulingIgnoredDuringExecutionNamespaceSelectorMatchExpressions
1637{
1638    /// key is the label key that the selector applies to.
1639    pub key: String,
1640    /// operator represents a key's relationship to a set of values.
1641    /// Valid operators are In, NotIn, Exists and DoesNotExist.
1642    pub operator: String,
1643    /// values is an array of string values. If the operator is In or NotIn,
1644    /// the values array must be non-empty. If the operator is Exists or DoesNotExist,
1645    /// the values array must be empty. This array is replaced during a strategic
1646    /// merge patch.
1647    #[serde(default, skip_serializing_if = "Option::is_none")]
1648    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1649    pub values: Option<Vec<String>>,
1650}
1651
1652/// Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).
1653#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1654#[cfg_attr(feature = "builder", derive(TypedBuilder))]
1655#[cfg_attr(feature = "schemars", derive(JsonSchema))]
1656pub struct ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityPodAntiAffinity {
1657    /// The scheduler will prefer to schedule pods to nodes that satisfy
1658    /// the anti-affinity expressions specified by this field, but it may choose
1659    /// a node that violates one or more of the expressions. The node that is
1660    /// most preferred is the one with the greatest sum of weights, i.e.
1661    /// for each node that meets all of the scheduling requirements (resource
1662    /// request, requiredDuringScheduling anti-affinity expressions, etc.),
1663    /// compute a sum by iterating through the elements of this field and subtracting
1664    /// "weight" from the sum if the node has pods which matches the corresponding podAffinityTerm; the
1665    /// node(s) with the highest sum are the most preferred.
1666    #[serde(default, skip_serializing_if = "Option::is_none", rename = "preferredDuringSchedulingIgnoredDuringExecution")]
1667#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1668    pub preferred_during_scheduling_ignored_during_execution: Option<Vec<ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityPodAntiAffinityPreferredDuringSchedulingIgnoredDuringExecution>>,
1669    /// If the anti-affinity requirements specified by this field are not met at
1670    /// scheduling time, the pod will not be scheduled onto the node.
1671    /// If the anti-affinity requirements specified by this field cease to be met
1672    /// at some point during pod execution (e.g. due to a pod label update), the
1673    /// system may or may not try to eventually evict the pod from its node.
1674    /// When there are multiple elements, the lists of nodes corresponding to each
1675    /// podAffinityTerm are intersected, i.e. all terms must be satisfied.
1676    #[serde(default, skip_serializing_if = "Option::is_none", rename = "requiredDuringSchedulingIgnoredDuringExecution")]
1677#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1678    pub required_during_scheduling_ignored_during_execution: Option<Vec<ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityPodAntiAffinityRequiredDuringSchedulingIgnoredDuringExecution>>,
1679}
1680
1681/// The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)
1682#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1683#[cfg_attr(feature = "builder", derive(TypedBuilder))]
1684#[cfg_attr(feature = "schemars", derive(JsonSchema))]
1685pub struct ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityPodAntiAffinityPreferredDuringSchedulingIgnoredDuringExecution {
1686    /// Required. A pod affinity term, associated with the corresponding weight.
1687    #[serde(rename = "podAffinityTerm")]
1688    pub pod_affinity_term: ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityPodAntiAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTerm,
1689    /// weight associated with matching the corresponding podAffinityTerm,
1690    /// in the range 1-100.
1691    pub weight: i32,
1692}
1693
1694/// Required. A pod affinity term, associated with the corresponding weight.
1695#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1696#[cfg_attr(feature = "builder", derive(TypedBuilder))]
1697#[cfg_attr(feature = "schemars", derive(JsonSchema))]
1698pub struct ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityPodAntiAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTerm {
1699    /// A label query over a set of resources, in this case pods.
1700    /// If it's null, this PodAffinityTerm matches with no Pods.
1701    #[serde(default, skip_serializing_if = "Option::is_none", rename = "labelSelector")]
1702#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1703    pub label_selector: Option<ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityPodAntiAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermLabelSelector>,
1704    /// MatchLabelKeys is a set of pod label keys to select which pods will
1705    /// be taken into consideration. The keys are used to lookup values from the
1706    /// incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)`
1707    /// to select the group of existing pods which pods will be taken into consideration
1708    /// for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming
1709    /// pod labels will be ignored. The default value is empty.
1710    /// The same key is forbidden to exist in both matchLabelKeys and labelSelector.
1711    /// Also, matchLabelKeys cannot be set when labelSelector isn't set.
1712    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabelKeys")]
1713#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1714    pub match_label_keys: Option<Vec<String>>,
1715    /// MismatchLabelKeys is a set of pod label keys to select which pods will
1716    /// be taken into consideration. The keys are used to lookup values from the
1717    /// incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)`
1718    /// to select the group of existing pods which pods will be taken into consideration
1719    /// for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming
1720    /// pod labels will be ignored. The default value is empty.
1721    /// The same key is forbidden to exist in both mismatchLabelKeys and labelSelector.
1722    /// Also, mismatchLabelKeys cannot be set when labelSelector isn't set.
1723    #[serde(default, skip_serializing_if = "Option::is_none", rename = "mismatchLabelKeys")]
1724#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1725    pub mismatch_label_keys: Option<Vec<String>>,
1726    /// A label query over the set of namespaces that the term applies to.
1727    /// The term is applied to the union of the namespaces selected by this field
1728    /// and the ones listed in the namespaces field.
1729    /// null selector and null or empty namespaces list means "this pod's namespace".
1730    /// An empty selector ({}) matches all namespaces.
1731    #[serde(default, skip_serializing_if = "Option::is_none", rename = "namespaceSelector")]
1732#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1733    pub namespace_selector: Option<ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityPodAntiAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermNamespaceSelector>,
1734    /// namespaces specifies a static list of namespace names that the term applies to.
1735    /// The term is applied to the union of the namespaces listed in this field
1736    /// and the ones selected by namespaceSelector.
1737    /// null or empty namespaces list and null namespaceSelector means "this pod's namespace".
1738    #[serde(default, skip_serializing_if = "Option::is_none")]
1739#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1740    pub namespaces: Option<Vec<String>>,
1741    /// This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching
1742    /// the labelSelector in the specified namespaces, where co-located is defined as running on a node
1743    /// whose value of the label with key topologyKey matches that of any node on which any of the
1744    /// selected pods is running.
1745    /// Empty topologyKey is not allowed.
1746    #[serde(rename = "topologyKey")]
1747    pub topology_key: String,
1748}
1749
1750/// A label query over a set of resources, in this case pods.
1751/// If it's null, this PodAffinityTerm matches with no Pods.
1752#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1753#[cfg_attr(feature = "builder", derive(TypedBuilder))]
1754#[cfg_attr(feature = "schemars", derive(JsonSchema))]
1755pub struct ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityPodAntiAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermLabelSelector {
1756    /// matchExpressions is a list of label selector requirements. The requirements are ANDed.
1757    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")]
1758#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1759    pub match_expressions: Option<Vec<ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityPodAntiAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermLabelSelectorMatchExpressions>>,
1760    /// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
1761    /// map is equivalent to an element of matchExpressions, whose key field is "key", the
1762    /// operator is "In", and the values array contains only "value". The requirements are ANDed.
1763    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")]
1764#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1765    pub match_labels: Option<BTreeMap<String, String>>,
1766}
1767
1768/// A label selector requirement is a selector that contains values, a key, and an operator that
1769/// relates the key and values.
1770#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1771#[cfg_attr(feature = "builder", derive(TypedBuilder))]
1772#[cfg_attr(feature = "schemars", derive(JsonSchema))]
1773pub struct ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityPodAntiAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermLabelSelectorMatchExpressions
1774{
1775    /// key is the label key that the selector applies to.
1776    pub key: String,
1777    /// operator represents a key's relationship to a set of values.
1778    /// Valid operators are In, NotIn, Exists and DoesNotExist.
1779    pub operator: String,
1780    /// values is an array of string values. If the operator is In or NotIn,
1781    /// the values array must be non-empty. If the operator is Exists or DoesNotExist,
1782    /// the values array must be empty. This array is replaced during a strategic
1783    /// merge patch.
1784    #[serde(default, skip_serializing_if = "Option::is_none")]
1785    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1786    pub values: Option<Vec<String>>,
1787}
1788
1789/// A label query over the set of namespaces that the term applies to.
1790/// The term is applied to the union of the namespaces selected by this field
1791/// and the ones listed in the namespaces field.
1792/// null selector and null or empty namespaces list means "this pod's namespace".
1793/// An empty selector ({}) matches all namespaces.
1794#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1795#[cfg_attr(feature = "builder", derive(TypedBuilder))]
1796#[cfg_attr(feature = "schemars", derive(JsonSchema))]
1797pub struct ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityPodAntiAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermNamespaceSelector {
1798    /// matchExpressions is a list of label selector requirements. The requirements are ANDed.
1799    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")]
1800#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1801    pub match_expressions: Option<Vec<ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityPodAntiAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermNamespaceSelectorMatchExpressions>>,
1802    /// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
1803    /// map is equivalent to an element of matchExpressions, whose key field is "key", the
1804    /// operator is "In", and the values array contains only "value". The requirements are ANDed.
1805    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")]
1806#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1807    pub match_labels: Option<BTreeMap<String, String>>,
1808}
1809
1810/// A label selector requirement is a selector that contains values, a key, and an operator that
1811/// relates the key and values.
1812#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1813#[cfg_attr(feature = "builder", derive(TypedBuilder))]
1814#[cfg_attr(feature = "schemars", derive(JsonSchema))]
1815pub struct ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityPodAntiAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermNamespaceSelectorMatchExpressions
1816{
1817    /// key is the label key that the selector applies to.
1818    pub key: String,
1819    /// operator represents a key's relationship to a set of values.
1820    /// Valid operators are In, NotIn, Exists and DoesNotExist.
1821    pub operator: String,
1822    /// values is an array of string values. If the operator is In or NotIn,
1823    /// the values array must be non-empty. If the operator is Exists or DoesNotExist,
1824    /// the values array must be empty. This array is replaced during a strategic
1825    /// merge patch.
1826    #[serde(default, skip_serializing_if = "Option::is_none")]
1827    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1828    pub values: Option<Vec<String>>,
1829}
1830
1831/// Defines a set of pods (namely those matching the labelSelector
1832/// relative to the given namespace(s)) that this pod should be
1833/// co-located (affinity) or not co-located (anti-affinity) with,
1834/// where co-located is defined as running on a node whose value of
1835/// the label with key <topologyKey> matches that of any node on which
1836/// a pod of the set of pods is running
1837#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1838#[cfg_attr(feature = "builder", derive(TypedBuilder))]
1839#[cfg_attr(feature = "schemars", derive(JsonSchema))]
1840pub struct ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityPodAntiAffinityRequiredDuringSchedulingIgnoredDuringExecution {
1841    /// A label query over a set of resources, in this case pods.
1842    /// If it's null, this PodAffinityTerm matches with no Pods.
1843    #[serde(default, skip_serializing_if = "Option::is_none", rename = "labelSelector")]
1844#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1845    pub label_selector: Option<ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityPodAntiAffinityRequiredDuringSchedulingIgnoredDuringExecutionLabelSelector>,
1846    /// MatchLabelKeys is a set of pod label keys to select which pods will
1847    /// be taken into consideration. The keys are used to lookup values from the
1848    /// incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)`
1849    /// to select the group of existing pods which pods will be taken into consideration
1850    /// for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming
1851    /// pod labels will be ignored. The default value is empty.
1852    /// The same key is forbidden to exist in both matchLabelKeys and labelSelector.
1853    /// Also, matchLabelKeys cannot be set when labelSelector isn't set.
1854    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabelKeys")]
1855#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1856    pub match_label_keys: Option<Vec<String>>,
1857    /// MismatchLabelKeys is a set of pod label keys to select which pods will
1858    /// be taken into consideration. The keys are used to lookup values from the
1859    /// incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)`
1860    /// to select the group of existing pods which pods will be taken into consideration
1861    /// for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming
1862    /// pod labels will be ignored. The default value is empty.
1863    /// The same key is forbidden to exist in both mismatchLabelKeys and labelSelector.
1864    /// Also, mismatchLabelKeys cannot be set when labelSelector isn't set.
1865    #[serde(default, skip_serializing_if = "Option::is_none", rename = "mismatchLabelKeys")]
1866#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1867    pub mismatch_label_keys: Option<Vec<String>>,
1868    /// A label query over the set of namespaces that the term applies to.
1869    /// The term is applied to the union of the namespaces selected by this field
1870    /// and the ones listed in the namespaces field.
1871    /// null selector and null or empty namespaces list means "this pod's namespace".
1872    /// An empty selector ({}) matches all namespaces.
1873    #[serde(default, skip_serializing_if = "Option::is_none", rename = "namespaceSelector")]
1874#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1875    pub namespace_selector: Option<ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityPodAntiAffinityRequiredDuringSchedulingIgnoredDuringExecutionNamespaceSelector>,
1876    /// namespaces specifies a static list of namespace names that the term applies to.
1877    /// The term is applied to the union of the namespaces listed in this field
1878    /// and the ones selected by namespaceSelector.
1879    /// null or empty namespaces list and null namespaceSelector means "this pod's namespace".
1880    #[serde(default, skip_serializing_if = "Option::is_none")]
1881#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1882    pub namespaces: Option<Vec<String>>,
1883    /// This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching
1884    /// the labelSelector in the specified namespaces, where co-located is defined as running on a node
1885    /// whose value of the label with key topologyKey matches that of any node on which any of the
1886    /// selected pods is running.
1887    /// Empty topologyKey is not allowed.
1888    #[serde(rename = "topologyKey")]
1889    pub topology_key: String,
1890}
1891
1892/// A label query over a set of resources, in this case pods.
1893/// If it's null, this PodAffinityTerm matches with no Pods.
1894#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1895#[cfg_attr(feature = "builder", derive(TypedBuilder))]
1896#[cfg_attr(feature = "schemars", derive(JsonSchema))]
1897pub struct ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityPodAntiAffinityRequiredDuringSchedulingIgnoredDuringExecutionLabelSelector {
1898    /// matchExpressions is a list of label selector requirements. The requirements are ANDed.
1899    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")]
1900#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1901    pub match_expressions: Option<Vec<ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityPodAntiAffinityRequiredDuringSchedulingIgnoredDuringExecutionLabelSelectorMatchExpressions>>,
1902    /// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
1903    /// map is equivalent to an element of matchExpressions, whose key field is "key", the
1904    /// operator is "In", and the values array contains only "value". The requirements are ANDed.
1905    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")]
1906#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1907    pub match_labels: Option<BTreeMap<String, String>>,
1908}
1909
1910/// A label selector requirement is a selector that contains values, a key, and an operator that
1911/// relates the key and values.
1912#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1913#[cfg_attr(feature = "builder", derive(TypedBuilder))]
1914#[cfg_attr(feature = "schemars", derive(JsonSchema))]
1915pub struct ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityPodAntiAffinityRequiredDuringSchedulingIgnoredDuringExecutionLabelSelectorMatchExpressions
1916{
1917    /// key is the label key that the selector applies to.
1918    pub key: String,
1919    /// operator represents a key's relationship to a set of values.
1920    /// Valid operators are In, NotIn, Exists and DoesNotExist.
1921    pub operator: String,
1922    /// values is an array of string values. If the operator is In or NotIn,
1923    /// the values array must be non-empty. If the operator is Exists or DoesNotExist,
1924    /// the values array must be empty. This array is replaced during a strategic
1925    /// merge patch.
1926    #[serde(default, skip_serializing_if = "Option::is_none")]
1927    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1928    pub values: Option<Vec<String>>,
1929}
1930
1931/// A label query over the set of namespaces that the term applies to.
1932/// The term is applied to the union of the namespaces selected by this field
1933/// and the ones listed in the namespaces field.
1934/// null selector and null or empty namespaces list means "this pod's namespace".
1935/// An empty selector ({}) matches all namespaces.
1936#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1937#[cfg_attr(feature = "builder", derive(TypedBuilder))]
1938#[cfg_attr(feature = "schemars", derive(JsonSchema))]
1939pub struct ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityPodAntiAffinityRequiredDuringSchedulingIgnoredDuringExecutionNamespaceSelector {
1940    /// matchExpressions is a list of label selector requirements. The requirements are ANDed.
1941    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")]
1942#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1943    pub match_expressions: Option<Vec<ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityPodAntiAffinityRequiredDuringSchedulingIgnoredDuringExecutionNamespaceSelectorMatchExpressions>>,
1944    /// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
1945    /// map is equivalent to an element of matchExpressions, whose key field is "key", the
1946    /// operator is "In", and the values array contains only "value". The requirements are ANDed.
1947    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")]
1948#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1949    pub match_labels: Option<BTreeMap<String, String>>,
1950}
1951
1952/// A label selector requirement is a selector that contains values, a key, and an operator that
1953/// relates the key and values.
1954#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1955#[cfg_attr(feature = "builder", derive(TypedBuilder))]
1956#[cfg_attr(feature = "schemars", derive(JsonSchema))]
1957pub struct ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecAffinityPodAntiAffinityRequiredDuringSchedulingIgnoredDuringExecutionNamespaceSelectorMatchExpressions
1958{
1959    /// key is the label key that the selector applies to.
1960    pub key: String,
1961    /// operator represents a key's relationship to a set of values.
1962    /// Valid operators are In, NotIn, Exists and DoesNotExist.
1963    pub operator: String,
1964    /// values is an array of string values. If the operator is In or NotIn,
1965    /// the values array must be non-empty. If the operator is Exists or DoesNotExist,
1966    /// the values array must be empty. This array is replaced during a strategic
1967    /// merge patch.
1968    #[serde(default, skip_serializing_if = "Option::is_none")]
1969    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1970    pub values: Option<Vec<String>>,
1971}
1972
1973/// LocalObjectReference contains enough information to let you locate the
1974/// referenced object inside the same namespace.
1975#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1976#[cfg_attr(feature = "builder", derive(TypedBuilder))]
1977#[cfg_attr(feature = "schemars", derive(JsonSchema))]
1978pub struct ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecImagePullSecrets {
1979    /// Name of the referent.
1980    /// This field is effectively required, but due to backwards compatibility is
1981    /// allowed to be empty. Instances of this type with an empty value here are
1982    /// almost certainly wrong.
1983    /// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
1984    #[serde(default, skip_serializing_if = "Option::is_none")]
1985    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
1986    pub name: Option<String>,
1987}
1988
1989/// If specified, the pod's resource requirements.
1990/// These values override the global resource configuration flags.
1991/// Note that when only specifying resource limits, ensure they are greater than or equal
1992/// to the corresponding global resource requests configured via controller flags
1993/// (--acme-http01-solver-resource-request-cpu, --acme-http01-solver-resource-request-memory).
1994/// Kubernetes will reject pod creation if limits are lower than requests, causing challenge failures.
1995#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1996#[cfg_attr(feature = "builder", derive(TypedBuilder))]
1997#[cfg_attr(feature = "schemars", derive(JsonSchema))]
1998pub struct ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecResources {
1999    /// Limits describes the maximum amount of compute resources allowed.
2000    /// More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
2001    #[serde(default, skip_serializing_if = "Option::is_none")]
2002    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2003    pub limits: Option<BTreeMap<String, IntOrString>>,
2004    /// Requests describes the minimum amount of compute resources required.
2005    /// If Requests is omitted for a container, it defaults to Limits if that is explicitly specified,
2006    /// otherwise to the global values configured via controller flags. Requests cannot exceed Limits.
2007    /// More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
2008    #[serde(default, skip_serializing_if = "Option::is_none")]
2009    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2010    pub requests: Option<BTreeMap<String, IntOrString>>,
2011}
2012
2013/// If specified, the pod's security context
2014#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2015#[cfg_attr(feature = "builder", derive(TypedBuilder))]
2016#[cfg_attr(feature = "schemars", derive(JsonSchema))]
2017pub struct ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecSecurityContext {
2018    /// A special supplemental group that applies to all containers in a pod.
2019    /// Some volume types allow the Kubelet to change the ownership of that volume
2020    /// to be owned by the pod:
2021    ///
2022    /// 1. The owning GID will be the FSGroup
2023    /// 2. The setgid bit is set (new files created in the volume will be owned by FSGroup)
2024    /// 3. The permission bits are OR'd with rw-rw----
2025    ///
2026    /// If unset, the Kubelet will not modify the ownership and permissions of any volume.
2027    /// Note that this field cannot be set when spec.os.name is windows.
2028    #[serde(default, skip_serializing_if = "Option::is_none", rename = "fsGroup")]
2029    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2030    pub fs_group: Option<i64>,
2031    /// fsGroupChangePolicy defines behavior of changing ownership and permission of the volume
2032    /// before being exposed inside Pod. This field will only apply to
2033    /// volume types which support fsGroup based ownership(and permissions).
2034    /// It will have no effect on ephemeral volume types such as: secret, configmaps
2035    /// and emptydir.
2036    /// Valid values are "OnRootMismatch" and "Always". If not specified, "Always" is used.
2037    /// Note that this field cannot be set when spec.os.name is windows.
2038    #[serde(
2039        default,
2040        skip_serializing_if = "Option::is_none",
2041        rename = "fsGroupChangePolicy"
2042    )]
2043    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2044    pub fs_group_change_policy: Option<String>,
2045    /// The GID to run the entrypoint of the container process.
2046    /// Uses runtime default if unset.
2047    /// May also be set in SecurityContext.  If set in both SecurityContext and
2048    /// PodSecurityContext, the value specified in SecurityContext takes precedence
2049    /// for that container.
2050    /// Note that this field cannot be set when spec.os.name is windows.
2051    #[serde(
2052        default,
2053        skip_serializing_if = "Option::is_none",
2054        rename = "runAsGroup"
2055    )]
2056    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2057    pub run_as_group: Option<i64>,
2058    /// Indicates that the container must run as a non-root user.
2059    /// If true, the Kubelet will validate the image at runtime to ensure that it
2060    /// does not run as UID 0 (root) and fail to start the container if it does.
2061    /// If unset or false, no such validation will be performed.
2062    /// May also be set in SecurityContext.  If set in both SecurityContext and
2063    /// PodSecurityContext, the value specified in SecurityContext takes precedence.
2064    #[serde(
2065        default,
2066        skip_serializing_if = "Option::is_none",
2067        rename = "runAsNonRoot"
2068    )]
2069    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2070    pub run_as_non_root: Option<bool>,
2071    /// The UID to run the entrypoint of the container process.
2072    /// Defaults to user specified in image metadata if unspecified.
2073    /// May also be set in SecurityContext.  If set in both SecurityContext and
2074    /// PodSecurityContext, the value specified in SecurityContext takes precedence
2075    /// for that container.
2076    /// Note that this field cannot be set when spec.os.name is windows.
2077    #[serde(default, skip_serializing_if = "Option::is_none", rename = "runAsUser")]
2078    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2079    pub run_as_user: Option<i64>,
2080    /// The SELinux context to be applied to all containers.
2081    /// If unspecified, the container runtime will allocate a random SELinux context for each
2082    /// container.  May also be set in SecurityContext.  If set in
2083    /// both SecurityContext and PodSecurityContext, the value specified in SecurityContext
2084    /// takes precedence for that container.
2085    /// Note that this field cannot be set when spec.os.name is windows.
2086    #[serde(
2087        default,
2088        skip_serializing_if = "Option::is_none",
2089        rename = "seLinuxOptions"
2090    )]
2091    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2092    pub se_linux_options:
2093        Option<ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecSecurityContextSeLinuxOptions>,
2094    /// The seccomp options to use by the containers in this pod.
2095    /// Note that this field cannot be set when spec.os.name is windows.
2096    #[serde(
2097        default,
2098        skip_serializing_if = "Option::is_none",
2099        rename = "seccompProfile"
2100    )]
2101    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2102    pub seccomp_profile:
2103        Option<ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecSecurityContextSeccompProfile>,
2104    /// A list of groups applied to the first process run in each container, in addition
2105    /// to the container's primary GID, the fsGroup (if specified), and group memberships
2106    /// defined in the container image for the uid of the container process. If unspecified,
2107    /// no additional groups are added to any container. Note that group memberships
2108    /// defined in the container image for the uid of the container process are still effective,
2109    /// even if they are not included in this list.
2110    /// Note that this field cannot be set when spec.os.name is windows.
2111    #[serde(
2112        default,
2113        skip_serializing_if = "Option::is_none",
2114        rename = "supplementalGroups"
2115    )]
2116    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2117    pub supplemental_groups: Option<Vec<i64>>,
2118    /// Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported
2119    /// sysctls (by the container runtime) might fail to launch.
2120    /// Note that this field cannot be set when spec.os.name is windows.
2121    #[serde(default, skip_serializing_if = "Option::is_none")]
2122    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2123    pub sysctls:
2124        Option<Vec<ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecSecurityContextSysctls>>,
2125}
2126
2127/// The SELinux context to be applied to all containers.
2128/// If unspecified, the container runtime will allocate a random SELinux context for each
2129/// container.  May also be set in SecurityContext.  If set in
2130/// both SecurityContext and PodSecurityContext, the value specified in SecurityContext
2131/// takes precedence for that container.
2132/// Note that this field cannot be set when spec.os.name is windows.
2133#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2134#[cfg_attr(feature = "builder", derive(TypedBuilder))]
2135#[cfg_attr(feature = "schemars", derive(JsonSchema))]
2136pub struct ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecSecurityContextSeLinuxOptions {
2137    /// Level is SELinux level label that applies to the container.
2138    #[serde(default, skip_serializing_if = "Option::is_none")]
2139    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2140    pub level: Option<String>,
2141    /// Role is a SELinux role label that applies to the container.
2142    #[serde(default, skip_serializing_if = "Option::is_none")]
2143    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2144    pub role: Option<String>,
2145    /// Type is a SELinux type label that applies to the container.
2146    #[serde(default, skip_serializing_if = "Option::is_none", rename = "type")]
2147    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2148    pub r#type: Option<String>,
2149    /// User is a SELinux user label that applies to the container.
2150    #[serde(default, skip_serializing_if = "Option::is_none")]
2151    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2152    pub user: Option<String>,
2153}
2154
2155/// The seccomp options to use by the containers in this pod.
2156/// Note that this field cannot be set when spec.os.name is windows.
2157#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2158#[cfg_attr(feature = "builder", derive(TypedBuilder))]
2159#[cfg_attr(feature = "schemars", derive(JsonSchema))]
2160pub struct ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecSecurityContextSeccompProfile {
2161    /// localhostProfile indicates a profile defined in a file on the node should be used.
2162    /// The profile must be preconfigured on the node to work.
2163    /// Must be a descending path, relative to the kubelet's configured seccomp profile location.
2164    /// Must be set if type is "Localhost". Must NOT be set for any other type.
2165    #[serde(
2166        default,
2167        skip_serializing_if = "Option::is_none",
2168        rename = "localhostProfile"
2169    )]
2170    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2171    pub localhost_profile: Option<String>,
2172    /// type indicates which kind of seccomp profile will be applied.
2173    /// Valid options are:
2174    ///
2175    /// Localhost - a profile defined in a file on the node should be used.
2176    /// RuntimeDefault - the container runtime default profile should be used.
2177    /// Unconfined - no profile should be applied.
2178    #[serde(rename = "type")]
2179    pub r#type: String,
2180}
2181
2182/// Sysctl defines a kernel parameter to be set
2183#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2184#[cfg_attr(feature = "builder", derive(TypedBuilder))]
2185#[cfg_attr(feature = "schemars", derive(JsonSchema))]
2186pub struct ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecSecurityContextSysctls {
2187    /// Name of a property to set
2188    pub name: String,
2189    /// Value of a property to set
2190    pub value: String,
2191}
2192
2193/// The pod this Toleration is attached to tolerates any taint that matches
2194/// the triple <key,value,effect> using the matching operator <operator>.
2195#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2196#[cfg_attr(feature = "builder", derive(TypedBuilder))]
2197#[cfg_attr(feature = "schemars", derive(JsonSchema))]
2198pub struct ChallengeSolverHttp01GatewayHttpRoutePodTemplateSpecTolerations {
2199    /// Effect indicates the taint effect to match. Empty means match all taint effects.
2200    /// When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.
2201    #[serde(default, skip_serializing_if = "Option::is_none")]
2202    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2203    pub effect: Option<String>,
2204    /// Key is the taint key that the toleration applies to. Empty means match all taint keys.
2205    /// If the key is empty, operator must be Exists; this combination means to match all values and all keys.
2206    #[serde(default, skip_serializing_if = "Option::is_none")]
2207    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2208    pub key: Option<String>,
2209    /// Operator represents a key's relationship to the value.
2210    /// Valid operators are Exists and Equal. Defaults to Equal.
2211    /// Exists is equivalent to wildcard for value, so that a pod can
2212    /// tolerate all taints of a particular category.
2213    #[serde(default, skip_serializing_if = "Option::is_none")]
2214    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2215    pub operator: Option<String>,
2216    /// TolerationSeconds represents the period of time the toleration (which must be
2217    /// of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default,
2218    /// it is not set, which means tolerate the taint forever (do not evict). Zero and
2219    /// negative values will be treated as 0 (evict immediately) by the system.
2220    #[serde(
2221        default,
2222        skip_serializing_if = "Option::is_none",
2223        rename = "tolerationSeconds"
2224    )]
2225    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2226    pub toleration_seconds: Option<i64>,
2227    /// Value is the taint value the toleration matches to.
2228    /// If the operator is Exists, the value should be empty, otherwise just a regular string.
2229    #[serde(default, skip_serializing_if = "Option::is_none")]
2230    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2231    pub value: Option<String>,
2232}
2233
2234/// The ingress based HTTP01 challenge solver will solve challenges by
2235/// creating or modifying Ingress resources in order to route requests for
2236/// '/.well-known/acme-challenge/XYZ' to 'challenge solver' pods that are
2237/// provisioned by cert-manager for each Challenge to be completed.
2238#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2239#[cfg_attr(feature = "builder", derive(TypedBuilder))]
2240#[cfg_attr(feature = "schemars", derive(JsonSchema))]
2241pub struct ChallengeSolverHttp01Ingress {
2242    /// This field configures the annotation `kubernetes.io/ingress.class` when
2243    /// creating Ingress resources to solve ACME challenges that use this
2244    /// challenge solver. Only one of `class`, `name` or `ingressClassName` may
2245    /// be specified.
2246    #[serde(default, skip_serializing_if = "Option::is_none")]
2247    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2248    pub class: Option<String>,
2249    /// This field configures the field `ingressClassName` on the created Ingress
2250    /// resources used to solve ACME challenges that use this challenge solver.
2251    /// This is the recommended way of configuring the ingress class. Only one of
2252    /// `class`, `name` or `ingressClassName` may be specified.
2253    #[serde(
2254        default,
2255        skip_serializing_if = "Option::is_none",
2256        rename = "ingressClassName"
2257    )]
2258    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2259    pub ingress_class_name: Option<String>,
2260    /// Optional ingress template used to configure the ACME challenge solver
2261    /// ingress used for HTTP01 challenges.
2262    #[serde(
2263        default,
2264        skip_serializing_if = "Option::is_none",
2265        rename = "ingressTemplate"
2266    )]
2267    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2268    pub ingress_template: Option<ChallengeSolverHttp01IngressIngressTemplate>,
2269    /// The name of the ingress resource that should have ACME challenge solving
2270    /// routes inserted into it in order to solve HTTP01 challenges.
2271    /// This is typically used in conjunction with ingress controllers like
2272    /// ingress-gce, which maintains a 1:1 mapping between external IPs and
2273    /// ingress resources. Only one of `class`, `name` or `ingressClassName` may
2274    /// be specified.
2275    #[serde(default, skip_serializing_if = "Option::is_none")]
2276    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2277    pub name: Option<String>,
2278    /// Optional pod template used to configure the ACME challenge solver pods
2279    /// used for HTTP01 challenges.
2280    #[serde(
2281        default,
2282        skip_serializing_if = "Option::is_none",
2283        rename = "podTemplate"
2284    )]
2285    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2286    pub pod_template: Option<ChallengeSolverHttp01IngressPodTemplate>,
2287    /// Optional service type for Kubernetes solver service. Supported values
2288    /// are NodePort or ClusterIP. If unset, defaults to NodePort.
2289    #[serde(
2290        default,
2291        skip_serializing_if = "Option::is_none",
2292        rename = "serviceType"
2293    )]
2294    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2295    pub service_type: Option<String>,
2296}
2297
2298/// Optional ingress template used to configure the ACME challenge solver
2299/// ingress used for HTTP01 challenges.
2300#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2301#[cfg_attr(feature = "builder", derive(TypedBuilder))]
2302#[cfg_attr(feature = "schemars", derive(JsonSchema))]
2303pub struct ChallengeSolverHttp01IngressIngressTemplate {
2304    /// ObjectMeta overrides for the ingress used to solve HTTP01 challenges.
2305    /// Only the 'labels' and 'annotations' fields may be set.
2306    /// If labels or annotations overlap with in-built values, the values here
2307    /// will override the in-built values.
2308    #[serde(default, skip_serializing_if = "Option::is_none")]
2309    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2310    pub metadata: Option<ChallengeSolverHttp01IngressIngressTemplateMetadata>,
2311}
2312
2313/// ObjectMeta overrides for the ingress used to solve HTTP01 challenges.
2314/// Only the 'labels' and 'annotations' fields may be set.
2315/// If labels or annotations overlap with in-built values, the values here
2316/// will override the in-built values.
2317#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2318#[cfg_attr(feature = "builder", derive(TypedBuilder))]
2319#[cfg_attr(feature = "schemars", derive(JsonSchema))]
2320pub struct ChallengeSolverHttp01IngressIngressTemplateMetadata {
2321    /// Annotations that should be added to the created ACME HTTP01 solver ingress.
2322    #[serde(default, skip_serializing_if = "Option::is_none")]
2323    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2324    pub annotations: Option<BTreeMap<String, String>>,
2325    /// Labels that should be added to the created ACME HTTP01 solver ingress.
2326    #[serde(default, skip_serializing_if = "Option::is_none")]
2327    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2328    pub labels: Option<BTreeMap<String, String>>,
2329}
2330
2331/// Optional pod template used to configure the ACME challenge solver pods
2332/// used for HTTP01 challenges.
2333#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2334#[cfg_attr(feature = "builder", derive(TypedBuilder))]
2335#[cfg_attr(feature = "schemars", derive(JsonSchema))]
2336pub struct ChallengeSolverHttp01IngressPodTemplate {
2337    /// ObjectMeta overrides for the pod used to solve HTTP01 challenges.
2338    /// Only the 'labels' and 'annotations' fields may be set.
2339    /// If labels or annotations overlap with in-built values, the values here
2340    /// will override the in-built values.
2341    #[serde(default, skip_serializing_if = "Option::is_none")]
2342    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2343    pub metadata: Option<ChallengeSolverHttp01IngressPodTemplateMetadata>,
2344    /// PodSpec defines overrides for the HTTP01 challenge solver pod.
2345    /// Check ACMEChallengeSolverHTTP01IngressPodSpec to find out currently supported fields.
2346    /// All other fields will be ignored.
2347    #[serde(default, skip_serializing_if = "Option::is_none")]
2348    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2349    pub spec: Option<ChallengeSolverHttp01IngressPodTemplateSpec>,
2350}
2351
2352/// ObjectMeta overrides for the pod used to solve HTTP01 challenges.
2353/// Only the 'labels' and 'annotations' fields may be set.
2354/// If labels or annotations overlap with in-built values, the values here
2355/// will override the in-built values.
2356#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2357#[cfg_attr(feature = "builder", derive(TypedBuilder))]
2358#[cfg_attr(feature = "schemars", derive(JsonSchema))]
2359pub struct ChallengeSolverHttp01IngressPodTemplateMetadata {
2360    /// Annotations that should be added to the created ACME HTTP01 solver pods.
2361    #[serde(default, skip_serializing_if = "Option::is_none")]
2362    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2363    pub annotations: Option<BTreeMap<String, String>>,
2364    /// Labels that should be added to the created ACME HTTP01 solver pods.
2365    #[serde(default, skip_serializing_if = "Option::is_none")]
2366    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2367    pub labels: Option<BTreeMap<String, String>>,
2368}
2369
2370/// PodSpec defines overrides for the HTTP01 challenge solver pod.
2371/// Check ACMEChallengeSolverHTTP01IngressPodSpec to find out currently supported fields.
2372/// All other fields will be ignored.
2373#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2374#[cfg_attr(feature = "builder", derive(TypedBuilder))]
2375#[cfg_attr(feature = "schemars", derive(JsonSchema))]
2376pub struct ChallengeSolverHttp01IngressPodTemplateSpec {
2377    /// If specified, the pod's scheduling constraints
2378    #[serde(default, skip_serializing_if = "Option::is_none")]
2379    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2380    pub affinity: Option<ChallengeSolverHttp01IngressPodTemplateSpecAffinity>,
2381    /// If specified, the pod's imagePullSecrets
2382    #[serde(
2383        default,
2384        skip_serializing_if = "Option::is_none",
2385        rename = "imagePullSecrets"
2386    )]
2387    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2388    pub image_pull_secrets:
2389        Option<Vec<ChallengeSolverHttp01IngressPodTemplateSpecImagePullSecrets>>,
2390    /// NodeSelector is a selector which must be true for the pod to fit on a node.
2391    /// Selector which must match a node's labels for the pod to be scheduled on that node.
2392    /// More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
2393    #[serde(
2394        default,
2395        skip_serializing_if = "Option::is_none",
2396        rename = "nodeSelector"
2397    )]
2398    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2399    pub node_selector: Option<BTreeMap<String, String>>,
2400    /// If specified, the pod's priorityClassName.
2401    #[serde(
2402        default,
2403        skip_serializing_if = "Option::is_none",
2404        rename = "priorityClassName"
2405    )]
2406    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2407    pub priority_class_name: Option<String>,
2408    /// If specified, the pod's resource requirements.
2409    /// These values override the global resource configuration flags.
2410    /// Note that when only specifying resource limits, ensure they are greater than or equal
2411    /// to the corresponding global resource requests configured via controller flags
2412    /// (--acme-http01-solver-resource-request-cpu, --acme-http01-solver-resource-request-memory).
2413    /// Kubernetes will reject pod creation if limits are lower than requests, causing challenge failures.
2414    #[serde(default, skip_serializing_if = "Option::is_none")]
2415    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2416    pub resources: Option<ChallengeSolverHttp01IngressPodTemplateSpecResources>,
2417    /// If specified, the pod's security context
2418    #[serde(
2419        default,
2420        skip_serializing_if = "Option::is_none",
2421        rename = "securityContext"
2422    )]
2423    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2424    pub security_context: Option<ChallengeSolverHttp01IngressPodTemplateSpecSecurityContext>,
2425    /// If specified, the pod's service account
2426    #[serde(
2427        default,
2428        skip_serializing_if = "Option::is_none",
2429        rename = "serviceAccountName"
2430    )]
2431    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2432    pub service_account_name: Option<String>,
2433    /// If specified, the pod's tolerations.
2434    #[serde(default, skip_serializing_if = "Option::is_none")]
2435    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2436    pub tolerations: Option<Vec<ChallengeSolverHttp01IngressPodTemplateSpecTolerations>>,
2437}
2438
2439/// If specified, the pod's scheduling constraints
2440#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2441#[cfg_attr(feature = "builder", derive(TypedBuilder))]
2442#[cfg_attr(feature = "schemars", derive(JsonSchema))]
2443pub struct ChallengeSolverHttp01IngressPodTemplateSpecAffinity {
2444    /// Describes node affinity scheduling rules for the pod.
2445    #[serde(
2446        default,
2447        skip_serializing_if = "Option::is_none",
2448        rename = "nodeAffinity"
2449    )]
2450    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2451    pub node_affinity: Option<ChallengeSolverHttp01IngressPodTemplateSpecAffinityNodeAffinity>,
2452    /// Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).
2453    #[serde(
2454        default,
2455        skip_serializing_if = "Option::is_none",
2456        rename = "podAffinity"
2457    )]
2458    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2459    pub pod_affinity: Option<ChallengeSolverHttp01IngressPodTemplateSpecAffinityPodAffinity>,
2460    /// Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).
2461    #[serde(
2462        default,
2463        skip_serializing_if = "Option::is_none",
2464        rename = "podAntiAffinity"
2465    )]
2466    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2467    pub pod_anti_affinity:
2468        Option<ChallengeSolverHttp01IngressPodTemplateSpecAffinityPodAntiAffinity>,
2469}
2470
2471/// Describes node affinity scheduling rules for the pod.
2472#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2473#[cfg_attr(feature = "builder", derive(TypedBuilder))]
2474#[cfg_attr(feature = "schemars", derive(JsonSchema))]
2475pub struct ChallengeSolverHttp01IngressPodTemplateSpecAffinityNodeAffinity {
2476    /// The scheduler will prefer to schedule pods to nodes that satisfy
2477    /// the affinity expressions specified by this field, but it may choose
2478    /// a node that violates one or more of the expressions. The node that is
2479    /// most preferred is the one with the greatest sum of weights, i.e.
2480    /// for each node that meets all of the scheduling requirements (resource
2481    /// request, requiredDuringScheduling affinity expressions, etc.),
2482    /// compute a sum by iterating through the elements of this field and adding
2483    /// "weight" to the sum if the node matches the corresponding matchExpressions; the
2484    /// node(s) with the highest sum are the most preferred.
2485    #[serde(default, skip_serializing_if = "Option::is_none", rename = "preferredDuringSchedulingIgnoredDuringExecution")]
2486#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2487    pub preferred_during_scheduling_ignored_during_execution: Option<Vec<ChallengeSolverHttp01IngressPodTemplateSpecAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecution>>,
2488    /// If the affinity requirements specified by this field are not met at
2489    /// scheduling time, the pod will not be scheduled onto the node.
2490    /// If the affinity requirements specified by this field cease to be met
2491    /// at some point during pod execution (e.g. due to an update), the system
2492    /// may or may not try to eventually evict the pod from its node.
2493    #[serde(default, skip_serializing_if = "Option::is_none", rename = "requiredDuringSchedulingIgnoredDuringExecution")]
2494#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2495    pub required_during_scheduling_ignored_during_execution: Option<ChallengeSolverHttp01IngressPodTemplateSpecAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecution>,
2496}
2497
2498/// An empty preferred scheduling term matches all objects with implicit weight 0
2499/// (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).
2500#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2501#[cfg_attr(feature = "builder", derive(TypedBuilder))]
2502#[cfg_attr(feature = "schemars", derive(JsonSchema))]
2503pub struct ChallengeSolverHttp01IngressPodTemplateSpecAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecution {
2504    /// A node selector term, associated with the corresponding weight.
2505    pub preference: ChallengeSolverHttp01IngressPodTemplateSpecAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionPreference,
2506    /// Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.
2507    pub weight: i32,
2508}
2509
2510/// A node selector term, associated with the corresponding weight.
2511#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2512#[cfg_attr(feature = "builder", derive(TypedBuilder))]
2513#[cfg_attr(feature = "schemars", derive(JsonSchema))]
2514pub struct ChallengeSolverHttp01IngressPodTemplateSpecAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionPreference {
2515    /// A list of node selector requirements by node's labels.
2516    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")]
2517#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2518    pub match_expressions: Option<Vec<ChallengeSolverHttp01IngressPodTemplateSpecAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionPreferenceMatchExpressions>>,
2519    /// A list of node selector requirements by node's fields.
2520    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchFields")]
2521#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2522    pub match_fields: Option<Vec<ChallengeSolverHttp01IngressPodTemplateSpecAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionPreferenceMatchFields>>,
2523}
2524
2525/// A node selector requirement is a selector that contains values, a key, and an operator
2526/// that relates the key and values.
2527#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2528#[cfg_attr(feature = "builder", derive(TypedBuilder))]
2529#[cfg_attr(feature = "schemars", derive(JsonSchema))]
2530pub struct ChallengeSolverHttp01IngressPodTemplateSpecAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionPreferenceMatchExpressions
2531{
2532    /// The label key that the selector applies to.
2533    pub key: String,
2534    /// Represents a key's relationship to a set of values.
2535    /// Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
2536    pub operator: String,
2537    /// An array of string values. If the operator is In or NotIn,
2538    /// the values array must be non-empty. If the operator is Exists or DoesNotExist,
2539    /// the values array must be empty. If the operator is Gt or Lt, the values
2540    /// array must have a single element, which will be interpreted as an integer.
2541    /// This array is replaced during a strategic merge patch.
2542    #[serde(default, skip_serializing_if = "Option::is_none")]
2543    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2544    pub values: Option<Vec<String>>,
2545}
2546
2547/// A node selector requirement is a selector that contains values, a key, and an operator
2548/// that relates the key and values.
2549#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2550#[cfg_attr(feature = "builder", derive(TypedBuilder))]
2551#[cfg_attr(feature = "schemars", derive(JsonSchema))]
2552pub struct ChallengeSolverHttp01IngressPodTemplateSpecAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionPreferenceMatchFields
2553{
2554    /// The label key that the selector applies to.
2555    pub key: String,
2556    /// Represents a key's relationship to a set of values.
2557    /// Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
2558    pub operator: String,
2559    /// An array of string values. If the operator is In or NotIn,
2560    /// the values array must be non-empty. If the operator is Exists or DoesNotExist,
2561    /// the values array must be empty. If the operator is Gt or Lt, the values
2562    /// array must have a single element, which will be interpreted as an integer.
2563    /// This array is replaced during a strategic merge patch.
2564    #[serde(default, skip_serializing_if = "Option::is_none")]
2565    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2566    pub values: Option<Vec<String>>,
2567}
2568
2569/// If the affinity requirements specified by this field are not met at
2570/// scheduling time, the pod will not be scheduled onto the node.
2571/// If the affinity requirements specified by this field cease to be met
2572/// at some point during pod execution (e.g. due to an update), the system
2573/// may or may not try to eventually evict the pod from its node.
2574#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2575#[cfg_attr(feature = "builder", derive(TypedBuilder))]
2576#[cfg_attr(feature = "schemars", derive(JsonSchema))]
2577pub struct ChallengeSolverHttp01IngressPodTemplateSpecAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecution {
2578    /// Required. A list of node selector terms. The terms are ORed.
2579    #[serde(rename = "nodeSelectorTerms")]
2580#[cfg_attr(feature = "builder", builder(default))]
2581    pub node_selector_terms: Vec<ChallengeSolverHttp01IngressPodTemplateSpecAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionNodeSelectorTerms>,
2582}
2583
2584/// A null or empty node selector term matches no objects. The requirements of
2585/// them are ANDed.
2586/// The TopologySelectorTerm type implements a subset of the NodeSelectorTerm.
2587#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2588#[cfg_attr(feature = "builder", derive(TypedBuilder))]
2589#[cfg_attr(feature = "schemars", derive(JsonSchema))]
2590pub struct ChallengeSolverHttp01IngressPodTemplateSpecAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionNodeSelectorTerms {
2591    /// A list of node selector requirements by node's labels.
2592    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")]
2593#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2594    pub match_expressions: Option<Vec<ChallengeSolverHttp01IngressPodTemplateSpecAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionNodeSelectorTermsMatchExpressions>>,
2595    /// A list of node selector requirements by node's fields.
2596    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchFields")]
2597#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2598    pub match_fields: Option<Vec<ChallengeSolverHttp01IngressPodTemplateSpecAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionNodeSelectorTermsMatchFields>>,
2599}
2600
2601/// A node selector requirement is a selector that contains values, a key, and an operator
2602/// that relates the key and values.
2603#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2604#[cfg_attr(feature = "builder", derive(TypedBuilder))]
2605#[cfg_attr(feature = "schemars", derive(JsonSchema))]
2606pub struct ChallengeSolverHttp01IngressPodTemplateSpecAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionNodeSelectorTermsMatchExpressions
2607{
2608    /// The label key that the selector applies to.
2609    pub key: String,
2610    /// Represents a key's relationship to a set of values.
2611    /// Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
2612    pub operator: String,
2613    /// An array of string values. If the operator is In or NotIn,
2614    /// the values array must be non-empty. If the operator is Exists or DoesNotExist,
2615    /// the values array must be empty. If the operator is Gt or Lt, the values
2616    /// array must have a single element, which will be interpreted as an integer.
2617    /// This array is replaced during a strategic merge patch.
2618    #[serde(default, skip_serializing_if = "Option::is_none")]
2619    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2620    pub values: Option<Vec<String>>,
2621}
2622
2623/// A node selector requirement is a selector that contains values, a key, and an operator
2624/// that relates the key and values.
2625#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2626#[cfg_attr(feature = "builder", derive(TypedBuilder))]
2627#[cfg_attr(feature = "schemars", derive(JsonSchema))]
2628pub struct ChallengeSolverHttp01IngressPodTemplateSpecAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionNodeSelectorTermsMatchFields
2629{
2630    /// The label key that the selector applies to.
2631    pub key: String,
2632    /// Represents a key's relationship to a set of values.
2633    /// Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
2634    pub operator: String,
2635    /// An array of string values. If the operator is In or NotIn,
2636    /// the values array must be non-empty. If the operator is Exists or DoesNotExist,
2637    /// the values array must be empty. If the operator is Gt or Lt, the values
2638    /// array must have a single element, which will be interpreted as an integer.
2639    /// This array is replaced during a strategic merge patch.
2640    #[serde(default, skip_serializing_if = "Option::is_none")]
2641    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2642    pub values: Option<Vec<String>>,
2643}
2644
2645/// Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).
2646#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2647#[cfg_attr(feature = "builder", derive(TypedBuilder))]
2648#[cfg_attr(feature = "schemars", derive(JsonSchema))]
2649pub struct ChallengeSolverHttp01IngressPodTemplateSpecAffinityPodAffinity {
2650    /// The scheduler will prefer to schedule pods to nodes that satisfy
2651    /// the affinity expressions specified by this field, but it may choose
2652    /// a node that violates one or more of the expressions. The node that is
2653    /// most preferred is the one with the greatest sum of weights, i.e.
2654    /// for each node that meets all of the scheduling requirements (resource
2655    /// request, requiredDuringScheduling affinity expressions, etc.),
2656    /// compute a sum by iterating through the elements of this field and adding
2657    /// "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the
2658    /// node(s) with the highest sum are the most preferred.
2659    #[serde(default, skip_serializing_if = "Option::is_none", rename = "preferredDuringSchedulingIgnoredDuringExecution")]
2660#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2661    pub preferred_during_scheduling_ignored_during_execution: Option<Vec<ChallengeSolverHttp01IngressPodTemplateSpecAffinityPodAffinityPreferredDuringSchedulingIgnoredDuringExecution>>,
2662    /// If the affinity requirements specified by this field are not met at
2663    /// scheduling time, the pod will not be scheduled onto the node.
2664    /// If the affinity requirements specified by this field cease to be met
2665    /// at some point during pod execution (e.g. due to a pod label update), the
2666    /// system may or may not try to eventually evict the pod from its node.
2667    /// When there are multiple elements, the lists of nodes corresponding to each
2668    /// podAffinityTerm are intersected, i.e. all terms must be satisfied.
2669    #[serde(default, skip_serializing_if = "Option::is_none", rename = "requiredDuringSchedulingIgnoredDuringExecution")]
2670#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2671    pub required_during_scheduling_ignored_during_execution: Option<Vec<ChallengeSolverHttp01IngressPodTemplateSpecAffinityPodAffinityRequiredDuringSchedulingIgnoredDuringExecution>>,
2672}
2673
2674/// The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)
2675#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2676#[cfg_attr(feature = "builder", derive(TypedBuilder))]
2677#[cfg_attr(feature = "schemars", derive(JsonSchema))]
2678pub struct ChallengeSolverHttp01IngressPodTemplateSpecAffinityPodAffinityPreferredDuringSchedulingIgnoredDuringExecution {
2679    /// Required. A pod affinity term, associated with the corresponding weight.
2680    #[serde(rename = "podAffinityTerm")]
2681    pub pod_affinity_term: ChallengeSolverHttp01IngressPodTemplateSpecAffinityPodAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTerm,
2682    /// weight associated with matching the corresponding podAffinityTerm,
2683    /// in the range 1-100.
2684    pub weight: i32,
2685}
2686
2687/// Required. A pod affinity term, associated with the corresponding weight.
2688#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2689#[cfg_attr(feature = "builder", derive(TypedBuilder))]
2690#[cfg_attr(feature = "schemars", derive(JsonSchema))]
2691pub struct ChallengeSolverHttp01IngressPodTemplateSpecAffinityPodAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTerm {
2692    /// A label query over a set of resources, in this case pods.
2693    /// If it's null, this PodAffinityTerm matches with no Pods.
2694    #[serde(default, skip_serializing_if = "Option::is_none", rename = "labelSelector")]
2695#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2696    pub label_selector: Option<ChallengeSolverHttp01IngressPodTemplateSpecAffinityPodAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermLabelSelector>,
2697    /// MatchLabelKeys is a set of pod label keys to select which pods will
2698    /// be taken into consideration. The keys are used to lookup values from the
2699    /// incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)`
2700    /// to select the group of existing pods which pods will be taken into consideration
2701    /// for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming
2702    /// pod labels will be ignored. The default value is empty.
2703    /// The same key is forbidden to exist in both matchLabelKeys and labelSelector.
2704    /// Also, matchLabelKeys cannot be set when labelSelector isn't set.
2705    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabelKeys")]
2706#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2707    pub match_label_keys: Option<Vec<String>>,
2708    /// MismatchLabelKeys is a set of pod label keys to select which pods will
2709    /// be taken into consideration. The keys are used to lookup values from the
2710    /// incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)`
2711    /// to select the group of existing pods which pods will be taken into consideration
2712    /// for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming
2713    /// pod labels will be ignored. The default value is empty.
2714    /// The same key is forbidden to exist in both mismatchLabelKeys and labelSelector.
2715    /// Also, mismatchLabelKeys cannot be set when labelSelector isn't set.
2716    #[serde(default, skip_serializing_if = "Option::is_none", rename = "mismatchLabelKeys")]
2717#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2718    pub mismatch_label_keys: Option<Vec<String>>,
2719    /// A label query over the set of namespaces that the term applies to.
2720    /// The term is applied to the union of the namespaces selected by this field
2721    /// and the ones listed in the namespaces field.
2722    /// null selector and null or empty namespaces list means "this pod's namespace".
2723    /// An empty selector ({}) matches all namespaces.
2724    #[serde(default, skip_serializing_if = "Option::is_none", rename = "namespaceSelector")]
2725#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2726    pub namespace_selector: Option<ChallengeSolverHttp01IngressPodTemplateSpecAffinityPodAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermNamespaceSelector>,
2727    /// namespaces specifies a static list of namespace names that the term applies to.
2728    /// The term is applied to the union of the namespaces listed in this field
2729    /// and the ones selected by namespaceSelector.
2730    /// null or empty namespaces list and null namespaceSelector means "this pod's namespace".
2731    #[serde(default, skip_serializing_if = "Option::is_none")]
2732#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2733    pub namespaces: Option<Vec<String>>,
2734    /// This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching
2735    /// the labelSelector in the specified namespaces, where co-located is defined as running on a node
2736    /// whose value of the label with key topologyKey matches that of any node on which any of the
2737    /// selected pods is running.
2738    /// Empty topologyKey is not allowed.
2739    #[serde(rename = "topologyKey")]
2740    pub topology_key: String,
2741}
2742
2743/// A label query over a set of resources, in this case pods.
2744/// If it's null, this PodAffinityTerm matches with no Pods.
2745#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2746#[cfg_attr(feature = "builder", derive(TypedBuilder))]
2747#[cfg_attr(feature = "schemars", derive(JsonSchema))]
2748pub struct ChallengeSolverHttp01IngressPodTemplateSpecAffinityPodAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermLabelSelector {
2749    /// matchExpressions is a list of label selector requirements. The requirements are ANDed.
2750    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")]
2751#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2752    pub match_expressions: Option<Vec<ChallengeSolverHttp01IngressPodTemplateSpecAffinityPodAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermLabelSelectorMatchExpressions>>,
2753    /// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
2754    /// map is equivalent to an element of matchExpressions, whose key field is "key", the
2755    /// operator is "In", and the values array contains only "value". The requirements are ANDed.
2756    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")]
2757#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2758    pub match_labels: Option<BTreeMap<String, String>>,
2759}
2760
2761/// A label selector requirement is a selector that contains values, a key, and an operator that
2762/// relates the key and values.
2763#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2764#[cfg_attr(feature = "builder", derive(TypedBuilder))]
2765#[cfg_attr(feature = "schemars", derive(JsonSchema))]
2766pub struct ChallengeSolverHttp01IngressPodTemplateSpecAffinityPodAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermLabelSelectorMatchExpressions
2767{
2768    /// key is the label key that the selector applies to.
2769    pub key: String,
2770    /// operator represents a key's relationship to a set of values.
2771    /// Valid operators are In, NotIn, Exists and DoesNotExist.
2772    pub operator: String,
2773    /// values is an array of string values. If the operator is In or NotIn,
2774    /// the values array must be non-empty. If the operator is Exists or DoesNotExist,
2775    /// the values array must be empty. This array is replaced during a strategic
2776    /// merge patch.
2777    #[serde(default, skip_serializing_if = "Option::is_none")]
2778    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2779    pub values: Option<Vec<String>>,
2780}
2781
2782/// A label query over the set of namespaces that the term applies to.
2783/// The term is applied to the union of the namespaces selected by this field
2784/// and the ones listed in the namespaces field.
2785/// null selector and null or empty namespaces list means "this pod's namespace".
2786/// An empty selector ({}) matches all namespaces.
2787#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2788#[cfg_attr(feature = "builder", derive(TypedBuilder))]
2789#[cfg_attr(feature = "schemars", derive(JsonSchema))]
2790pub struct ChallengeSolverHttp01IngressPodTemplateSpecAffinityPodAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermNamespaceSelector {
2791    /// matchExpressions is a list of label selector requirements. The requirements are ANDed.
2792    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")]
2793#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2794    pub match_expressions: Option<Vec<ChallengeSolverHttp01IngressPodTemplateSpecAffinityPodAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermNamespaceSelectorMatchExpressions>>,
2795    /// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
2796    /// map is equivalent to an element of matchExpressions, whose key field is "key", the
2797    /// operator is "In", and the values array contains only "value". The requirements are ANDed.
2798    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")]
2799#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2800    pub match_labels: Option<BTreeMap<String, String>>,
2801}
2802
2803/// A label selector requirement is a selector that contains values, a key, and an operator that
2804/// relates the key and values.
2805#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2806#[cfg_attr(feature = "builder", derive(TypedBuilder))]
2807#[cfg_attr(feature = "schemars", derive(JsonSchema))]
2808pub struct ChallengeSolverHttp01IngressPodTemplateSpecAffinityPodAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermNamespaceSelectorMatchExpressions
2809{
2810    /// key is the label key that the selector applies to.
2811    pub key: String,
2812    /// operator represents a key's relationship to a set of values.
2813    /// Valid operators are In, NotIn, Exists and DoesNotExist.
2814    pub operator: String,
2815    /// values is an array of string values. If the operator is In or NotIn,
2816    /// the values array must be non-empty. If the operator is Exists or DoesNotExist,
2817    /// the values array must be empty. This array is replaced during a strategic
2818    /// merge patch.
2819    #[serde(default, skip_serializing_if = "Option::is_none")]
2820    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2821    pub values: Option<Vec<String>>,
2822}
2823
2824/// Defines a set of pods (namely those matching the labelSelector
2825/// relative to the given namespace(s)) that this pod should be
2826/// co-located (affinity) or not co-located (anti-affinity) with,
2827/// where co-located is defined as running on a node whose value of
2828/// the label with key <topologyKey> matches that of any node on which
2829/// a pod of the set of pods is running
2830#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2831#[cfg_attr(feature = "builder", derive(TypedBuilder))]
2832#[cfg_attr(feature = "schemars", derive(JsonSchema))]
2833pub struct ChallengeSolverHttp01IngressPodTemplateSpecAffinityPodAffinityRequiredDuringSchedulingIgnoredDuringExecution {
2834    /// A label query over a set of resources, in this case pods.
2835    /// If it's null, this PodAffinityTerm matches with no Pods.
2836    #[serde(default, skip_serializing_if = "Option::is_none", rename = "labelSelector")]
2837#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2838    pub label_selector: Option<ChallengeSolverHttp01IngressPodTemplateSpecAffinityPodAffinityRequiredDuringSchedulingIgnoredDuringExecutionLabelSelector>,
2839    /// MatchLabelKeys is a set of pod label keys to select which pods will
2840    /// be taken into consideration. The keys are used to lookup values from the
2841    /// incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)`
2842    /// to select the group of existing pods which pods will be taken into consideration
2843    /// for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming
2844    /// pod labels will be ignored. The default value is empty.
2845    /// The same key is forbidden to exist in both matchLabelKeys and labelSelector.
2846    /// Also, matchLabelKeys cannot be set when labelSelector isn't set.
2847    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabelKeys")]
2848#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2849    pub match_label_keys: Option<Vec<String>>,
2850    /// MismatchLabelKeys is a set of pod label keys to select which pods will
2851    /// be taken into consideration. The keys are used to lookup values from the
2852    /// incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)`
2853    /// to select the group of existing pods which pods will be taken into consideration
2854    /// for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming
2855    /// pod labels will be ignored. The default value is empty.
2856    /// The same key is forbidden to exist in both mismatchLabelKeys and labelSelector.
2857    /// Also, mismatchLabelKeys cannot be set when labelSelector isn't set.
2858    #[serde(default, skip_serializing_if = "Option::is_none", rename = "mismatchLabelKeys")]
2859#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2860    pub mismatch_label_keys: Option<Vec<String>>,
2861    /// A label query over the set of namespaces that the term applies to.
2862    /// The term is applied to the union of the namespaces selected by this field
2863    /// and the ones listed in the namespaces field.
2864    /// null selector and null or empty namespaces list means "this pod's namespace".
2865    /// An empty selector ({}) matches all namespaces.
2866    #[serde(default, skip_serializing_if = "Option::is_none", rename = "namespaceSelector")]
2867#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2868    pub namespace_selector: Option<ChallengeSolverHttp01IngressPodTemplateSpecAffinityPodAffinityRequiredDuringSchedulingIgnoredDuringExecutionNamespaceSelector>,
2869    /// namespaces specifies a static list of namespace names that the term applies to.
2870    /// The term is applied to the union of the namespaces listed in this field
2871    /// and the ones selected by namespaceSelector.
2872    /// null or empty namespaces list and null namespaceSelector means "this pod's namespace".
2873    #[serde(default, skip_serializing_if = "Option::is_none")]
2874#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2875    pub namespaces: Option<Vec<String>>,
2876    /// This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching
2877    /// the labelSelector in the specified namespaces, where co-located is defined as running on a node
2878    /// whose value of the label with key topologyKey matches that of any node on which any of the
2879    /// selected pods is running.
2880    /// Empty topologyKey is not allowed.
2881    #[serde(rename = "topologyKey")]
2882    pub topology_key: String,
2883}
2884
2885/// A label query over a set of resources, in this case pods.
2886/// If it's null, this PodAffinityTerm matches with no Pods.
2887#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2888#[cfg_attr(feature = "builder", derive(TypedBuilder))]
2889#[cfg_attr(feature = "schemars", derive(JsonSchema))]
2890pub struct ChallengeSolverHttp01IngressPodTemplateSpecAffinityPodAffinityRequiredDuringSchedulingIgnoredDuringExecutionLabelSelector {
2891    /// matchExpressions is a list of label selector requirements. The requirements are ANDed.
2892    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")]
2893#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2894    pub match_expressions: Option<Vec<ChallengeSolverHttp01IngressPodTemplateSpecAffinityPodAffinityRequiredDuringSchedulingIgnoredDuringExecutionLabelSelectorMatchExpressions>>,
2895    /// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
2896    /// map is equivalent to an element of matchExpressions, whose key field is "key", the
2897    /// operator is "In", and the values array contains only "value". The requirements are ANDed.
2898    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")]
2899#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2900    pub match_labels: Option<BTreeMap<String, String>>,
2901}
2902
2903/// A label selector requirement is a selector that contains values, a key, and an operator that
2904/// relates the key and values.
2905#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2906#[cfg_attr(feature = "builder", derive(TypedBuilder))]
2907#[cfg_attr(feature = "schemars", derive(JsonSchema))]
2908pub struct ChallengeSolverHttp01IngressPodTemplateSpecAffinityPodAffinityRequiredDuringSchedulingIgnoredDuringExecutionLabelSelectorMatchExpressions
2909{
2910    /// key is the label key that the selector applies to.
2911    pub key: String,
2912    /// operator represents a key's relationship to a set of values.
2913    /// Valid operators are In, NotIn, Exists and DoesNotExist.
2914    pub operator: String,
2915    /// values is an array of string values. If the operator is In or NotIn,
2916    /// the values array must be non-empty. If the operator is Exists or DoesNotExist,
2917    /// the values array must be empty. This array is replaced during a strategic
2918    /// merge patch.
2919    #[serde(default, skip_serializing_if = "Option::is_none")]
2920    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2921    pub values: Option<Vec<String>>,
2922}
2923
2924/// A label query over the set of namespaces that the term applies to.
2925/// The term is applied to the union of the namespaces selected by this field
2926/// and the ones listed in the namespaces field.
2927/// null selector and null or empty namespaces list means "this pod's namespace".
2928/// An empty selector ({}) matches all namespaces.
2929#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2930#[cfg_attr(feature = "builder", derive(TypedBuilder))]
2931#[cfg_attr(feature = "schemars", derive(JsonSchema))]
2932pub struct ChallengeSolverHttp01IngressPodTemplateSpecAffinityPodAffinityRequiredDuringSchedulingIgnoredDuringExecutionNamespaceSelector {
2933    /// matchExpressions is a list of label selector requirements. The requirements are ANDed.
2934    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")]
2935#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2936    pub match_expressions: Option<Vec<ChallengeSolverHttp01IngressPodTemplateSpecAffinityPodAffinityRequiredDuringSchedulingIgnoredDuringExecutionNamespaceSelectorMatchExpressions>>,
2937    /// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
2938    /// map is equivalent to an element of matchExpressions, whose key field is "key", the
2939    /// operator is "In", and the values array contains only "value". The requirements are ANDed.
2940    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")]
2941#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2942    pub match_labels: Option<BTreeMap<String, String>>,
2943}
2944
2945/// A label selector requirement is a selector that contains values, a key, and an operator that
2946/// relates the key and values.
2947#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2948#[cfg_attr(feature = "builder", derive(TypedBuilder))]
2949#[cfg_attr(feature = "schemars", derive(JsonSchema))]
2950pub struct ChallengeSolverHttp01IngressPodTemplateSpecAffinityPodAffinityRequiredDuringSchedulingIgnoredDuringExecutionNamespaceSelectorMatchExpressions
2951{
2952    /// key is the label key that the selector applies to.
2953    pub key: String,
2954    /// operator represents a key's relationship to a set of values.
2955    /// Valid operators are In, NotIn, Exists and DoesNotExist.
2956    pub operator: String,
2957    /// values is an array of string values. If the operator is In or NotIn,
2958    /// the values array must be non-empty. If the operator is Exists or DoesNotExist,
2959    /// the values array must be empty. This array is replaced during a strategic
2960    /// merge patch.
2961    #[serde(default, skip_serializing_if = "Option::is_none")]
2962    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2963    pub values: Option<Vec<String>>,
2964}
2965
2966/// Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).
2967#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2968#[cfg_attr(feature = "builder", derive(TypedBuilder))]
2969#[cfg_attr(feature = "schemars", derive(JsonSchema))]
2970pub struct ChallengeSolverHttp01IngressPodTemplateSpecAffinityPodAntiAffinity {
2971    /// The scheduler will prefer to schedule pods to nodes that satisfy
2972    /// the anti-affinity expressions specified by this field, but it may choose
2973    /// a node that violates one or more of the expressions. The node that is
2974    /// most preferred is the one with the greatest sum of weights, i.e.
2975    /// for each node that meets all of the scheduling requirements (resource
2976    /// request, requiredDuringScheduling anti-affinity expressions, etc.),
2977    /// compute a sum by iterating through the elements of this field and subtracting
2978    /// "weight" from the sum if the node has pods which matches the corresponding podAffinityTerm; the
2979    /// node(s) with the highest sum are the most preferred.
2980    #[serde(default, skip_serializing_if = "Option::is_none", rename = "preferredDuringSchedulingIgnoredDuringExecution")]
2981#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2982    pub preferred_during_scheduling_ignored_during_execution: Option<Vec<ChallengeSolverHttp01IngressPodTemplateSpecAffinityPodAntiAffinityPreferredDuringSchedulingIgnoredDuringExecution>>,
2983    /// If the anti-affinity requirements specified by this field are not met at
2984    /// scheduling time, the pod will not be scheduled onto the node.
2985    /// If the anti-affinity requirements specified by this field cease to be met
2986    /// at some point during pod execution (e.g. due to a pod label update), the
2987    /// system may or may not try to eventually evict the pod from its node.
2988    /// When there are multiple elements, the lists of nodes corresponding to each
2989    /// podAffinityTerm are intersected, i.e. all terms must be satisfied.
2990    #[serde(default, skip_serializing_if = "Option::is_none", rename = "requiredDuringSchedulingIgnoredDuringExecution")]
2991#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
2992    pub required_during_scheduling_ignored_during_execution: Option<Vec<ChallengeSolverHttp01IngressPodTemplateSpecAffinityPodAntiAffinityRequiredDuringSchedulingIgnoredDuringExecution>>,
2993}
2994
2995/// The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)
2996#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2997#[cfg_attr(feature = "builder", derive(TypedBuilder))]
2998#[cfg_attr(feature = "schemars", derive(JsonSchema))]
2999pub struct ChallengeSolverHttp01IngressPodTemplateSpecAffinityPodAntiAffinityPreferredDuringSchedulingIgnoredDuringExecution {
3000    /// Required. A pod affinity term, associated with the corresponding weight.
3001    #[serde(rename = "podAffinityTerm")]
3002    pub pod_affinity_term: ChallengeSolverHttp01IngressPodTemplateSpecAffinityPodAntiAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTerm,
3003    /// weight associated with matching the corresponding podAffinityTerm,
3004    /// in the range 1-100.
3005    pub weight: i32,
3006}
3007
3008/// Required. A pod affinity term, associated with the corresponding weight.
3009#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
3010#[cfg_attr(feature = "builder", derive(TypedBuilder))]
3011#[cfg_attr(feature = "schemars", derive(JsonSchema))]
3012pub struct ChallengeSolverHttp01IngressPodTemplateSpecAffinityPodAntiAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTerm {
3013    /// A label query over a set of resources, in this case pods.
3014    /// If it's null, this PodAffinityTerm matches with no Pods.
3015    #[serde(default, skip_serializing_if = "Option::is_none", rename = "labelSelector")]
3016#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
3017    pub label_selector: Option<ChallengeSolverHttp01IngressPodTemplateSpecAffinityPodAntiAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermLabelSelector>,
3018    /// MatchLabelKeys is a set of pod label keys to select which pods will
3019    /// be taken into consideration. The keys are used to lookup values from the
3020    /// incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)`
3021    /// to select the group of existing pods which pods will be taken into consideration
3022    /// for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming
3023    /// pod labels will be ignored. The default value is empty.
3024    /// The same key is forbidden to exist in both matchLabelKeys and labelSelector.
3025    /// Also, matchLabelKeys cannot be set when labelSelector isn't set.
3026    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabelKeys")]
3027#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
3028    pub match_label_keys: Option<Vec<String>>,
3029    /// MismatchLabelKeys is a set of pod label keys to select which pods will
3030    /// be taken into consideration. The keys are used to lookup values from the
3031    /// incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)`
3032    /// to select the group of existing pods which pods will be taken into consideration
3033    /// for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming
3034    /// pod labels will be ignored. The default value is empty.
3035    /// The same key is forbidden to exist in both mismatchLabelKeys and labelSelector.
3036    /// Also, mismatchLabelKeys cannot be set when labelSelector isn't set.
3037    #[serde(default, skip_serializing_if = "Option::is_none", rename = "mismatchLabelKeys")]
3038#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
3039    pub mismatch_label_keys: Option<Vec<String>>,
3040    /// A label query over the set of namespaces that the term applies to.
3041    /// The term is applied to the union of the namespaces selected by this field
3042    /// and the ones listed in the namespaces field.
3043    /// null selector and null or empty namespaces list means "this pod's namespace".
3044    /// An empty selector ({}) matches all namespaces.
3045    #[serde(default, skip_serializing_if = "Option::is_none", rename = "namespaceSelector")]
3046#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
3047    pub namespace_selector: Option<ChallengeSolverHttp01IngressPodTemplateSpecAffinityPodAntiAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermNamespaceSelector>,
3048    /// namespaces specifies a static list of namespace names that the term applies to.
3049    /// The term is applied to the union of the namespaces listed in this field
3050    /// and the ones selected by namespaceSelector.
3051    /// null or empty namespaces list and null namespaceSelector means "this pod's namespace".
3052    #[serde(default, skip_serializing_if = "Option::is_none")]
3053#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
3054    pub namespaces: Option<Vec<String>>,
3055    /// This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching
3056    /// the labelSelector in the specified namespaces, where co-located is defined as running on a node
3057    /// whose value of the label with key topologyKey matches that of any node on which any of the
3058    /// selected pods is running.
3059    /// Empty topologyKey is not allowed.
3060    #[serde(rename = "topologyKey")]
3061    pub topology_key: String,
3062}
3063
3064/// A label query over a set of resources, in this case pods.
3065/// If it's null, this PodAffinityTerm matches with no Pods.
3066#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
3067#[cfg_attr(feature = "builder", derive(TypedBuilder))]
3068#[cfg_attr(feature = "schemars", derive(JsonSchema))]
3069pub struct ChallengeSolverHttp01IngressPodTemplateSpecAffinityPodAntiAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermLabelSelector {
3070    /// matchExpressions is a list of label selector requirements. The requirements are ANDed.
3071    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")]
3072#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
3073    pub match_expressions: Option<Vec<ChallengeSolverHttp01IngressPodTemplateSpecAffinityPodAntiAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermLabelSelectorMatchExpressions>>,
3074    /// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
3075    /// map is equivalent to an element of matchExpressions, whose key field is "key", the
3076    /// operator is "In", and the values array contains only "value". The requirements are ANDed.
3077    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")]
3078#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
3079    pub match_labels: Option<BTreeMap<String, String>>,
3080}
3081
3082/// A label selector requirement is a selector that contains values, a key, and an operator that
3083/// relates the key and values.
3084#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
3085#[cfg_attr(feature = "builder", derive(TypedBuilder))]
3086#[cfg_attr(feature = "schemars", derive(JsonSchema))]
3087pub struct ChallengeSolverHttp01IngressPodTemplateSpecAffinityPodAntiAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermLabelSelectorMatchExpressions
3088{
3089    /// key is the label key that the selector applies to.
3090    pub key: String,
3091    /// operator represents a key's relationship to a set of values.
3092    /// Valid operators are In, NotIn, Exists and DoesNotExist.
3093    pub operator: String,
3094    /// values is an array of string values. If the operator is In or NotIn,
3095    /// the values array must be non-empty. If the operator is Exists or DoesNotExist,
3096    /// the values array must be empty. This array is replaced during a strategic
3097    /// merge patch.
3098    #[serde(default, skip_serializing_if = "Option::is_none")]
3099    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
3100    pub values: Option<Vec<String>>,
3101}
3102
3103/// A label query over the set of namespaces that the term applies to.
3104/// The term is applied to the union of the namespaces selected by this field
3105/// and the ones listed in the namespaces field.
3106/// null selector and null or empty namespaces list means "this pod's namespace".
3107/// An empty selector ({}) matches all namespaces.
3108#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
3109#[cfg_attr(feature = "builder", derive(TypedBuilder))]
3110#[cfg_attr(feature = "schemars", derive(JsonSchema))]
3111pub struct ChallengeSolverHttp01IngressPodTemplateSpecAffinityPodAntiAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermNamespaceSelector {
3112    /// matchExpressions is a list of label selector requirements. The requirements are ANDed.
3113    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")]
3114#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
3115    pub match_expressions: Option<Vec<ChallengeSolverHttp01IngressPodTemplateSpecAffinityPodAntiAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermNamespaceSelectorMatchExpressions>>,
3116    /// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
3117    /// map is equivalent to an element of matchExpressions, whose key field is "key", the
3118    /// operator is "In", and the values array contains only "value". The requirements are ANDed.
3119    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")]
3120#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
3121    pub match_labels: Option<BTreeMap<String, String>>,
3122}
3123
3124/// A label selector requirement is a selector that contains values, a key, and an operator that
3125/// relates the key and values.
3126#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
3127#[cfg_attr(feature = "builder", derive(TypedBuilder))]
3128#[cfg_attr(feature = "schemars", derive(JsonSchema))]
3129pub struct ChallengeSolverHttp01IngressPodTemplateSpecAffinityPodAntiAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermNamespaceSelectorMatchExpressions
3130{
3131    /// key is the label key that the selector applies to.
3132    pub key: String,
3133    /// operator represents a key's relationship to a set of values.
3134    /// Valid operators are In, NotIn, Exists and DoesNotExist.
3135    pub operator: String,
3136    /// values is an array of string values. If the operator is In or NotIn,
3137    /// the values array must be non-empty. If the operator is Exists or DoesNotExist,
3138    /// the values array must be empty. This array is replaced during a strategic
3139    /// merge patch.
3140    #[serde(default, skip_serializing_if = "Option::is_none")]
3141    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
3142    pub values: Option<Vec<String>>,
3143}
3144
3145/// Defines a set of pods (namely those matching the labelSelector
3146/// relative to the given namespace(s)) that this pod should be
3147/// co-located (affinity) or not co-located (anti-affinity) with,
3148/// where co-located is defined as running on a node whose value of
3149/// the label with key <topologyKey> matches that of any node on which
3150/// a pod of the set of pods is running
3151#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
3152#[cfg_attr(feature = "builder", derive(TypedBuilder))]
3153#[cfg_attr(feature = "schemars", derive(JsonSchema))]
3154pub struct ChallengeSolverHttp01IngressPodTemplateSpecAffinityPodAntiAffinityRequiredDuringSchedulingIgnoredDuringExecution {
3155    /// A label query over a set of resources, in this case pods.
3156    /// If it's null, this PodAffinityTerm matches with no Pods.
3157    #[serde(default, skip_serializing_if = "Option::is_none", rename = "labelSelector")]
3158#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
3159    pub label_selector: Option<ChallengeSolverHttp01IngressPodTemplateSpecAffinityPodAntiAffinityRequiredDuringSchedulingIgnoredDuringExecutionLabelSelector>,
3160    /// MatchLabelKeys is a set of pod label keys to select which pods will
3161    /// be taken into consideration. The keys are used to lookup values from the
3162    /// incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)`
3163    /// to select the group of existing pods which pods will be taken into consideration
3164    /// for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming
3165    /// pod labels will be ignored. The default value is empty.
3166    /// The same key is forbidden to exist in both matchLabelKeys and labelSelector.
3167    /// Also, matchLabelKeys cannot be set when labelSelector isn't set.
3168    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabelKeys")]
3169#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
3170    pub match_label_keys: Option<Vec<String>>,
3171    /// MismatchLabelKeys is a set of pod label keys to select which pods will
3172    /// be taken into consideration. The keys are used to lookup values from the
3173    /// incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)`
3174    /// to select the group of existing pods which pods will be taken into consideration
3175    /// for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming
3176    /// pod labels will be ignored. The default value is empty.
3177    /// The same key is forbidden to exist in both mismatchLabelKeys and labelSelector.
3178    /// Also, mismatchLabelKeys cannot be set when labelSelector isn't set.
3179    #[serde(default, skip_serializing_if = "Option::is_none", rename = "mismatchLabelKeys")]
3180#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
3181    pub mismatch_label_keys: Option<Vec<String>>,
3182    /// A label query over the set of namespaces that the term applies to.
3183    /// The term is applied to the union of the namespaces selected by this field
3184    /// and the ones listed in the namespaces field.
3185    /// null selector and null or empty namespaces list means "this pod's namespace".
3186    /// An empty selector ({}) matches all namespaces.
3187    #[serde(default, skip_serializing_if = "Option::is_none", rename = "namespaceSelector")]
3188#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
3189    pub namespace_selector: Option<ChallengeSolverHttp01IngressPodTemplateSpecAffinityPodAntiAffinityRequiredDuringSchedulingIgnoredDuringExecutionNamespaceSelector>,
3190    /// namespaces specifies a static list of namespace names that the term applies to.
3191    /// The term is applied to the union of the namespaces listed in this field
3192    /// and the ones selected by namespaceSelector.
3193    /// null or empty namespaces list and null namespaceSelector means "this pod's namespace".
3194    #[serde(default, skip_serializing_if = "Option::is_none")]
3195#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
3196    pub namespaces: Option<Vec<String>>,
3197    /// This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching
3198    /// the labelSelector in the specified namespaces, where co-located is defined as running on a node
3199    /// whose value of the label with key topologyKey matches that of any node on which any of the
3200    /// selected pods is running.
3201    /// Empty topologyKey is not allowed.
3202    #[serde(rename = "topologyKey")]
3203    pub topology_key: String,
3204}
3205
3206/// A label query over a set of resources, in this case pods.
3207/// If it's null, this PodAffinityTerm matches with no Pods.
3208#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
3209#[cfg_attr(feature = "builder", derive(TypedBuilder))]
3210#[cfg_attr(feature = "schemars", derive(JsonSchema))]
3211pub struct ChallengeSolverHttp01IngressPodTemplateSpecAffinityPodAntiAffinityRequiredDuringSchedulingIgnoredDuringExecutionLabelSelector {
3212    /// matchExpressions is a list of label selector requirements. The requirements are ANDed.
3213    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")]
3214#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
3215    pub match_expressions: Option<Vec<ChallengeSolverHttp01IngressPodTemplateSpecAffinityPodAntiAffinityRequiredDuringSchedulingIgnoredDuringExecutionLabelSelectorMatchExpressions>>,
3216    /// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
3217    /// map is equivalent to an element of matchExpressions, whose key field is "key", the
3218    /// operator is "In", and the values array contains only "value". The requirements are ANDed.
3219    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")]
3220#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
3221    pub match_labels: Option<BTreeMap<String, String>>,
3222}
3223
3224/// A label selector requirement is a selector that contains values, a key, and an operator that
3225/// relates the key and values.
3226#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
3227#[cfg_attr(feature = "builder", derive(TypedBuilder))]
3228#[cfg_attr(feature = "schemars", derive(JsonSchema))]
3229pub struct ChallengeSolverHttp01IngressPodTemplateSpecAffinityPodAntiAffinityRequiredDuringSchedulingIgnoredDuringExecutionLabelSelectorMatchExpressions
3230{
3231    /// key is the label key that the selector applies to.
3232    pub key: String,
3233    /// operator represents a key's relationship to a set of values.
3234    /// Valid operators are In, NotIn, Exists and DoesNotExist.
3235    pub operator: String,
3236    /// values is an array of string values. If the operator is In or NotIn,
3237    /// the values array must be non-empty. If the operator is Exists or DoesNotExist,
3238    /// the values array must be empty. This array is replaced during a strategic
3239    /// merge patch.
3240    #[serde(default, skip_serializing_if = "Option::is_none")]
3241    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
3242    pub values: Option<Vec<String>>,
3243}
3244
3245/// A label query over the set of namespaces that the term applies to.
3246/// The term is applied to the union of the namespaces selected by this field
3247/// and the ones listed in the namespaces field.
3248/// null selector and null or empty namespaces list means "this pod's namespace".
3249/// An empty selector ({}) matches all namespaces.
3250#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
3251#[cfg_attr(feature = "builder", derive(TypedBuilder))]
3252#[cfg_attr(feature = "schemars", derive(JsonSchema))]
3253pub struct ChallengeSolverHttp01IngressPodTemplateSpecAffinityPodAntiAffinityRequiredDuringSchedulingIgnoredDuringExecutionNamespaceSelector {
3254    /// matchExpressions is a list of label selector requirements. The requirements are ANDed.
3255    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")]
3256#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
3257    pub match_expressions: Option<Vec<ChallengeSolverHttp01IngressPodTemplateSpecAffinityPodAntiAffinityRequiredDuringSchedulingIgnoredDuringExecutionNamespaceSelectorMatchExpressions>>,
3258    /// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
3259    /// map is equivalent to an element of matchExpressions, whose key field is "key", the
3260    /// operator is "In", and the values array contains only "value". The requirements are ANDed.
3261    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")]
3262#[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
3263    pub match_labels: Option<BTreeMap<String, String>>,
3264}
3265
3266/// A label selector requirement is a selector that contains values, a key, and an operator that
3267/// relates the key and values.
3268#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
3269#[cfg_attr(feature = "builder", derive(TypedBuilder))]
3270#[cfg_attr(feature = "schemars", derive(JsonSchema))]
3271pub struct ChallengeSolverHttp01IngressPodTemplateSpecAffinityPodAntiAffinityRequiredDuringSchedulingIgnoredDuringExecutionNamespaceSelectorMatchExpressions
3272{
3273    /// key is the label key that the selector applies to.
3274    pub key: String,
3275    /// operator represents a key's relationship to a set of values.
3276    /// Valid operators are In, NotIn, Exists and DoesNotExist.
3277    pub operator: String,
3278    /// values is an array of string values. If the operator is In or NotIn,
3279    /// the values array must be non-empty. If the operator is Exists or DoesNotExist,
3280    /// the values array must be empty. This array is replaced during a strategic
3281    /// merge patch.
3282    #[serde(default, skip_serializing_if = "Option::is_none")]
3283    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
3284    pub values: Option<Vec<String>>,
3285}
3286
3287/// LocalObjectReference contains enough information to let you locate the
3288/// referenced object inside the same namespace.
3289#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
3290#[cfg_attr(feature = "builder", derive(TypedBuilder))]
3291#[cfg_attr(feature = "schemars", derive(JsonSchema))]
3292pub struct ChallengeSolverHttp01IngressPodTemplateSpecImagePullSecrets {
3293    /// Name of the referent.
3294    /// This field is effectively required, but due to backwards compatibility is
3295    /// allowed to be empty. Instances of this type with an empty value here are
3296    /// almost certainly wrong.
3297    /// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
3298    #[serde(default, skip_serializing_if = "Option::is_none")]
3299    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
3300    pub name: Option<String>,
3301}
3302
3303/// If specified, the pod's resource requirements.
3304/// These values override the global resource configuration flags.
3305/// Note that when only specifying resource limits, ensure they are greater than or equal
3306/// to the corresponding global resource requests configured via controller flags
3307/// (--acme-http01-solver-resource-request-cpu, --acme-http01-solver-resource-request-memory).
3308/// Kubernetes will reject pod creation if limits are lower than requests, causing challenge failures.
3309#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
3310#[cfg_attr(feature = "builder", derive(TypedBuilder))]
3311#[cfg_attr(feature = "schemars", derive(JsonSchema))]
3312pub struct ChallengeSolverHttp01IngressPodTemplateSpecResources {
3313    /// Limits describes the maximum amount of compute resources allowed.
3314    /// More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
3315    #[serde(default, skip_serializing_if = "Option::is_none")]
3316    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
3317    pub limits: Option<BTreeMap<String, IntOrString>>,
3318    /// Requests describes the minimum amount of compute resources required.
3319    /// If Requests is omitted for a container, it defaults to Limits if that is explicitly specified,
3320    /// otherwise to the global values configured via controller flags. Requests cannot exceed Limits.
3321    /// More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
3322    #[serde(default, skip_serializing_if = "Option::is_none")]
3323    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
3324    pub requests: Option<BTreeMap<String, IntOrString>>,
3325}
3326
3327/// If specified, the pod's security context
3328#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
3329#[cfg_attr(feature = "builder", derive(TypedBuilder))]
3330#[cfg_attr(feature = "schemars", derive(JsonSchema))]
3331pub struct ChallengeSolverHttp01IngressPodTemplateSpecSecurityContext {
3332    /// A special supplemental group that applies to all containers in a pod.
3333    /// Some volume types allow the Kubelet to change the ownership of that volume
3334    /// to be owned by the pod:
3335    ///
3336    /// 1. The owning GID will be the FSGroup
3337    /// 2. The setgid bit is set (new files created in the volume will be owned by FSGroup)
3338    /// 3. The permission bits are OR'd with rw-rw----
3339    ///
3340    /// If unset, the Kubelet will not modify the ownership and permissions of any volume.
3341    /// Note that this field cannot be set when spec.os.name is windows.
3342    #[serde(default, skip_serializing_if = "Option::is_none", rename = "fsGroup")]
3343    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
3344    pub fs_group: Option<i64>,
3345    /// fsGroupChangePolicy defines behavior of changing ownership and permission of the volume
3346    /// before being exposed inside Pod. This field will only apply to
3347    /// volume types which support fsGroup based ownership(and permissions).
3348    /// It will have no effect on ephemeral volume types such as: secret, configmaps
3349    /// and emptydir.
3350    /// Valid values are "OnRootMismatch" and "Always". If not specified, "Always" is used.
3351    /// Note that this field cannot be set when spec.os.name is windows.
3352    #[serde(
3353        default,
3354        skip_serializing_if = "Option::is_none",
3355        rename = "fsGroupChangePolicy"
3356    )]
3357    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
3358    pub fs_group_change_policy: Option<String>,
3359    /// The GID to run the entrypoint of the container process.
3360    /// Uses runtime default if unset.
3361    /// May also be set in SecurityContext.  If set in both SecurityContext and
3362    /// PodSecurityContext, the value specified in SecurityContext takes precedence
3363    /// for that container.
3364    /// Note that this field cannot be set when spec.os.name is windows.
3365    #[serde(
3366        default,
3367        skip_serializing_if = "Option::is_none",
3368        rename = "runAsGroup"
3369    )]
3370    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
3371    pub run_as_group: Option<i64>,
3372    /// Indicates that the container must run as a non-root user.
3373    /// If true, the Kubelet will validate the image at runtime to ensure that it
3374    /// does not run as UID 0 (root) and fail to start the container if it does.
3375    /// If unset or false, no such validation will be performed.
3376    /// May also be set in SecurityContext.  If set in both SecurityContext and
3377    /// PodSecurityContext, the value specified in SecurityContext takes precedence.
3378    #[serde(
3379        default,
3380        skip_serializing_if = "Option::is_none",
3381        rename = "runAsNonRoot"
3382    )]
3383    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
3384    pub run_as_non_root: Option<bool>,
3385    /// The UID to run the entrypoint of the container process.
3386    /// Defaults to user specified in image metadata if unspecified.
3387    /// May also be set in SecurityContext.  If set in both SecurityContext and
3388    /// PodSecurityContext, the value specified in SecurityContext takes precedence
3389    /// for that container.
3390    /// Note that this field cannot be set when spec.os.name is windows.
3391    #[serde(default, skip_serializing_if = "Option::is_none", rename = "runAsUser")]
3392    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
3393    pub run_as_user: Option<i64>,
3394    /// The SELinux context to be applied to all containers.
3395    /// If unspecified, the container runtime will allocate a random SELinux context for each
3396    /// container.  May also be set in SecurityContext.  If set in
3397    /// both SecurityContext and PodSecurityContext, the value specified in SecurityContext
3398    /// takes precedence for that container.
3399    /// Note that this field cannot be set when spec.os.name is windows.
3400    #[serde(
3401        default,
3402        skip_serializing_if = "Option::is_none",
3403        rename = "seLinuxOptions"
3404    )]
3405    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
3406    pub se_linux_options:
3407        Option<ChallengeSolverHttp01IngressPodTemplateSpecSecurityContextSeLinuxOptions>,
3408    /// The seccomp options to use by the containers in this pod.
3409    /// Note that this field cannot be set when spec.os.name is windows.
3410    #[serde(
3411        default,
3412        skip_serializing_if = "Option::is_none",
3413        rename = "seccompProfile"
3414    )]
3415    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
3416    pub seccomp_profile:
3417        Option<ChallengeSolverHttp01IngressPodTemplateSpecSecurityContextSeccompProfile>,
3418    /// A list of groups applied to the first process run in each container, in addition
3419    /// to the container's primary GID, the fsGroup (if specified), and group memberships
3420    /// defined in the container image for the uid of the container process. If unspecified,
3421    /// no additional groups are added to any container. Note that group memberships
3422    /// defined in the container image for the uid of the container process are still effective,
3423    /// even if they are not included in this list.
3424    /// Note that this field cannot be set when spec.os.name is windows.
3425    #[serde(
3426        default,
3427        skip_serializing_if = "Option::is_none",
3428        rename = "supplementalGroups"
3429    )]
3430    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
3431    pub supplemental_groups: Option<Vec<i64>>,
3432    /// Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported
3433    /// sysctls (by the container runtime) might fail to launch.
3434    /// Note that this field cannot be set when spec.os.name is windows.
3435    #[serde(default, skip_serializing_if = "Option::is_none")]
3436    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
3437    pub sysctls: Option<Vec<ChallengeSolverHttp01IngressPodTemplateSpecSecurityContextSysctls>>,
3438}
3439
3440/// The SELinux context to be applied to all containers.
3441/// If unspecified, the container runtime will allocate a random SELinux context for each
3442/// container.  May also be set in SecurityContext.  If set in
3443/// both SecurityContext and PodSecurityContext, the value specified in SecurityContext
3444/// takes precedence for that container.
3445/// Note that this field cannot be set when spec.os.name is windows.
3446#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
3447#[cfg_attr(feature = "builder", derive(TypedBuilder))]
3448#[cfg_attr(feature = "schemars", derive(JsonSchema))]
3449pub struct ChallengeSolverHttp01IngressPodTemplateSpecSecurityContextSeLinuxOptions {
3450    /// Level is SELinux level label that applies to the container.
3451    #[serde(default, skip_serializing_if = "Option::is_none")]
3452    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
3453    pub level: Option<String>,
3454    /// Role is a SELinux role label that applies to the container.
3455    #[serde(default, skip_serializing_if = "Option::is_none")]
3456    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
3457    pub role: Option<String>,
3458    /// Type is a SELinux type label that applies to the container.
3459    #[serde(default, skip_serializing_if = "Option::is_none", rename = "type")]
3460    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
3461    pub r#type: Option<String>,
3462    /// User is a SELinux user label that applies to the container.
3463    #[serde(default, skip_serializing_if = "Option::is_none")]
3464    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
3465    pub user: Option<String>,
3466}
3467
3468/// The seccomp options to use by the containers in this pod.
3469/// Note that this field cannot be set when spec.os.name is windows.
3470#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
3471#[cfg_attr(feature = "builder", derive(TypedBuilder))]
3472#[cfg_attr(feature = "schemars", derive(JsonSchema))]
3473pub struct ChallengeSolverHttp01IngressPodTemplateSpecSecurityContextSeccompProfile {
3474    /// localhostProfile indicates a profile defined in a file on the node should be used.
3475    /// The profile must be preconfigured on the node to work.
3476    /// Must be a descending path, relative to the kubelet's configured seccomp profile location.
3477    /// Must be set if type is "Localhost". Must NOT be set for any other type.
3478    #[serde(
3479        default,
3480        skip_serializing_if = "Option::is_none",
3481        rename = "localhostProfile"
3482    )]
3483    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
3484    pub localhost_profile: Option<String>,
3485    /// type indicates which kind of seccomp profile will be applied.
3486    /// Valid options are:
3487    ///
3488    /// Localhost - a profile defined in a file on the node should be used.
3489    /// RuntimeDefault - the container runtime default profile should be used.
3490    /// Unconfined - no profile should be applied.
3491    #[serde(rename = "type")]
3492    pub r#type: String,
3493}
3494
3495/// Sysctl defines a kernel parameter to be set
3496#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
3497#[cfg_attr(feature = "builder", derive(TypedBuilder))]
3498#[cfg_attr(feature = "schemars", derive(JsonSchema))]
3499pub struct ChallengeSolverHttp01IngressPodTemplateSpecSecurityContextSysctls {
3500    /// Name of a property to set
3501    pub name: String,
3502    /// Value of a property to set
3503    pub value: String,
3504}
3505
3506/// The pod this Toleration is attached to tolerates any taint that matches
3507/// the triple <key,value,effect> using the matching operator <operator>.
3508#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
3509#[cfg_attr(feature = "builder", derive(TypedBuilder))]
3510#[cfg_attr(feature = "schemars", derive(JsonSchema))]
3511pub struct ChallengeSolverHttp01IngressPodTemplateSpecTolerations {
3512    /// Effect indicates the taint effect to match. Empty means match all taint effects.
3513    /// When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.
3514    #[serde(default, skip_serializing_if = "Option::is_none")]
3515    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
3516    pub effect: Option<String>,
3517    /// Key is the taint key that the toleration applies to. Empty means match all taint keys.
3518    /// If the key is empty, operator must be Exists; this combination means to match all values and all keys.
3519    #[serde(default, skip_serializing_if = "Option::is_none")]
3520    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
3521    pub key: Option<String>,
3522    /// Operator represents a key's relationship to the value.
3523    /// Valid operators are Exists and Equal. Defaults to Equal.
3524    /// Exists is equivalent to wildcard for value, so that a pod can
3525    /// tolerate all taints of a particular category.
3526    #[serde(default, skip_serializing_if = "Option::is_none")]
3527    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
3528    pub operator: Option<String>,
3529    /// TolerationSeconds represents the period of time the toleration (which must be
3530    /// of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default,
3531    /// it is not set, which means tolerate the taint forever (do not evict). Zero and
3532    /// negative values will be treated as 0 (evict immediately) by the system.
3533    #[serde(
3534        default,
3535        skip_serializing_if = "Option::is_none",
3536        rename = "tolerationSeconds"
3537    )]
3538    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
3539    pub toleration_seconds: Option<i64>,
3540    /// Value is the taint value the toleration matches to.
3541    /// If the operator is Exists, the value should be empty, otherwise just a regular string.
3542    #[serde(default, skip_serializing_if = "Option::is_none")]
3543    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
3544    pub value: Option<String>,
3545}
3546
3547/// Selector selects a set of DNSNames on the Certificate resource that
3548/// should be solved using this challenge solver.
3549/// If not specified, the solver will be treated as the 'default' solver
3550/// with the lowest priority, i.e. if any other solver has a more specific
3551/// match, it will be used instead.
3552#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
3553#[cfg_attr(feature = "builder", derive(TypedBuilder))]
3554#[cfg_attr(feature = "schemars", derive(JsonSchema))]
3555pub struct ChallengeSolverSelector {
3556    /// List of DNSNames that this solver will be used to solve.
3557    /// If specified and a match is found, a dnsNames selector will take
3558    /// precedence over a dnsZones selector.
3559    /// If multiple solvers match with the same dnsNames value, the solver
3560    /// with the most matching labels in matchLabels will be selected.
3561    /// If neither has more matches, the solver defined earlier in the list
3562    /// will be selected.
3563    #[serde(default, skip_serializing_if = "Option::is_none", rename = "dnsNames")]
3564    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
3565    pub dns_names: Option<Vec<String>>,
3566    /// List of DNSZones that this solver will be used to solve.
3567    /// The most specific DNS zone match specified here will take precedence
3568    /// over other DNS zone matches, so a solver specifying sys.example.com
3569    /// will be selected over one specifying example.com for the domain
3570    /// www.sys.example.com.
3571    /// If multiple solvers match with the same dnsZones value, the solver
3572    /// with the most matching labels in matchLabels will be selected.
3573    /// If neither has more matches, the solver defined earlier in the list
3574    /// will be selected.
3575    #[serde(default, skip_serializing_if = "Option::is_none", rename = "dnsZones")]
3576    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
3577    pub dns_zones: Option<Vec<String>>,
3578    /// A label selector that is used to refine the set of certificate's that
3579    /// this challenge solver will apply to.
3580    #[serde(
3581        default,
3582        skip_serializing_if = "Option::is_none",
3583        rename = "matchLabels"
3584    )]
3585    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
3586    pub match_labels: Option<BTreeMap<String, String>>,
3587}
3588
3589#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
3590#[cfg_attr(feature = "schemars", derive(JsonSchema))]
3591pub enum ChallengeType {
3592    #[serde(rename = "HTTP-01")]
3593    Http01,
3594    #[serde(rename = "DNS-01")]
3595    Dns01,
3596}
3597
3598#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
3599#[cfg_attr(feature = "builder", derive(TypedBuilder))]
3600#[cfg_attr(feature = "schemars", derive(JsonSchema))]
3601pub struct ChallengeStatus {
3602    /// presented will be set to true if the challenge values for this challenge
3603    /// are currently 'presented'.
3604    /// This *does not* imply the self check is passing. Only that the values
3605    /// have been 'submitted' for the appropriate challenge mechanism (i.e. the
3606    /// DNS01 TXT record has been presented, or the HTTP01 configuration has been
3607    /// configured).
3608    #[serde(default, skip_serializing_if = "Option::is_none")]
3609    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
3610    pub presented: Option<bool>,
3611    /// Used to denote whether this challenge should be processed or not.
3612    /// This field will only be set to true by the 'scheduling' component.
3613    /// It will only be set to false by the 'challenges' controller, after the
3614    /// challenge has reached a final state or timed out.
3615    /// If this field is set to false, the challenge controller will not take
3616    /// any more action.
3617    #[serde(default, skip_serializing_if = "Option::is_none")]
3618    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
3619    pub processing: Option<bool>,
3620    /// Contains human readable information on why the Challenge is in the
3621    /// current state.
3622    #[serde(default, skip_serializing_if = "Option::is_none")]
3623    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
3624    pub reason: Option<String>,
3625    /// Contains the current 'state' of the challenge.
3626    /// If not set, the state of the challenge is unknown.
3627    #[serde(default, skip_serializing_if = "Option::is_none")]
3628    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
3629    pub state: Option<ChallengeStatusState>,
3630}
3631
3632#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
3633#[cfg_attr(feature = "schemars", derive(JsonSchema))]
3634pub enum ChallengeStatusState {
3635    #[serde(rename = "valid")]
3636    Valid,
3637    #[serde(rename = "ready")]
3638    Ready,
3639    #[serde(rename = "pending")]
3640    Pending,
3641    #[serde(rename = "processing")]
3642    Processing,
3643    #[serde(rename = "invalid")]
3644    Invalid,
3645    #[serde(rename = "expired")]
3646    Expired,
3647    #[serde(rename = "errored")]
3648    Errored,
3649}