kubectl: improve -f flag usage descriptions

The -f flag descriptions for apply and replace only mention files,
but the flag also supports directories and URLs.
References https://github.com/kubernetes/kubectl/issues/1844

Signed-off-by: suknna <suknna@foxmail.com>

Kubernetes-commit: 7cccdd4b82e5ec506e7240289650f98ed1f64c83
This commit is contained in:
suknna 2026-04-28 12:37:45 +08:00 committed by Kubernetes Publisher
parent 9cfb483a4b
commit 869c6c306d
2 changed files with 2 additions and 2 deletions

View file

@ -184,7 +184,7 @@ var ApplySetToolVersion = version.Get().GitVersion
func NewApplyFlags(streams genericiooptions.IOStreams) *ApplyFlags {
return &ApplyFlags{
RecordFlags: genericclioptions.NewRecordFlags(),
DeleteFlags: cmddelete.NewDeleteFlags("The files that contain the configurations to apply."),
DeleteFlags: cmddelete.NewDeleteFlags("The files, directories or URLs that contain the configurations to apply."),
PrintFlags: genericclioptions.NewPrintFlags("created").WithTypeSetter(scheme.Scheme),
Overwrite: true,

View file

@ -102,7 +102,7 @@ type ReplaceOptions struct {
func NewReplaceOptions(streams genericiooptions.IOStreams) *ReplaceOptions {
return &ReplaceOptions{
PrintFlags: genericclioptions.NewPrintFlags("replaced"),
DeleteFlags: delete.NewDeleteFlags("The files that contain the configurations to replace."),
DeleteFlags: delete.NewDeleteFlags("The files, directories or URLs that contain the configurations to replace."),
IOStreams: streams,
}