Skip to content

Commit 8a3a989

Browse files
committed
Set context namespace to release namespace
1 parent e2d4136 commit 8a3a989

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

pkg/devspace/clients/kubectl/client.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ func GetClientConfig() (*rest.Config, error) {
109109
kubeContext := api.NewContext()
110110
kubeContext.Cluster = "devspace"
111111
kubeContext.AuthInfo = "devspace"
112+
kubeContext.Namespace = *config.DevSpace.Release.Namespace
112113

113114
kubeConfig := api.NewConfig()
114115
kubeConfig.AuthInfos["devspace"] = kubeAuthInfo

pkg/devspace/cloud/login.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ func GetClusterConfig(provider *Provider) (string, *api.Cluster, *api.AuthInfo,
4646
return "", nil, nil, err
4747
}
4848

49-
if resp.StatusCode == 401 {
49+
if resp.StatusCode == http.StatusUnauthorized {
5050
return Login(provider)
5151
}
52-
if resp.StatusCode != 200 {
52+
if resp.StatusCode != http.StatusOK {
5353
return "", nil, nil, fmt.Errorf("Couldn't retrieve cluster config: %s", body)
5454
}
5555

0 commit comments

Comments
 (0)