Merge pull request #38090 from xingzhou/kube-37654

Automatic merge from submit-queue (batch tested with PRs 38920, 38090)

Improve error message for name/label validation.

Instead of just providing regex in name/label validation error output, we need to add the naming rules of the name/label, which is more end-user readable.

Fixed #37654
This commit is contained in:
Kubernetes Submit Queue
2016-12-22 22:00:30 -08:00
committed by GitHub
4 changed files with 66 additions and 40 deletions

View File

@@ -750,7 +750,7 @@ func TestValidateDeployment(t *testing.T) {
MaxSurge: intstr.FromString("20Percent"),
},
}
errorCases["must match the regex"] = invalidMaxSurgeDeployment
errorCases["a valid percent string must be"] = invalidMaxSurgeDeployment
// MaxSurge and MaxUnavailable cannot both be zero.
invalidRollingUpdateDeployment := validDeployment()