pub enum KubernetesClientConfig {
InCluster {
additional_headers: Option<HashMap<String, String>>,
namespace: Option<String>,
},
Kubeconfig {
additional_headers: Option<HashMap<String, String>>,
cluster: Option<String>,
context: Option<String>,
kubeconfig_path: Option<String>,
namespace: Option<String>,
user: Option<String>,
},
Manual {
additional_headers: HashMap<String, String>,
certificate_authority_data: Option<String>,
client_certificate_data: Option<String>,
client_key_data: Option<String>,
insecure_skip_tls_verify: Option<bool>,
namespace: Option<String>,
password: Option<String>,
server_url: String,
token: Option<String>,
username: Option<String>,
},
}Expand description
Configuration mode for Kubernetes access
JSON schema
{
"description": "Configuration mode for Kubernetes access",
"oneOf": [
{
"description": "Use in-cluster configuration (service account tokens, etc.)",
"type": "object",
"required": [
"mode"
],
"properties": {
"additional_headers": {
"description": "Additional headers to include in requests",
"type": [
"object",
"null"
],
"additionalProperties": {
"type": "string"
}
},
"mode": {
"type": "string",
"enum": [
"inCluster"
]
},
"namespace": {
"description": "The namespace to operate in",
"type": [
"string",
"null"
]
}
}
},
{
"description": "Use kubeconfig file for configuration",
"type": "object",
"required": [
"mode"
],
"properties": {
"additional_headers": {
"description": "Additional headers to include in requests",
"type": [
"object",
"null"
],
"additionalProperties": {
"type": "string"
}
},
"cluster": {
"description": "Cluster name to use (optional, defaults to context's cluster)",
"type": [
"string",
"null"
]
},
"context": {
"description": "Context name to use (optional, defaults to current-context)",
"type": [
"string",
"null"
]
},
"kubeconfig_path": {
"description": "Path to kubeconfig file (optional, defaults to standard locations)",
"type": [
"string",
"null"
]
},
"mode": {
"type": "string",
"enum": [
"kubeconfig"
]
},
"namespace": {
"description": "The namespace to operate in",
"type": [
"string",
"null"
]
},
"user": {
"description": "User name to use (optional, defaults to context's user)",
"type": [
"string",
"null"
]
}
}
},
{
"description": "Manual configuration with explicit values",
"type": "object",
"required": [
"additional_headers",
"mode",
"server_url"
],
"properties": {
"additional_headers": {
"description": "Additional headers to include in requests",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"certificate_authority_data": {
"description": "The cluster certificate authority data (base64 encoded)",
"type": [
"string",
"null"
]
},
"client_certificate_data": {
"description": "Client certificate data (base64 encoded) for mutual TLS",
"type": [
"string",
"null"
]
},
"client_key_data": {
"description": "Client key data (base64 encoded) for mutual TLS",
"type": [
"string",
"null"
]
},
"insecure_skip_tls_verify": {
"description": "Skip TLS verification (insecure)",
"type": [
"boolean",
"null"
]
},
"mode": {
"type": "string",
"enum": [
"manual"
]
},
"namespace": {
"description": "The namespace to operate in",
"type": [
"string",
"null"
]
},
"password": {
"description": "Password for basic authentication",
"type": [
"string",
"null"
]
},
"server_url": {
"description": "The Kubernetes cluster server URL",
"type": "string"
},
"token": {
"description": "Bearer token for authentication",
"type": [
"string",
"null"
]
},
"username": {
"description": "Username for basic authentication",
"type": [
"string",
"null"
]
}
}
}
]
}Variants§
InCluster
Use in-cluster configuration (service account tokens, etc.)
Fields
Kubeconfig
Use kubeconfig file for configuration
Fields
Manual
Manual configuration with explicit values
Fields
The cluster certificate authority data (base64 encoded)
Trait Implementations§
Source§impl Clone for KubernetesClientConfig
impl Clone for KubernetesClientConfig
Source§fn clone(&self) -> KubernetesClientConfig
fn clone(&self) -> KubernetesClientConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for KubernetesClientConfig
impl Debug for KubernetesClientConfig
Source§impl<'de> Deserialize<'de> for KubernetesClientConfig
impl<'de> Deserialize<'de> for KubernetesClientConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&KubernetesClientConfig> for KubernetesClientConfig
impl From<&KubernetesClientConfig> for KubernetesClientConfig
Source§fn from(value: &KubernetesClientConfig) -> Self
fn from(value: &KubernetesClientConfig) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for KubernetesClientConfig
impl RefUnwindSafe for KubernetesClientConfig
impl Send for KubernetesClientConfig
impl Sync for KubernetesClientConfig
impl Unpin for KubernetesClientConfig
impl UnsafeUnpin for KubernetesClientConfig
impl UnwindSafe for KubernetesClientConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more