Skip to content

Commit e506b1c

Browse files
authored
Merge pull request #317 from covexo/issue-307
Move update devspace config
2 parents bec4280 + 965bef2 commit e506b1c

2 files changed

Lines changed: 9 additions & 15 deletions

File tree

pkg/devspace/cloud/config.go

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
"os"
66
"path/filepath"
77

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

113112
return ioutil.WriteFile(cfgPath, out, 0600)
114113
}
115-
116-
// UpdateDevSpaceConfig updates the devspace config with the newest namespace
117-
func UpdateDevSpaceConfig(dsConfig *v1.Config, namespace string) {
118-
// Update tiller if needed
119-
if dsConfig.Tiller != nil {
120-
dsConfig.Tiller.Namespace = &namespace
121-
}
122-
123-
// Update registry namespace if needed
124-
if dsConfig.InternalRegistry != nil {
125-
dsConfig.InternalRegistry.Namespace = &namespace
126-
}
127-
}

pkg/devspace/cloud/login.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,15 @@ func Update(providerConfig ProviderConfig, dsConfig *v1.Config, useKubeContext,
130130
return err
131131
}
132132

133-
UpdateDevSpaceConfig(dsConfig, namespace)
133+
// Update tiller if needed
134+
if dsConfig.Tiller != nil {
135+
dsConfig.Tiller.Namespace = &namespace
136+
}
137+
138+
// Update registry namespace if needed
139+
if dsConfig.InternalRegistry != nil {
140+
dsConfig.InternalRegistry.Namespace = &namespace
141+
}
134142

135143
if useKubeContext {
136144
kubeContext := DevSpaceKubeContextName + "-" + namespace

0 commit comments

Comments
 (0)