Permalink
Browse files

Merge pull request #284 from covexo/issue-283

Resolve #283
  • Loading branch information...
FabianKramm committed Oct 11, 2018
2 parents 6bec399 + 8a3a989 commit b135f59d753c255827194c144dba77a0700d7b2a
Showing with 7 additions and 2 deletions.
  1. +1 −0 pkg/devspace/clients/kubectl/client.go
  2. +2 −2 pkg/devspace/cloud/login.go
  3. +4 −0 pkg/devspace/sync/sync_config.go
@@ -109,6 +109,7 @@ func GetClientConfig() (*rest.Config, error) {
kubeContext := api.NewContext()
kubeContext.Cluster = "devspace"
kubeContext.AuthInfo = "devspace"
kubeContext.Namespace = *config.DevSpace.Release.Namespace
kubeConfig := api.NewConfig()
kubeConfig.AuthInfos["devspace"] = kubeAuthInfo
@@ -46,10 +46,10 @@ func GetClusterConfig(provider *Provider) (string, *api.Cluster, *api.AuthInfo,
return "", nil, nil, err
}
if resp.StatusCode == 401 {
if resp.StatusCode == http.StatusUnauthorized {
return Login(provider)
}
if resp.StatusCode != 200 {
if resp.StatusCode != http.StatusOK {
return "", nil, nil, fmt.Errorf("Couldn't retrieve cluster config: %s", body)
}
@@ -218,6 +218,7 @@ func (s *SyncConfig) mainLoop() {
err := s.initialSync()
if err != nil {
s.Error(err)
log.Fatalf("[Sync] Sync stopped: %v", err)
return
}
@@ -233,6 +234,7 @@ func (s *SyncConfig) startUpstream() {
err := notify.Watch(s.WatchPath+"/...", s.upstream.events, notify.All)
if err != nil {
s.Error(err)
log.Fatalf("[Sync] Sync stopped: %v", err)
return
}
@@ -245,6 +247,7 @@ func (s *SyncConfig) startUpstream() {
err = s.upstream.mainLoop()
if err != nil {
s.Error(err)
log.Fatalf("[Sync] Sync stopped: %v", err)
}
}
@@ -254,6 +257,7 @@ func (s *SyncConfig) startDownstream() {
err := s.downstream.mainLoop()
if err != nil {
s.Error(err)
log.Fatalf("[Sync] Sync stopped: %v", err)
}
}

0 comments on commit b135f59

Please sign in to comment.