diff --git a/.goreleaser.yml b/.goreleaser.yml index 1f5dc68..2233c0c 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,12 +1,26 @@ -project_name: node-gizmo +project_name: nodegizmo builds: - - binary: nodegizmo - env: [CGO_ENABLED=0] + - id: nodegizmo + binary: nodegizmo + env: + - CGO_ENABLED=0 goos: - linux - - windows - darwin + - windows goarch: - amd64 - arm64 + ignore: + - goos: windows + goarch: arm64 + +archives: + - builds: + - nodegizmo + name_template: "{{ .ProjectName }}_{{ .Tag }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}" + wrap_in_directory: false + format: tar.gz + files: + - LICENSE \ No newline at end of file diff --git a/cmd/kubectl-ng.go b/cmd/kubectl-ng.go index fd2424c..7677f9b 100644 --- a/cmd/kubectl-ng.go +++ b/cmd/kubectl-ng.go @@ -1,21 +1,12 @@ package cmd import ( - "os" - - "github.com/spf13/pflag" - "github.com/Kavinraja-G/node-gizmo/pkg/cmd" - "k8s.io/cli-runtime/pkg/genericiooptions" ) // Execute drives the root 'nodegizmo' command -// TODO: Revist the kubectl-plugin creation logic for nodegizmo func Execute() error { - flags := pflag.NewFlagSet("kubectl-ng", pflag.ExitOnError) - pflag.CommandLine = flags - - root := cmd.NewCmdRoot(genericiooptions.IOStreams{In: os.Stdin, Out: os.Stdout, ErrOut: os.Stderr}) + root := cmd.NewCmdRoot() if err := root.Execute(); err != nil { return err } diff --git a/docs/nodegizmo.md b/docs/nodegizmo.md index 1c29fb8..d7cadd5 100644 --- a/docs/nodegizmo.md +++ b/docs/nodegizmo.md @@ -17,4 +17,4 @@ nodegizmo [flags] * [nodegizmo node](nodegizmo_node.md) - Displays generic node related information in the cluster * [nodegizmo nodepool](nodegizmo_nodepool.md) - Displays detailed information about Nodepool/Nodegroup -###### Auto generated by spf13/cobra on 27-Aug-2023 +###### Auto generated by spf13/cobra on 9-Sep-2023 diff --git a/docs/nodegizmo_node.md b/docs/nodegizmo_node.md index a967f0e..08e4545 100644 --- a/docs/nodegizmo_node.md +++ b/docs/nodegizmo_node.md @@ -21,4 +21,4 @@ nodegizmo node [flags] * [nodegizmo node capacity](nodegizmo_node_capacity.md) - Displays Node capacity related information * [nodegizmo node exec](nodegizmo_node_exec.md) - Spawns a 'nsenter' pod to exec into the provided node -###### Auto generated by spf13/cobra on 27-Aug-2023 +###### Auto generated by spf13/cobra on 9-Sep-2023 diff --git a/docs/nodegizmo_node_capacity.md b/docs/nodegizmo_node_capacity.md index 4823072..22f0cff 100644 --- a/docs/nodegizmo_node_capacity.md +++ b/docs/nodegizmo_node_capacity.md @@ -16,4 +16,4 @@ nodegizmo node capacity [flags] * [nodegizmo node](nodegizmo_node.md) - Displays generic node related information in the cluster -###### Auto generated by spf13/cobra on 27-Aug-2023 +###### Auto generated by spf13/cobra on 9-Sep-2023 diff --git a/docs/nodegizmo_node_exec.md b/docs/nodegizmo_node_exec.md index 3ff7fbd..a133fef 100644 --- a/docs/nodegizmo_node_exec.md +++ b/docs/nodegizmo_node_exec.md @@ -16,4 +16,4 @@ nodegizmo node exec nodeName [flags] * [nodegizmo node](nodegizmo_node.md) - Displays generic node related information in the cluster -###### Auto generated by spf13/cobra on 27-Aug-2023 +###### Auto generated by spf13/cobra on 9-Sep-2023 diff --git a/docs/nodegizmo_nodepool.md b/docs/nodegizmo_nodepool.md index fd684b7..bd15961 100644 --- a/docs/nodegizmo_nodepool.md +++ b/docs/nodegizmo_nodepool.md @@ -16,4 +16,4 @@ nodegizmo nodepool [flags] * [nodegizmo](nodegizmo.md) - Nodegizmo - A CLI utility for your Kubernetes nodes -###### Auto generated by spf13/cobra on 27-Aug-2023 +###### Auto generated by spf13/cobra on 9-Sep-2023 diff --git a/pkg/cmd/root.go b/pkg/cmd/root.go index 2adefc4..ff86503 100644 --- a/pkg/cmd/root.go +++ b/pkg/cmd/root.go @@ -5,12 +5,11 @@ import ( "github.com/Kavinraja-G/node-gizmo/pkg/cmd/nodes" "github.com/spf13/cobra" "github.com/spf13/cobra/doc" - "k8s.io/cli-runtime/pkg/genericiooptions" "log" ) // NewCmdRoot initializes the root command 'nodegizmo' -func NewCmdRoot(streams genericiooptions.IOStreams) *cobra.Command { +func NewCmdRoot() *cobra.Command { cmd := &cobra.Command{ Use: "nodegizmo", Aliases: []string{"ng"},