mirror of https://github.com/helm/helm
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.
26 lines
582 B
26 lines
582 B
9 years ago
|
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
|
||
|
}
|