pub struct Client { /* private fields */ }Expand description
Ported from Client in client.go.
Unlike Go’s NewClient(kubeconfig string), which reads the
CommandRunner from an ambient context.Context on every call, this
takes the executor explicitly at construction, matching
docker::Client/git::Client/kubectl::Client.
kubeconfig’s materialization into a temp file + KUBECONFIG env var
(Go’s kubeconfigEnv, backed by internal/kubeconfig) mirrors
kubectl::Client::kubeconfig_env, which itself mirrors
k3d::Driver’s TempKubeconfigGuard – all three exist because
xianyun up’s k3d driver uses --kubeconfig-update-default=false, so
nothing writes the cluster’s kubeconfig to ~/.kube/config; every
client that talks to the cluster has to point itself at the real
kubeconfig explicitly or it silently falls back to
localhost:8080/the ambient default. Closed alongside kubectl’s own
fix (see PORT_NOTES.md): an empty kubeconfig (Go’s no-op path)
means kubeconfig_env returns None and every call behaves exactly
as before.
Implementations§
Trait Implementations§
Source§impl Backend for Client
impl Backend for Client
Source§fn install(
&self,
release_name: &str,
chart_path: &str,
args: &[&str],
) -> Result<(), ExecError>
fn install( &self, release_name: &str, chart_path: &str, args: &[&str], ) -> Result<(), ExecError>
args should include all flags and values
for the install command.Source§fn uninstall(
&self,
release_name: &str,
namespace: &str,
) -> Result<(), ExecError>
fn uninstall( &self, release_name: &str, namespace: &str, ) -> Result<(), ExecError>
Source§fn upgrade(
&self,
release_name: &str,
chart_path: &str,
args: &[&str],
) -> Result<(), ExecError>
fn upgrade( &self, release_name: &str, chart_path: &str, args: &[&str], ) -> Result<(), ExecError>
args should include all flags and
values for the upgrade command.Source§fn list(&self, namespace: &str, filter: &str) -> Result<String, ExecError>
fn list(&self, namespace: &str, filter: &str) -> Result<String, ExecError>
helm list.Source§fn repo_list(&self) -> Result<String, ExecError>
fn repo_list(&self) -> Result<String, ExecError>
helm repo list.Source§fn repo_add(
&self,
name: &str,
url: &str,
force_update: bool,
) -> Result<(), ExecError>
fn repo_add( &self, name: &str, url: &str, force_update: bool, ) -> Result<(), ExecError>
force_update is true.Source§fn repo_update(&self, name: &str) -> Result<(), ExecError>
fn repo_update(&self, name: &str) -> Result<(), ExecError>
Source§fn pull(&self, chart_ref: &str, untar_dir: &str) -> Result<(), ExecError>
fn pull(&self, chart_ref: &str, untar_dir: &str) -> Result<(), ExecError>
untar_dir, which must be
freshly created.Auto Trait Implementations§
impl !RefUnwindSafe for Client
impl !UnwindSafe for Client
impl Freeze for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnsafeUnpin for Client
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more