k8s_traefik_api/
serverstransports.rs

1// WARNING: generated by kopium - manual changes will be overwritten
2// kopium command: kopium serverstransports.traefik.io -A -b --derive=Default --derive=PartialEq --smart-derive-elision
3// kopium version: 0.21.2
4
5#[allow(unused_imports)]
6mod prelude {
7    pub use kube::CustomResource;
8    pub use typed_builder::TypedBuilder;
9    pub use schemars::JsonSchema;
10    pub use serde::{Serialize, Deserialize};
11    pub use k8s_openapi::apimachinery::pkg::util::intstr::IntOrString;
12}
13use self::prelude::*;
14
15/// ServersTransportSpec defines the desired state of a ServersTransport.
16#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, TypedBuilder, Default, PartialEq, JsonSchema)]
17#[kube(group = "traefik.io", version = "v1alpha1", kind = "ServersTransport", plural = "serverstransports")]
18#[kube(namespaced)]
19#[kube(derive="Default")]
20#[kube(derive="PartialEq")]
21pub struct ServersTransportSpec {
22    /// CertificatesSecrets defines a list of secret storing client certificates for mTLS.
23    #[serde(default, skip_serializing_if = "Option::is_none", rename = "certificatesSecrets")]
24    #[builder(default, setter(strip_option))]
25    pub certificates_secrets: Option<Vec<String>>,
26    /// DisableHTTP2 disables HTTP/2 for connections with backend servers.
27    #[serde(default, skip_serializing_if = "Option::is_none", rename = "disableHTTP2")]
28    #[builder(default, setter(strip_option))]
29    pub disable_http2: Option<bool>,
30    /// ForwardingTimeouts defines the timeouts for requests forwarded to the backend servers.
31    #[serde(default, skip_serializing_if = "Option::is_none", rename = "forwardingTimeouts")]
32    #[builder(default, setter(strip_option))]
33    pub forwarding_timeouts: Option<ServersTransportForwardingTimeouts>,
34    /// InsecureSkipVerify disables SSL certificate verification.
35    #[serde(default, skip_serializing_if = "Option::is_none", rename = "insecureSkipVerify")]
36    #[builder(default, setter(strip_option))]
37    pub insecure_skip_verify: Option<bool>,
38    /// MaxIdleConnsPerHost controls the maximum idle (keep-alive) to keep per-host.
39    #[serde(default, skip_serializing_if = "Option::is_none", rename = "maxIdleConnsPerHost")]
40    #[builder(default, setter(strip_option))]
41    pub max_idle_conns_per_host: Option<i64>,
42    /// PeerCertURI defines the peer cert URI used to match against SAN URI during the peer certificate verification.
43    #[serde(default, skip_serializing_if = "Option::is_none", rename = "peerCertURI")]
44    #[builder(default, setter(strip_option))]
45    pub peer_cert_uri: Option<String>,
46    /// RootCAsSecrets defines a list of CA secret used to validate self-signed certificate.
47    #[serde(default, skip_serializing_if = "Option::is_none", rename = "rootCAsSecrets")]
48    #[builder(default, setter(strip_option))]
49    pub root_c_as_secrets: Option<Vec<String>>,
50    /// ServerName defines the server name used to contact the server.
51    #[serde(default, skip_serializing_if = "Option::is_none", rename = "serverName")]
52    #[builder(default, setter(strip_option))]
53    pub server_name: Option<String>,
54    /// Spiffe defines the SPIFFE configuration.
55    #[serde(default, skip_serializing_if = "Option::is_none")]
56    #[builder(default, setter(strip_option))]
57    pub spiffe: Option<ServersTransportSpiffe>,
58}
59
60/// ForwardingTimeouts defines the timeouts for requests forwarded to the backend servers.
61#[derive(Serialize, Deserialize, Clone, Debug, TypedBuilder, Default, PartialEq, JsonSchema)]
62pub struct ServersTransportForwardingTimeouts {
63    /// DialTimeout is the amount of time to wait until a connection to a backend server can be established.
64    #[serde(default, skip_serializing_if = "Option::is_none", rename = "dialTimeout")]
65    #[builder(default, setter(strip_option))]
66    pub dial_timeout: Option<IntOrString>,
67    /// IdleConnTimeout is the maximum period for which an idle HTTP keep-alive connection will remain open before closing itself.
68    #[serde(default, skip_serializing_if = "Option::is_none", rename = "idleConnTimeout")]
69    #[builder(default, setter(strip_option))]
70    pub idle_conn_timeout: Option<IntOrString>,
71    /// PingTimeout is the timeout after which the HTTP/2 connection will be closed if a response to ping is not received.
72    #[serde(default, skip_serializing_if = "Option::is_none", rename = "pingTimeout")]
73    #[builder(default, setter(strip_option))]
74    pub ping_timeout: Option<IntOrString>,
75    /// ReadIdleTimeout is the timeout after which a health check using ping frame will be carried out if no frame is received on the HTTP/2 connection.
76    #[serde(default, skip_serializing_if = "Option::is_none", rename = "readIdleTimeout")]
77    #[builder(default, setter(strip_option))]
78    pub read_idle_timeout: Option<IntOrString>,
79    /// ResponseHeaderTimeout is the amount of time to wait for a server's response headers after fully writing the request (including its body, if any).
80    #[serde(default, skip_serializing_if = "Option::is_none", rename = "responseHeaderTimeout")]
81    #[builder(default, setter(strip_option))]
82    pub response_header_timeout: Option<IntOrString>,
83}
84
85/// Spiffe defines the SPIFFE configuration.
86#[derive(Serialize, Deserialize, Clone, Debug, TypedBuilder, Default, PartialEq, JsonSchema)]
87pub struct ServersTransportSpiffe {
88    /// IDs defines the allowed SPIFFE IDs (takes precedence over the SPIFFE TrustDomain).
89    #[serde(default, skip_serializing_if = "Option::is_none")]
90    #[builder(default, setter(strip_option))]
91    pub ids: Option<Vec<String>>,
92    /// TrustDomain defines the allowed SPIFFE trust domain.
93    #[serde(default, skip_serializing_if = "Option::is_none", rename = "trustDomain")]
94    #[builder(default, setter(strip_option))]
95    pub trust_domain: Option<String>,
96}
97