Struct kubert::client::ClientArgs
source · [−]pub struct ClientArgs {
pub cluster: Option<String>,
pub context: Option<String>,
pub user: Option<String>,
pub kubeconfig: Option<PathBuf>,
pub impersonate_user: Option<String>,
pub impersonate_group: Option<String>,
}
client
only.Expand description
Configures a Kubernetes client
Fields
cluster: Option<String>
The name of the kubeconfig cluster to use
context: Option<String>
The name of the kubeconfig context to use
user: Option<String>
The name of the kubeconfig user to use
kubeconfig: Option<PathBuf>
The path to the kubeconfig file to use
impersonate_user: Option<String>
Username to impersonate for Kubernetes operations
impersonate_group: Option<String>
Group to impersonate for Kubernetes operations
Implementations
sourceimpl ClientArgs
impl ClientArgs
sourcepub async fn try_client(self) -> Result<Client, ConfigError>
pub async fn try_client(self) -> Result<Client, ConfigError>
Initializes a Kubernetes client
This will respect the $KUBECONFIG
environment variable, but otherwise default to
~/.kube/config
. The current-context is used unless context
is set.
This is basically equivalent to using kube_client::Client::try_default
, except that it
supports kubeconfig configuration from the command-line.
Trait Implementations
sourceimpl Clone for ClientArgs
impl Clone for ClientArgs
sourcefn clone(&self) -> ClientArgs
fn clone(&self) -> ClientArgs
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ClientArgs
impl Debug for ClientArgs
sourceimpl Default for ClientArgs
impl Default for ClientArgs
sourcefn default() -> ClientArgs
fn default() -> ClientArgs
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for ClientArgs
impl Send for ClientArgs
impl Sync for ClientArgs
impl Unpin for ClientArgs
impl UnwindSafe for ClientArgs
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more