Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions pkg/devspace/cloud/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"os"
"path/filepath"

"github.com/covexo/devspace/pkg/devspace/config/v1"
homedir "github.com/mitchellh/go-homedir"
yaml "gopkg.in/yaml.v2"
)
Expand Down Expand Up @@ -112,16 +111,3 @@ func SaveCloudConfig(config ProviderConfig) error {

return ioutil.WriteFile(cfgPath, out, 0600)
}

// UpdateDevSpaceConfig updates the devspace config with the newest namespace
func UpdateDevSpaceConfig(dsConfig *v1.Config, namespace string) {
// Update tiller if needed
if dsConfig.Tiller != nil {
dsConfig.Tiller.Namespace = &namespace
}

// Update registry namespace if needed
if dsConfig.InternalRegistry != nil {
dsConfig.InternalRegistry.Namespace = &namespace
}
}
10 changes: 9 additions & 1 deletion pkg/devspace/cloud/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,15 @@ func Update(providerConfig ProviderConfig, dsConfig *v1.Config, useKubeContext,
return err
}

UpdateDevSpaceConfig(dsConfig, namespace)
// Update tiller if needed
if dsConfig.Tiller != nil {
dsConfig.Tiller.Namespace = &namespace
}

// Update registry namespace if needed
if dsConfig.InternalRegistry != nil {
dsConfig.InternalRegistry.Namespace = &namespace
}

if useKubeContext {
kubeContext := DevSpaceKubeContextName + "-" + namespace
Expand Down