feat: add generation of api-keys to cli (#87)

* feat: add generate option in cli and the documentation

Signed-off-by: Thomas Schuetz <thomas.schuetz@t-sc.eu>

* chore: release 0.1.0

Release-As: 0.1.0
Signed-off-by: Thomas Schuetz <thomas.schuetz@t-sc.eu>

* fix: apply suggestions from code review

Co-authored-by: Alex Jones <alexsimonjones@gmail.com>
Signed-off-by: Thomas Schuetz <thomas.schuetz@t-sc.eu>

---------

Signed-off-by: Thomas Schuetz <thomas.schuetz@t-sc.eu>
Co-authored-by: Alex Jones <alexsimonjones@gmail.com>
This commit is contained in:
Thomas Schuetz
2023-03-27 21:00:28 +02:00
committed by AlexsJones
parent 0c231d635e
commit 1c653ecc51
3 changed files with 84 additions and 4 deletions

View File

@@ -1,6 +1,7 @@
package cmd
import (
"github.com/k8sgpt-ai/k8sgpt/cmd/generate"
"os"
"github.com/fatih/color"
@@ -46,6 +47,7 @@ func init() {
// will be global for your application.
rootCmd.AddCommand(auth.AuthCmd)
rootCmd.AddCommand(analyze.AnalyzeCmd)
rootCmd.AddCommand(generate.GenerateCmd)
rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.k8sgpt.git.yaml)")
rootCmd.PersistentFlags().StringVar(&masterURL, "master", "", "The address of the Kubernetes API server. Overrides any value in kubeconfig. Only required if out-of-cluster.")
rootCmd.PersistentFlags().StringVar(&kubeconfig, "kubeconfig", "", "Path to a kubeconfig. Only required if out-of-cluster.")