Skip to content

Commit

Permalink
scheduler: filter disabled cloudprovider
Browse files Browse the repository at this point in the history
  • Loading branch information
zexi committed May 14, 2020
1 parent e00b1fd commit 2e93072
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/scheduler/algorithm/predicates/guest/status_predicate.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ func (p *StatusPredicate) Execute(u *core.Unit, c core.Candidater) (bool, []core
if !utils.IsInStringArray(cloudprovider.HealthStatus, api.CLOUD_PROVIDER_VALID_HEALTH_STATUS) {
h.Exclude2("cloud_provider_health_status", cloudprovider.HealthStatus, api.CLOUD_PROVIDER_VALID_HEALTH_STATUS)
}
if !cloudprovider.Enabled.Bool() {
h.Exclude2("cloud_provider_enable", cloudprovider.Enabled.Bool(), true)
}
}

return h.GetResult()
Expand Down

0 comments on commit 2e93072

Please sign in to comment.