func (ha *App) Install(ctx context.Context, name, namespace, version string, options map[string]string) error {
	if _, err := ha.addRepo(ctx); err != nil {
		return err
	}
	if err := ha.resolveArgs(); err != nil {
		return err
	}
	_, err := helmCommand(ctx, statusMethod, name, "", namespace, "", nil)
	if err == nil {
		ha.log.Warnf("helm app %s/%s already exists in %s namespace. Skipping...\n", ha.app.Repository.Name, name, namespace)
		return nil
	}
	out, err := helmCommand(ctx, installMethod, name, version, namespace, fmt.Sprintf("%s/%s", ha.app.Repository.Name, name), ha.app.Args)
	ha.log.Debug(out)
	return err
}
Install installs the application specified by name, version and namespace.
package helm
import (
	"context"
	"fmt"
	"os/exec"
	"strings"
	"github.com/pkg/errors"
	corev1 "k8s.io/api/core/v1"
	"github.com/kbrew-dev/kbrew/pkg/apps/raw"
	"github.com/kbrew-dev/kbrew/pkg/config"
	"github.com/kbrew-dev/kbrew/pkg/log"
)
type method string
const (
	installMethod   method = "install"
	statusMethod    method = "status"
	uninstallMethod method = "delete"
)
type App struct {
	app config.App
	log *log.Logger
}
func New(c config.App, log *log.Logger) *App {
	return &App{
		app: c,
		log: log,
	}
}