// Install uses kubectl to install the base DM. // // Returns the string output received from the operation, and an error if the // command failed. func (i *Installer) Install(runner kubectl.Runner) (string, error) { b, err := i.expand() if err != nil { return "", err } o, err := runner.Create(b) return string(o), err }
// IsInstalled checks whether DM has been installed. func IsInstalled(runner kubectl.Runner) bool { // Basically, we test "all-or-nothing" here: if this returns without error // we know that we have both the namespace and the manager API server. _, err := runner.GetByKind("rc", "manager-rc", "helm") if err != nil { return false } return true }
// Uninstall uses kubectl to uninstall the base DM. // // Returns the string output received from the operation, and an error if the // command failed. func Uninstall(runner kubectl.Runner) (string, error) { o, err := runner.Delete("helm", "Namespace") return string(o), err }