Skip to main content

Backend

Trait Backend 

Source
pub trait Backend {
    // Required methods
    fn install(
        &self,
        release_name: &str,
        chart_path: &str,
        args: &[&str],
    ) -> Result<(), ExecError>;
    fn uninstall(
        &self,
        release_name: &str,
        namespace: &str,
    ) -> Result<(), ExecError>;
    fn upgrade(
        &self,
        release_name: &str,
        chart_path: &str,
        args: &[&str],
    ) -> Result<(), ExecError>;
    fn list(&self, namespace: &str, filter: &str) -> Result<String, ExecError>;
    fn repo_list(&self) -> Result<String, ExecError>;
    fn repo_add(
        &self,
        name: &str,
        url: &str,
        force_update: bool,
    ) -> Result<(), ExecError>;
    fn repo_update(&self, name: &str) -> Result<(), ExecError>;
    fn pull(&self, chart_ref: &str, untar_dir: &str) -> Result<(), ExecError>;
    fn dependency_list(&self, chart_dir: &str) -> Result<String, ExecError>;
    fn dependency_build(
        &self,
        chart_dir: &str,
        skip_refresh: bool,
    ) -> Result<(), ExecError>;
}
Expand description

Ported from the Backend interface in interface.go.

Required Methods§

Source

fn install( &self, release_name: &str, chart_path: &str, args: &[&str], ) -> Result<(), ExecError>

Installs a Helm chart. args should include all flags and values for the install command.

Source

fn uninstall( &self, release_name: &str, namespace: &str, ) -> Result<(), ExecError>

Uninstalls a Helm release.

Source

fn upgrade( &self, release_name: &str, chart_path: &str, args: &[&str], ) -> Result<(), ExecError>

Upgrades a Helm release. args should include all flags and values for the upgrade command.

Source

fn list(&self, namespace: &str, filter: &str) -> Result<String, ExecError>

Lists Helm releases in a namespace. Returns JSON output from helm list.

Source

fn repo_list(&self) -> Result<String, ExecError>

Lists configured Helm repositories. Returns JSON output from helm repo list.

Source

fn repo_add( &self, name: &str, url: &str, force_update: bool, ) -> Result<(), ExecError>

Adds a Helm repository, or updates it if force_update is true.

Source

fn repo_update(&self, name: &str) -> Result<(), ExecError>

Updates a specific Helm repository to fetch the latest charts.

Source

fn pull(&self, chart_ref: &str, untar_dir: &str) -> Result<(), ExecError>

Downloads the chart and unpacks it into untar_dir, which must be freshly created.

Source

fn dependency_list(&self, chart_dir: &str) -> Result<String, ExecError>

Returns helm’s dependency list table. It exits 0 whatever it finds, so the caller must read the table rather than the error.

Source

fn dependency_build( &self, chart_dir: &str, skip_refresh: bool, ) -> Result<(), ExecError>

Fetches the dependencies Chart.lock pins, leaving the lock untouched.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§