Clients should not check conditions, UpdateStatus() is inconsistent

Corrects some of the cargo culting that has crept into the API.
This commit is contained in:
Clayton Coleman
2015-03-20 18:22:51 -04:00
parent d96d8a9faf
commit b1ab14315b
19 changed files with 32 additions and 163 deletions

View File

@@ -123,7 +123,7 @@ func (q *quota) Admit(a admission.Attributes) (err error) {
Annotations: quota.Annotations},
}
usage.Status = *status
_, err = q.client.ResourceQuotas(usage.Namespace).Status(&usage)
_, err = q.client.ResourceQuotas(usage.Namespace).UpdateStatus(&usage)
if err != nil {
return apierrors.NewForbidden(a.GetResource(), name, fmt.Errorf("Unable to %s %s at this time because there was an error enforcing quota", a.GetOperation(), a.GetResource()))
}