mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 03:11:40 +00:00
Merge pull request #107213 from mk46/portname_validation
Fixed port name validation error message.
This commit is contained in:
commit
33b2e16372
@ -334,7 +334,7 @@ func IsValidPortName(port string) []string {
|
||||
errs = append(errs, "must contain only alpha-numeric characters (a-z, 0-9), and hyphens (-)")
|
||||
}
|
||||
if !portNameOneLetterRegexp.MatchString(port) {
|
||||
errs = append(errs, "must contain at least one letter or number (a-z, 0-9)")
|
||||
errs = append(errs, "must contain at least one letter (a-z)")
|
||||
}
|
||||
if strings.Contains(port, "--") {
|
||||
errs = append(errs, "must not contain consecutive hyphens")
|
||||
|
Loading…
Reference in New Issue
Block a user