mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-15 14:26:57 +00:00
Merge pull request #69167 from apelisse/kubectl-diff
Move `diff` command from alpha sub-command to root cmd
This commit is contained in:
@@ -36,7 +36,6 @@ func NewCmdAlpha(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.
|
||||
// Alpha commands should be added here. As features graduate from alpha they should move
|
||||
// from here to the CommandGroups defined by NewKubeletCommand() in cmd.go.
|
||||
//cmd.AddCommand(NewCmdDebug(f, in, out, err))
|
||||
cmd.AddCommand(NewCmdDiff(f, streams))
|
||||
|
||||
// NewKubeletCommand() will hide the alpha command if it has no subcommands. Overriding
|
||||
// the help function ensures a reasonable message if someone types the hidden command anyway.
|
||||
|
||||
@@ -468,6 +468,7 @@ func NewKubectlCommand(in io.Reader, out, err io.Writer) *cobra.Command {
|
||||
{
|
||||
Message: "Advanced Commands:",
|
||||
Commands: []*cobra.Command{
|
||||
NewCmdDiff(f, ioStreams),
|
||||
NewCmdApply("kubectl", f, ioStreams),
|
||||
NewCmdPatch(f, ioStreams),
|
||||
NewCmdReplace(f, ioStreams),
|
||||
|
||||
@@ -54,10 +54,10 @@ var (
|
||||
run with "-u" (unicode) and "-N" (treat new files as empty) options.`))
|
||||
diffExample = templates.Examples(i18n.T(`
|
||||
# Diff resources included in pod.json.
|
||||
kubectl alpha diff -f pod.json
|
||||
kubectl diff -f pod.json
|
||||
|
||||
# Diff file read from stdin
|
||||
cat service.yaml | kubectl alpha diff -f -`))
|
||||
cat service.yaml | kubectl diff -f -`))
|
||||
)
|
||||
|
||||
type DiffOptions struct {
|
||||
|
||||
Reference in New Issue
Block a user