Skip to content

Commit

Permalink
refactor: cluster controller
Browse files Browse the repository at this point in the history
  • Loading branch information
QianChenglong authored and tke-robot committed Jun 24, 2020
1 parent a24dc15 commit 130e0b4
Show file tree
Hide file tree
Showing 6 changed files with 236 additions and 653 deletions.
8 changes: 8 additions & 0 deletions api/platform/v1/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,14 @@ func (in *Cluster) SetCondition(newCondition ClusterCondition) {
}

in.Status.Conditions = conditions
switch newCondition.Status {
case ConditionFalse:
in.Status.Reason = newCondition.Reason
in.Status.Message = newCondition.Message
default:
in.Status.Reason = ""
in.Status.Message = ""
}
}

func (in *Cluster) Host() (string, error) {
Expand Down
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ require (
github.com/Masterminds/semver v1.5.0
github.com/aws/aws-sdk-go v1.29.32
github.com/bitly/go-simplejson v0.5.0
github.com/blang/semver v3.5.1+incompatible
github.com/casbin/casbin/v2 v2.2.1
github.com/chartmuseum/storage v0.8.0
github.com/coreos/go-oidc v2.2.1+incompatible
Expand Down
94 changes: 0 additions & 94 deletions pkg/platform/controller/cluster/cluster_cache.go

This file was deleted.

Loading

0 comments on commit 130e0b4

Please sign in to comment.