From c6435d82a954076a7b76abca342ef78b7419dc44 Mon Sep 17 00:00:00 2001 From: Ilya Lesikov Date: Fri, 18 Mar 2022 21:41:16 +0300 Subject: [PATCH] feat: kubectl exposed via `werf kubectl` Signed-off-by: Ilya Lesikov --- cmd/werf/kubectl/kubectl.go | 11 +++++++++++ cmd/werf/main.go | 2 ++ 2 files changed, 13 insertions(+) create mode 100644 cmd/werf/kubectl/kubectl.go diff --git a/cmd/werf/kubectl/kubectl.go b/cmd/werf/kubectl/kubectl.go new file mode 100644 index 0000000000..358d60a417 --- /dev/null +++ b/cmd/werf/kubectl/kubectl.go @@ -0,0 +1,11 @@ +package kubectl + +import ( + "github.com/spf13/cobra" + "k8s.io/kubectl/pkg/cmd" +) + +func NewCmd() *cobra.Command { + kubectlRootCmd := cmd.NewDefaultKubectlCommand() + return kubectlRootCmd +} diff --git a/cmd/werf/main.go b/cmd/werf/main.go index 152ed2c521..09f993a971 100644 --- a/cmd/werf/main.go +++ b/cmd/werf/main.go @@ -34,6 +34,7 @@ import ( "github.com/werf/werf/cmd/werf/helm" host_cleanup "github.com/werf/werf/cmd/werf/host/cleanup" host_purge "github.com/werf/werf/cmd/werf/host/purge" + "github.com/werf/werf/cmd/werf/kubectl" managed_images_add "github.com/werf/werf/cmd/werf/managed_images/add" managed_images_ls "github.com/werf/werf/cmd/werf/managed_images/ls" managed_images_rm "github.com/werf/werf/cmd/werf/managed_images/rm" @@ -123,6 +124,7 @@ Find more information at https://werf.io`), hostCmd(), helm.NewCmd(), crCmd(), + kubectl.NewCmd(), }, }, {