scheduler: filter disabled cloudprovider

This commit is contained in:
Zexi Li
2020-05-14 18:15:53 +08:00
parent c23ee27c9f
commit 019d72a694
@@ -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()