Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v0.1.0 prep #8

Merged
merged 2 commits into from
Sep 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -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
11 changes: 1 addition & 10 deletions cmd/kubectl-ng.go
Original file line number Diff line number Diff line change
@@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion docs/nodegizmo.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion docs/nodegizmo_node.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion docs/nodegizmo_node_capacity.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion docs/nodegizmo_node_exec.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion docs/nodegizmo_nodepool.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 1 addition & 2 deletions pkg/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down