Merge pull request #138671 from Suknna/deprecate-run-filename

kubectl: deprecate run filename flag

Kubernetes-commit: 5a6063f68c14eadd6b4fcc7531aff795f511f996
This commit is contained in:
Kubernetes Publisher 2026-05-06 19:40:25 +05:30
commit 85cecabd9c

View file

@ -178,6 +178,9 @@ func NewCmdRun(f cmdutil.Factory, streams genericiooptions.IOStreams) *cobra.Com
o.PrintFlags.AddFlags(cmd)
o.RecordFlags.AddFlags(cmd)
_ = cmd.Flags().MarkDeprecated("filename", "it is ignored by kubectl run and will be removed in a future release")
_ = cmd.Flags().MarkShorthandDeprecated("filename", "it is ignored by kubectl run and will be removed in a future release")
addRunFlags(cmd, o)
cmdutil.AddApplyAnnotationFlags(cmd)
cmdutil.AddPodRunningTimeoutFlag(cmd, defaultPodAttachTimeout)