Skip to content

Commit b135f59

Browse files
authored
Merge pull request #284 from covexo/issue-283
Resolve #283
2 parents 6bec399 + 8a3a989 commit b135f59

3 files changed

Lines changed: 7 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

pkg/devspace/sync/sync_config.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ func (s *SyncConfig) mainLoop() {
218218
err := s.initialSync()
219219
if err != nil {
220220
s.Error(err)
221+
log.Fatalf("[Sync] Sync stopped: %v", err)
221222
return
222223
}
223224

@@ -233,6 +234,7 @@ func (s *SyncConfig) startUpstream() {
233234
err := notify.Watch(s.WatchPath+"/...", s.upstream.events, notify.All)
234235
if err != nil {
235236
s.Error(err)
237+
log.Fatalf("[Sync] Sync stopped: %v", err)
236238
return
237239
}
238240

@@ -245,6 +247,7 @@ func (s *SyncConfig) startUpstream() {
245247
err = s.upstream.mainLoop()
246248
if err != nil {
247249
s.Error(err)
250+
log.Fatalf("[Sync] Sync stopped: %v", err)
248251
}
249252
}
250253

@@ -254,6 +257,7 @@ func (s *SyncConfig) startDownstream() {
254257
err := s.downstream.mainLoop()
255258
if err != nil {
256259
s.Error(err)
260+
log.Fatalf("[Sync] Sync stopped: %v", err)
257261
}
258262
}
259263

0 commit comments

Comments
 (0)