mirror of
https://github.com/kubernetes/kubernetes.git
synced 2026-02-26 19:50:38 -05:00
Automatic merge from submit-queue fix duplicate validation/field/errors **Release note**: ``` release-note release-note-none ``` Related PR: https://github.com/kubernetes/kubernetes/pull/30313 PR #30313 fixed duplicate errors for invalid aggregate errors in https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/util/helpers.go However, duplicate aggregate errors that went through https://github.com/kubernetes/kubernetes/blob/master/pkg/util/validation/field/errors.go were not affected by that patch. This patch adds duplicate aggregate error checking to `pkg/util/validation/field/errors.go` ##### Before `$ kubectl set env rc/idling-echo-1 test-abc=1234` ``` error: ReplicationController "idling-echo-1" is invalid: [spec.template.spec.containers[0].env[0].name: Invalid value: "test-abc": must be a C identifier (matching regex [A-Za-z_][A-Za-z0-9_]*): e.g. "my_name" or "MyName", spec.template.spec.containers[1].env[0].name: Invalid value: "test-abc": must be a C identifier (matching regex [A-Za-z_][A-Za-z0-9_]*): e.g. "my_name" or "MyName", spec.template.spec.containers[0].env[0].name: Invalid value: "test-abc": must be a C identifier (matching regex [A-Za-z_][A-Za-z0-9_]*): e.g. "my_name" or "MyName", spec.template.spec.containers[1].env[0].name: Invalid value: "test-abc": must be a C identifier (matching regex [A-Za-z_][A-Za-z0-9_]*): e.g. "my_name" or "MyName"] ``` `$ kubectl set env rc/node-1 test-abc=1234` ``` error: ReplicationController "idling-echo-1" is invalid: [spec.template.spec.containers[0].env[0].name: Invalid value: "test-abc": must be a C identifier (matching regex [A-Za-z_][A-Za-z0-9_]*): e.g. "my_name" or "MyName", spec.template.spec.containers[1].env[0].name: Invalid value: "test-abc": must be a C identifier (matching regex [A-Za-z_][A-Za-z0-9_]*): e.g. "my_name" or "MyName"] ``` ##### After `$ kubectl set env rc/idling-echo-1 test-abc=1234` ``` error: ReplicationController "idling-echo-1" is invalid: [spec.template.spec.containers[0].env[0].name: Invalid value: "test-abc": must be a C identifier (matching regex [A-Za-z_][A-Za-z0-9_]*): e.g. "my_name" or "MyName", spec.template.spec.containers[1].env[0].name: Invalid value: "test-abc": must be a C identifier (matching regex [A-Za-z_][A-Za-z0-9_]*): e.g. "my_name" or "MyName"] ``` `$ kubectl set env rc/node-1 test-abc=1234` ``` error: ReplicationController "node-1" is invalid: spec.template.spec.containers[0].env[0].name: Invalid value: "test-abc": must be a C identifier (matching regex [A-Za-z_][A-Za-z0-9_]*): e.g. "my_name" or "MyName" ``` |
||
|---|---|---|
| .. | ||
| async | ||
| bandwidth | ||
| cache | ||
| cert | ||
| chmod | ||
| chown | ||
| clock | ||
| codeinspector | ||
| config | ||
| configz | ||
| crlf | ||
| dbus | ||
| diff | ||
| ebtables | ||
| env | ||
| errors | ||
| exec | ||
| flag | ||
| flock | ||
| flowcontrol | ||
| flushwriter | ||
| framer | ||
| goroutinemap | ||
| hash | ||
| homedir | ||
| httpstream | ||
| initsystem | ||
| integer | ||
| interrupt | ||
| intstr | ||
| io | ||
| iptables | ||
| json | ||
| jsonpath | ||
| keymutex | ||
| labels | ||
| limitwriter | ||
| logs | ||
| maps | ||
| metrics | ||
| mount | ||
| net | ||
| netsh | ||
| node | ||
| oom | ||
| parsers | ||
| procfs | ||
| proxy | ||
| rand | ||
| resourcecontainer | ||
| rlimit | ||
| runtime | ||
| selinux | ||
| sets | ||
| slice | ||
| strategicpatch | ||
| strings | ||
| sysctl | ||
| system | ||
| taints | ||
| term | ||
| testing | ||
| threading | ||
| uuid | ||
| validation | ||
| wait | ||
| workqueue | ||
| wsstream | ||
| yaml | ||
| BUILD | ||
| doc.go | ||
| template.go | ||
| template_test.go | ||
| trace.go | ||
| trie.go | ||
| umask.go | ||
| umask_windows.go | ||
| util.go | ||
| util_test.go | ||