1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-19 05:19:39 +02:00

fix(k8s) deploying manifest using default namespace EE-2104 (#6385)

* fix(k8s) deploying manifest using default namespace EE-2104
This commit is contained in:
cong meng 2022-03-24 21:28:53 +13:00 committed by GitHub
parent 4377aec72b
commit 3579b11a8b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 25 additions and 3 deletions

View file

@ -3,6 +3,7 @@ package exec
import (
"bytes"
"fmt"
"os"
"os/exec"
"path"
"runtime"
@ -123,6 +124,8 @@ func (deployer *KubernetesDeployer) command(operation string, userID portainer.U
var stderr bytes.Buffer
cmd := exec.Command(command, args...)
cmd.Env = os.Environ()
cmd.Env = append(cmd.Env, "POD_NAMESPACE=default")
cmd.Stderr = &stderr
output, err := cmd.Output()