mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 15:25:57 +00:00
Move the remaining kubectl bits to k8s.io/kubectl
This commit is contained in:
parent
2e74df97a4
commit
9b8247e5dd
@ -21,8 +21,8 @@ import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
|
||||
"k8s.io/kubectl/pkg/cmd"
|
||||
cmdsanity "k8s.io/kubectl/pkg/cmd/util/sanity"
|
||||
"k8s.io/kubernetes/pkg/kubectl/cmd"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
@ -22,8 +22,8 @@ import (
|
||||
"os"
|
||||
|
||||
"github.com/spf13/cobra/doc"
|
||||
"k8s.io/kubectl/pkg/cmd"
|
||||
"k8s.io/kubernetes/cmd/genutils"
|
||||
"k8s.io/kubernetes/pkg/kubectl/cmd"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
@ -26,6 +26,7 @@ import (
|
||||
mangen "github.com/cpuguy83/go-md2man/v2/md2man"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/pflag"
|
||||
kubectlcmd "k8s.io/kubectl/pkg/cmd"
|
||||
"k8s.io/kubernetes/cmd/genutils"
|
||||
apiservapp "k8s.io/kubernetes/cmd/kube-apiserver/app"
|
||||
cmapp "k8s.io/kubernetes/cmd/kube-controller-manager/app"
|
||||
@ -33,7 +34,6 @@ import (
|
||||
schapp "k8s.io/kubernetes/cmd/kube-scheduler/app"
|
||||
kubeadmapp "k8s.io/kubernetes/cmd/kubeadm/app/cmd"
|
||||
kubeletapp "k8s.io/kubernetes/cmd/kubelet/app"
|
||||
kubectlcmd "k8s.io/kubernetes/pkg/kubectl/cmd"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
@ -26,8 +26,8 @@ import (
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/pflag"
|
||||
"gopkg.in/yaml.v2"
|
||||
"k8s.io/kubectl/pkg/cmd"
|
||||
"k8s.io/kubernetes/cmd/genutils"
|
||||
"k8s.io/kubernetes/pkg/kubectl/cmd"
|
||||
)
|
||||
|
||||
type cmdOption struct {
|
||||
|
@ -25,8 +25,8 @@ import (
|
||||
"github.com/spf13/pflag"
|
||||
|
||||
cliflag "k8s.io/component-base/cli/flag"
|
||||
"k8s.io/kubectl/pkg/cmd"
|
||||
"k8s.io/kubectl/pkg/util/logs"
|
||||
"k8s.io/kubernetes/pkg/kubectl/cmd"
|
||||
|
||||
// Import to initialize client auth plugins.
|
||||
_ "k8s.io/client-go/plugin/pkg/client/auth"
|
||||
|
3
pkg/kubectl/cmd/plugin/testdata/kubectl-foo
vendored
3
pkg/kubectl/cmd/plugin/testdata/kubectl-foo
vendored
@ -1,3 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "I am plugin foo"
|
@ -1,4 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# This plugin is a no-op and is used to test plugins
|
||||
# that overshadow existing kubectl commands
|
@ -31,7 +31,6 @@ import (
|
||||
"k8s.io/client-go/rest"
|
||||
"k8s.io/client-go/tools/clientcmd"
|
||||
cliflag "k8s.io/component-base/cli/flag"
|
||||
cmdpkg "k8s.io/kubectl/pkg/cmd"
|
||||
"k8s.io/kubectl/pkg/cmd/annotate"
|
||||
"k8s.io/kubectl/pkg/cmd/apiresources"
|
||||
"k8s.io/kubectl/pkg/cmd/apply"
|
||||
@ -74,7 +73,6 @@ import (
|
||||
"k8s.io/kubectl/pkg/util/i18n"
|
||||
"k8s.io/kubectl/pkg/util/templates"
|
||||
"k8s.io/kubectl/pkg/util/term"
|
||||
"k8s.io/kubernetes/pkg/kubectl/cmd/convert"
|
||||
|
||||
"k8s.io/cli-runtime/pkg/genericclioptions"
|
||||
"k8s.io/kubectl/pkg/cmd/kustomize"
|
||||
@ -567,7 +565,6 @@ func NewKubectlCommand(in io.Reader, out, err io.Writer) *cobra.Command {
|
||||
patch.NewCmdPatch(f, ioStreams),
|
||||
replace.NewCmdReplace(f, ioStreams),
|
||||
wait.NewCmdWait(f, ioStreams),
|
||||
convert.NewCmdConvert(f, ioStreams),
|
||||
kustomize.NewCmdKustomize(ioStreams),
|
||||
},
|
||||
},
|
||||
@ -585,7 +582,7 @@ func NewKubectlCommand(in io.Reader, out, err io.Writer) *cobra.Command {
|
||||
filters := []string{"options"}
|
||||
|
||||
// Hide the "alpha" subcommand if there are no alpha commands in this build.
|
||||
alpha := cmdpkg.NewCmdAlpha(f, ioStreams)
|
||||
alpha := NewCmdAlpha(f, ioStreams)
|
||||
if !alpha.HasSubCommands() {
|
||||
filters = append(filters, alpha.Name())
|
||||
}
|
Loading…
Reference in New Issue
Block a user