You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
helm/kubectl/delete.go

26 lines
582 B

package kubectl
// Delete removes a chart from Kubernetes.
func (r RealRunner) Delete(name, ktype, ns string) ([]byte, error) {
args := []string{"delete", ktype, name}
if ns != "" {
args = append([]string{"--namespace=" + ns}, args...)
}
return command(args...).CombinedOutput()
}
// Delete returns the commands to kubectl
func (r PrintRunner) Delete(name, ktype, ns string) ([]byte, error) {
args := []string{"delete", ktype, name}
if ns != "" {
args = append([]string{"--namespace=" + ns}, args...)
}
cmd := command(args...)
return []byte(cmd.String()), nil
}