Skip to content

Commit f1917f1

Browse files
committed
Remove deprecated kubectl run flags
This commits removes the following flags from kubectl run: - filename - force - grace-period - kustomize - recursive - timeout - wait Those flags are deprecated since v1.26, see this commit kubernetes@09804a1.
1 parent e341d5b commit f1917f1

File tree

1 file changed

+0
-16
lines changed
  • staging/src/k8s.io/kubectl/pkg/cmd/run

1 file changed

+0
-16
lines changed

staging/src/k8s.io/kubectl/pkg/cmd/run/run.go

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -167,22 +167,6 @@ func NewCmdRun(f cmdutil.Factory, streams genericiooptions.IOStreams) *cobra.Com
167167
cmdutil.AddApplyAnnotationFlags(cmd)
168168
cmdutil.AddPodRunningTimeoutFlag(cmd, defaultPodAttachTimeout)
169169

170-
// Deprecate the cascade flag. If set, it has no practical effect since the created pod has no dependents.
171-
// TODO: Remove the cascade flag from the run command in kubectl 1.29
172-
cmd.Flags().MarkDeprecated("cascade", "because it is not relevant for this command. It will be removed in version 1.29.")
173-
174-
// Deprecate and hide unused flags.
175-
// These flags are being added to the run command by DeleteFlags to support pod deletion after attach,
176-
// but they are not used if set, so they effectively do nothing.
177-
// TODO: Remove these flags from the run command in kubectl 1.29
178-
cmd.Flags().MarkDeprecated("filename", "because it is not used by this command. It will be removed in version 1.29.")
179-
cmd.Flags().MarkDeprecated("force", "because it is not used by this command. It will be removed in version 1.29.")
180-
cmd.Flags().MarkDeprecated("grace-period", "because it is not used by this command. It will be removed in version 1.29.")
181-
cmd.Flags().MarkDeprecated("kustomize", "because it is not used by this command. It will be removed in version 1.29.")
182-
cmd.Flags().MarkDeprecated("recursive", "because it is not used by this command. It will be removed in version 1.29.")
183-
cmd.Flags().MarkDeprecated("timeout", "because it is not used by this command. It will be removed in version 1.29.")
184-
cmd.Flags().MarkDeprecated("wait", "because it is not used by this command. It will be removed in version 1.29.")
185-
186170
return cmd
187171
}
188172

0 commit comments

Comments
 (0)