From 869c6c306d2db328dd74708f20332f47f369ffb8 Mon Sep 17 00:00:00 2001 From: suknna Date: Tue, 28 Apr 2026 12:37:45 +0800 Subject: [PATCH] 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 Kubernetes-commit: 7cccdd4b82e5ec506e7240289650f98ed1f64c83 --- pkg/cmd/apply/apply.go | 2 +- pkg/cmd/replace/replace.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/cmd/apply/apply.go b/pkg/cmd/apply/apply.go index f07b644ed..d1e3be3ed 100644 --- a/pkg/cmd/apply/apply.go +++ b/pkg/cmd/apply/apply.go @@ -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, diff --git a/pkg/cmd/replace/replace.go b/pkg/cmd/replace/replace.go index 97c5816a3..c76fe2b09 100644 --- a/pkg/cmd/replace/replace.go +++ b/pkg/cmd/replace/replace.go @@ -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, }