mirror of https://github.com/helm/helm
When trying to create a new namespace, specifying a namespace will errorpull/291/head
parent
a2e928adda
commit
73bfdf949e
@ -1,25 +1,18 @@
|
||||
package kubectl
|
||||
|
||||
// Delete removes a chart from Kubernetes.
|
||||
func (r RealRunner) Delete(name, ktype, ns string) ([]byte, error) {
|
||||
func (r RealRunner) Delete(name, ktype 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) {
|
||||
func (r PrintRunner) Delete(name, ktype string) ([]byte, error) {
|
||||
|
||||
args := []string{"delete", ktype, name}
|
||||
|
||||
if ns != "" {
|
||||
args = append([]string{"--namespace=" + ns}, args...)
|
||||
}
|
||||
|
||||
cmd := command(args...)
|
||||
return []byte(cmd.String()), nil
|
||||
}
|
||||
|
Loading…
Reference in new issue