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

kubectl: deprecate run filename flag
This commit is contained in:
Kubernetes Prow Robot 2026-05-06 19:40:25 +05:30 committed by GitHub
commit 5a6063f68c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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)