Skip to content

Commit

Permalink
refactor: machine 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 7bc58f8 commit a24dc15
Show file tree
Hide file tree
Showing 8 changed files with 281 additions and 534 deletions.
8 changes: 8 additions & 0 deletions api/platform/v1/machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,12 @@ func (in *Machine) SetCondition(newCondition MachineCondition) {
}

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 = ""
}
}
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ require (
github.com/chartmuseum/storage v0.8.0
github.com/coreos/go-oidc v2.2.1+incompatible
github.com/coreos/prometheus-operator v0.38.1-0.20200506070354-4231c1d4b313
github.com/deckarep/golang-set v1.7.1
github.com/dexidp/dex v0.0.0-20200408064242-83d8853fd969
github.com/dgrijalva/jwt-go v3.2.0+incompatible
github.com/docker/distribution v2.7.1+incompatible
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,8 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/daviddengcn/go-colortext v0.0.0-20160507010035-511bcaf42ccd/go.mod h1:dv4zxwHi5C/8AeI+4gX4dCWOIvNi7I6JCSX0HvlKPgE=
github.com/deckarep/golang-set v1.7.1 h1:SCQV0S6gTtp6itiFrTqI+pfmJ4LN85S1YzhDf9rTHJQ=
github.com/deckarep/golang-set v1.7.1/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ=
github.com/deislabs/oras v0.8.0/go.mod h1:v1Vmv0oHch7HS/gK7CGIdIp7s5lEiLlKvwMxZ34sQDs=
github.com/denisenkom/go-mssqldb v0.0.0-20191001013358-cfbb681360f0/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU=
github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba/go.mod h1:dV8lFg6daOBZbT6/BDGIz6Y3WFGn8juu6G+CQ6LHtl0=
Expand Down
87 changes: 0 additions & 87 deletions pkg/platform/controller/machine/cache.go

This file was deleted.

162 changes: 0 additions & 162 deletions pkg/platform/controller/machine/health.go

This file was deleted.

Loading

0 comments on commit a24dc15

Please sign in to comment.