kubeadm: update comment for ArgumentsFromCommand function in app/util/arguments

Signed-off-by: xin.li <xin.li@daocloud.io>
This commit is contained in:
xin.li 2024-09-16 23:38:34 +08:00
parent 856475e5ff
commit 706e939382

View File

@ -25,6 +25,7 @@ import (
"k8s.io/apimachinery/pkg/util/sets"
"k8s.io/klog/v2"
kubeadmapi "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm"
)
@ -65,7 +66,9 @@ func ArgumentsToCommand(base []kubeadmapi.Arg, overrides []kubeadmapi.Arg) []str
return command
}
// ArgumentsFromCommand parses a CLI command in the form "--foo=bar" to an Arg slice
// ArgumentsFromCommand parses a CLI command in the form "--foo=bar" to an Arg slice.
// This function's primary purpose is to parse the kubeadm-flags.env file, but can remain unused
// for some releases.
func ArgumentsFromCommand(command []string) []kubeadmapi.Arg {
args := []kubeadmapi.Arg{}
for i, arg := range command {