diff --git a/README.md b/README.md index ac54327..aec6098 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,37 @@ # Kubecollect + Go tool to scan your Kubernetes cluster and provide you with a quick summary + +## Installation + +You can run `go build -o kcl` to build the binary locally or download from the **Releases** tab + +## Features + +1. Quick summary of your Kubernetes cluster status and the option to point to specific namespaces +2. Customizable logging + +## Requirements + +1. Go version 1.21.5 or higher +2. Access to a Kubernetes cluster + +## Issues + +Open issues if you're having trouble with the tool or you feel that the documentation is lacking + +## Flags + +Currently there exists a single sub-command: `check` with 3 flags: + +1. **--kubeconfig**: This flag stores the path to the kubeconfig file for your cluster. If not specified, it will try to access the file from the default location in `~/.kube/config` + +2. **--logger**: This flag enables logging for the application run and creates a `kubecollect.log` based on the path where your run the app from + +3. **--namespaces**: This flag stores a string slice of the namespaces that you want to get cluster status from. If no namespaces are provided then, all the namespaces from your cluster are used to get the cluster status update + +## Usage + +![kcl command screenshot 1](/images/image1.png) + +![kcl command screenshot 2](/images/image2.png) \ No newline at end of file diff --git a/cmd/check/check.go b/cmd/check/check.go index d628132..b51cacb 100644 --- a/cmd/check/check.go +++ b/cmd/check/check.go @@ -60,6 +60,8 @@ var CheckCmd = &cobra.Command{ log.Fatal("Kubeconfig file not found. Program will exit.") } } + } else { + log.Print("Using kubeconfig file from the path provided") } if err := readData(kubeconfig, namespaces); err != nil { @@ -156,7 +158,7 @@ func readData(kubeconfig string, namespaces []string) error { table.Append(row) } - table.Render() // Send output + table.Render() // Create Table output return nil } diff --git a/cmd/root.go b/cmd/root.go index cea0a8d..2082197 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -25,4 +25,6 @@ func Execute() { func init() { rootCmd.AddCommand(check.CheckCmd) + // Hide the default "completion" sub-command + rootCmd.CompletionOptions.HiddenDefaultCmd = true } diff --git a/images/image1.png b/images/image1.png new file mode 100644 index 0000000..3eb7081 Binary files /dev/null and b/images/image1.png differ diff --git a/images/image2.png b/images/image2.png new file mode 100644 index 0000000..3082cc9 Binary files /dev/null and b/images/image2.png differ