Merge pull request #69167 from apelisse/kubectl-diff

Move `diff` command from alpha sub-command to root cmd
This commit is contained in:
k8s-ci-robot
2018-09-27 20:52:11 -07:00
committed by GitHub
8 changed files with 10 additions and 10 deletions

View File

@@ -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.

View File

@@ -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),

View File

@@ -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 {