kubernetes/cmd/kube-proxy/app
Monis Khan fc4f91f10b cmd/*: fail on unrecognized flags/arguments for component CLI
In case a malformed flag is passed to k8s components
such as "–foo", where "–" is not an ASCII dash character,
the components currently silently ignore the flag
and treat it as a positional argument.

Make k8s components/commands exit with an error if a positional argument
that is not empty is found. Include a custom error message for all
components except kubeadm, as cobra.NoArgs is used in a lot of
places already (can be fixed in a followup).

The kubelet already handles this properly - e.g.:
'unknown command: "–foo"'

This change affects:
- cloud-controller-manager
- kube-apiserver
- kube-controller-manager
- kube-proxy
- kubeadm {alpha|config|token|version}
- kubemark

Signed-off-by: Monis Khan <mok@vmware.com>
Signed-off-by: Lubomir I. Ivanov <lubomirivanov@vmware.com>
2020-05-28 22:06:01 +03:00
..
BUILD Run hack/update-vendor.sh 2020-05-16 07:54:33 -04:00
conntrack.go switch over k/k to use klog v2 2020-05-16 07:54:27 -04:00
init_others.go Add support for binaries to run as Windows services 2018-03-07 00:51:36 +01:00
init_windows.go Add Windows flags for KubeProxyConfiguration 2019-02-05 10:39:23 -08:00
server_others_test.go Cleanup: Change "Ip" to "IP" in func and var names 2020-04-10 15:29:50 -07:00
server_others.go switch over k/k to use klog v2 2020-05-16 07:54:27 -04:00
server_test.go Move pkg/util/configz to k8s.io/component-base 2020-04-29 12:17:25 -07:00
server_windows.go switch over k/k to use klog v2 2020-05-16 07:54:27 -04:00
server.go cmd/*: fail on unrecognized flags/arguments for component CLI 2020-05-28 22:06:01 +03:00