Merge pull request #36718 from k82cn/filed_err_msg

Automatic merge from submit-queue

Replace raw string with const var.

Replace raw string with const string var.
This commit is contained in:
Kubernetes Submit Queue 2017-02-16 00:12:15 -08:00 committed by GitHub
commit df4e69bb3b

View File

@ -3338,7 +3338,7 @@ func ValidateResourceQuotaUpdate(newResourceQuota, oldResourceQuota *api.Resourc
oldScopes.Insert(string(scope)) oldScopes.Insert(string(scope))
} }
if !oldScopes.Equal(newScopes) { if !oldScopes.Equal(newScopes) {
allErrs = append(allErrs, field.Invalid(fldPath, newResourceQuota.Spec.Scopes, "field is immutable")) allErrs = append(allErrs, field.Invalid(fldPath, newResourceQuota.Spec.Scopes, fieldImmutableErrorMsg))
} }
newResourceQuota.Status = oldResourceQuota.Status newResourceQuota.Status = oldResourceQuota.Status