Merge remote-tracking branch 'origin/develop' into feat/EE-189/EE-577/support-git-automated-sync-for-k8s-applications

This commit is contained in:
Dmitry Salakhov
2021-09-29 17:18:14 +13:00
75 changed files with 2166 additions and 1256 deletions

View File

@@ -95,9 +95,9 @@ func (deployer *KubernetesDeployer) command(operation string, userID portainer.U
command = path.Join(deployer.binaryPath, "kubectl.exe")
}
args := []string{
"--token", token,
"--namespace", namespace,
args := []string{"--token", token}
if namespace != "" {
args = append(args, "--namespace", namespace)
}
if endpoint.Type == portainer.AgentOnKubernetesEnvironment || endpoint.Type == portainer.EdgeAgentOnKubernetesEnvironment {