From bf49a51c62af450cff51a590547ef30989bd2e93 Mon Sep 17 00:00:00 2001 From: Aris Boutselis Date: Thu, 30 Mar 2023 00:10:19 +0100 Subject: [PATCH 01/24] fix: Change ObjectMeta value in Ingress analyser. Signed-off-by: Aris Boutselis --- pkg/analyzer/ingressAnalyzer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/analyzer/ingressAnalyzer.go b/pkg/analyzer/ingressAnalyzer.go index a389deacc3..5fdc3099e6 100644 --- a/pkg/analyzer/ingressAnalyzer.go +++ b/pkg/analyzer/ingressAnalyzer.go @@ -55,7 +55,7 @@ func AnalyzeIngress(ctx context.Context, config *AnalysisConfiguration, client * Error: value.FailureDetails, } - parent, _ := util.GetParent(client, value.Endpoint.ObjectMeta) + parent, _ := util.GetParent(client, value.Ingress.ObjectMeta) currentAnalysis.ParentObject = parent *analysisResults = append(*analysisResults, currentAnalysis) } From 14ba8d555005f31fc2201cb8b61653093c19b8a7 Mon Sep 17 00:00:00 2001 From: Matthis Holleville Date: Thu, 30 Mar 2023 01:35:09 +0200 Subject: [PATCH 02/24] fix: add Ingress in GetParent switch case Signed-off-by: Matthis Holleville --- pkg/util/util.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkg/util/util.go b/pkg/util/util.go index 2ad74c8af1..598a8c73c3 100644 --- a/pkg/util/util.go +++ b/pkg/util/util.go @@ -50,6 +50,16 @@ func GetParent(client *kubernetes.Client, meta metav1.ObjectMeta) (string, bool) return GetParent(client, ds.ObjectMeta) } return "DaemonSet/" + ds.Name, false + + case "Ingress": + ds, err := client.GetClient().NetworkingV1().Ingresses(meta.Namespace).Get(context.Background(), owner.Name, metav1.GetOptions{}) + if err != nil { + return "", false + } + if ds.OwnerReferences != nil { + return GetParent(client, ds.ObjectMeta) + } + return "Ingress/" + ds.Name, false } } } From 2eab0c544fbb6026f6aea79b08d8f29c061acf2e Mon Sep 17 00:00:00 2001 From: Alex Jones Date: Thu, 30 Mar 2023 07:28:42 +0100 Subject: [PATCH 03/24] feat: bugfix for output Signed-off-by: Alex Jones --- cmd/analyze/analyze.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cmd/analyze/analyze.go b/cmd/analyze/analyze.go index aeeb77f976..028a497619 100644 --- a/cmd/analyze/analyze.go +++ b/cmd/analyze/analyze.go @@ -139,9 +139,12 @@ var AnalyzeCmd = &cobra.Command{ } fmt.Println(string(j)) default: - fmt.Printf("%s %s(%s): %s \n%s\n", color.CyanString("%d", n), - color.YellowString(analysis.Name), color.CyanString(analysis.ParentObject), - color.RedString(analysis.Error[0]), color.GreenString(analysis.Details)) + fmt.Printf("%s %s(%s)\n", color.CyanString("%d", n), + color.YellowString(analysis.Name), color.CyanString(analysis.ParentObject)) + for _, err := range analysis.Error { + fmt.Printf("- %s %s\n", color.RedString("Error:"), color.RedString(err)) + } + color.GreenString(analysis.Details) } } }, From 548039ebe62bb609c1aa288e5e49845850fd2dd8 Mon Sep 17 00:00:00 2001 From: Alex Jones Date: Thu, 30 Mar 2023 08:19:35 +0100 Subject: [PATCH 04/24] feat: improvement to analysis speed Signed-off-by: Alex Jones --- cmd/analyze/analyze.go | 14 +----------- pkg/analyzer/analyzer.go | 46 +++++++++++++++++++++------------------- 2 files changed, 25 insertions(+), 35 deletions(-) diff --git a/cmd/analyze/analyze.go b/cmd/analyze/analyze.go index 028a497619..9a1c08d489 100644 --- a/cmd/analyze/analyze.go +++ b/cmd/analyze/analyze.go @@ -77,23 +77,11 @@ var AnalyzeCmd = &cobra.Command{ } var analysisResults *[]analyzer.Analysis = &[]analyzer.Analysis{} - if err := analyzer.RunAnalysis(ctx, config, client, + if err := analyzer.RunAnalysis(ctx, filters, config, client, aiClient, analysisResults); err != nil { color.Red("Error: %v", err) os.Exit(1) } - // Removed filtered results from slice - if len(filters) > 0 { - var filteredResults []analyzer.Analysis - for _, analysis := range *analysisResults { - for _, filter := range filters { - if strings.Contains(analysis.Kind, filter) { - filteredResults = append(filteredResults, analysis) - } - } - } - analysisResults = &filteredResults - } var bar *progressbar.ProgressBar if len(*analysisResults) > 0 { diff --git a/pkg/analyzer/analyzer.go b/pkg/analyzer/analyzer.go index 627928b361..89bfaed065 100644 --- a/pkg/analyzer/analyzer.go +++ b/pkg/analyzer/analyzer.go @@ -11,33 +11,35 @@ import ( "github.com/spf13/viper" ) -func RunAnalysis(ctx context.Context, config *AnalysisConfiguration, +var analyzerMap = map[string]func(ctx context.Context, config *AnalysisConfiguration, + client *kubernetes.Client, aiClient ai.IAI, analysisResults *[]Analysis) error{ + "Pod": AnalyzePod, + "ReplicaSet": AnalyzeReplicaSet, + "PersistentVolumeClaim": AnalyzePersistentVolumeClaim, + "Service": AnalyzeEndpoints, + "Ingress": AnalyzeIngress, +} + +func RunAnalysis(ctx context.Context, filters []string, config *AnalysisConfiguration, client *kubernetes.Client, aiClient ai.IAI, analysisResults *[]Analysis) error { - err := AnalyzePod(ctx, config, client, aiClient, analysisResults) - if err != nil { - return err - } - - err = AnalyzeReplicaSet(ctx, config, client, aiClient, analysisResults) - if err != nil { - return err - } - - err = AnalyzePersistentVolumeClaim(ctx, config, client, aiClient, analysisResults) - if err != nil { - return err - } - - err = AnalyzeEndpoints(ctx, config, client, aiClient, analysisResults) - if err != nil { - return err + // if there are no filters selected then run all of them + if len(filters) == 0 { + for _, analyzer := range analyzerMap { + if err := analyzer(ctx, config, client, aiClient, analysisResults); err != nil { + return err + } + } + return nil } - err = AnalyzeIngress(ctx, config, client, aiClient, analysisResults) - if err != nil { - return err + for _, filter := range filters { + if analyzer, ok := analyzerMap[filter]; ok { + if err := analyzer(ctx, config, client, aiClient, analysisResults); err != nil { + return err + } + } } return nil } From 3fc0d458238cb8ce1e4755538ea2abf64042e8fd Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 30 Mar 2023 07:51:31 +0000 Subject: [PATCH 05/24] chore(main): release 0.1.3 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 652c1dc61b..78eef9520c 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1 +1 @@ -{".":"0.1.2"} \ No newline at end of file +{".":"0.1.3"} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 20ad57a3e8..1b07996eed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,35 @@ # Changelog +## [0.1.3](https://github.com/k8sgpt-ai/k8sgpt/compare/v0.1.2...v0.1.3) (2023-03-30) + + +### Features + +* add secret validation to ingress analyzer ([#141](https://github.com/k8sgpt-ai/k8sgpt/issues/141)) ([86c7e81](https://github.com/k8sgpt-ai/k8sgpt/commit/86c7e81e18db02ebcbfe35d470682c982871375f)) +* bugfix for output ([2eab0c5](https://github.com/k8sgpt-ai/k8sgpt/commit/2eab0c544fbb6026f6aea79b08d8f29c061acf2e)) +* CODE_OF_CONDUCT.md ([#129](https://github.com/k8sgpt-ai/k8sgpt/issues/129)) ([fe73633](https://github.com/k8sgpt-ai/k8sgpt/commit/fe73633273c5c1f4188bca48471283535967d5aa)) +* create-security.md ([27b8916](https://github.com/k8sgpt-ai/k8sgpt/commit/27b8916f297570907437686c6d958636fb249d50)) +* improvement to analysis speed ([548039e](https://github.com/k8sgpt-ai/k8sgpt/commit/548039ebe62bb609c1aa288e5e49845850fd2dd8)) +* init ingress analyzer ([#138](https://github.com/k8sgpt-ai/k8sgpt/issues/138)) ([fe683b7](https://github.com/k8sgpt-ai/k8sgpt/commit/fe683b71b84fe82459b0ffe366b4dcfa1c978cfe)) + + +### Bug Fixes + +* add Ingress in GetParent switch case ([14ba8d5](https://github.com/k8sgpt-ai/k8sgpt/commit/14ba8d555005f31fc2201cb8b61653093c19b8a7)) +* bugfix for output ([#148](https://github.com/k8sgpt-ai/k8sgpt/issues/148)) ([172c2df](https://github.com/k8sgpt-ai/k8sgpt/commit/172c2df6c55f5fddbfec7f8526be5f2323d1b900)) +* Change ObjectMeta value in Ingress analyser. ([bf49a51](https://github.com/k8sgpt-ai/k8sgpt/commit/bf49a51c62af450cff51a590547ef30989bd2e93)) +* typo in description of the filter flag in analyze command ([#147](https://github.com/k8sgpt-ai/k8sgpt/issues/147)) ([f4765be](https://github.com/k8sgpt-ai/k8sgpt/commit/f4765bed1b1ad121a81b35878fdb866354b5e34a)) + + +### Other + +* **deps:** update google-github-actions/release-please-action digest to ee9822e ([#132](https://github.com/k8sgpt-ai/k8sgpt/issues/132)) ([01b2826](https://github.com/k8sgpt-ai/k8sgpt/commit/01b282647512a4eaebd42ab5847b5534de148d14)) + + +### Docs + +* add new slack link ([#134](https://github.com/k8sgpt-ai/k8sgpt/issues/134)) ([#135](https://github.com/k8sgpt-ai/k8sgpt/issues/135)) ([cad2b38](https://github.com/k8sgpt-ai/k8sgpt/commit/cad2b38d037658495024ec0166ebd3e936f65c2e)) + ## [0.1.2](https://github.com/k8sgpt-ai/k8sgpt/compare/v0.1.1...v0.1.2) (2023-03-28) From 0afd52844b96579391f77698bf0555145b6d2be8 Mon Sep 17 00:00:00 2001 From: Roberth Strand Date: Thu, 30 Mar 2023 11:48:43 +0200 Subject: [PATCH 06/24] refactor: removed sample flag Commented out the sample flag that the framework comes with, as it was not in use. Choose to comment it out for now for easy reference, just in case we want to implement that type of toggle flags. Signed-off-by: Roberth Strand --- cmd/root.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/root.go b/cmd/root.go index f15934fad0..446250bee2 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -1,9 +1,10 @@ package cmd import ( - "github.com/k8sgpt-ai/k8sgpt/cmd/generate" "os" + "github.com/k8sgpt-ai/k8sgpt/cmd/generate" + "github.com/fatih/color" "github.com/k8sgpt-ai/k8sgpt/cmd/analyze" "github.com/k8sgpt-ai/k8sgpt/cmd/auth" @@ -53,7 +54,7 @@ func init() { rootCmd.PersistentFlags().StringVar(&kubeconfig, "kubeconfig", "", "Path to a kubeconfig. Only required if out-of-cluster.") // Cobra also supports local flags, which will only run // when this action is called directly. - rootCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle") + // rootCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle") //Initialise the kubeconfig kubernetesClient, err := kubernetes.NewClient(masterURL, kubeconfig) From be061da5b65045938acd70ad2eb2d21b87d2d6bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Stepp=C3=A9?= Date: Thu, 30 Mar 2023 13:37:10 +0200 Subject: [PATCH 07/24] feat: output selected backend (#153) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Alexandre Steppé --- cmd/auth/auth.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/auth/auth.go b/cmd/auth/auth.go index 7bb5dfe25e..ca695cab76 100644 --- a/cmd/auth/auth.go +++ b/cmd/auth/auth.go @@ -35,6 +35,7 @@ var AuthCmd = &cobra.Command{ // override the default backend if a flag is provided if backend != "" { backendType = backend + color.Green("Using %s as backend AI provider", backendType) } fmt.Printf("Enter %s Key: ", backendType) From b061566404ef80288ca29add2d401574109d44c0 Mon Sep 17 00:00:00 2001 From: HOLLEVILLE Matthis <99146727+matthisholleville@users.noreply.github.com> Date: Thu, 30 Mar 2023 13:48:53 +0200 Subject: [PATCH 08/24] feat: add Ingress class validation (#154) Signed-off-by: Matthis Holleville --- pkg/analyzer/ingressAnalyzer.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/pkg/analyzer/ingressAnalyzer.go b/pkg/analyzer/ingressAnalyzer.go index 5fdc3099e6..18836b067e 100644 --- a/pkg/analyzer/ingressAnalyzer.go +++ b/pkg/analyzer/ingressAnalyzer.go @@ -22,6 +22,26 @@ func AnalyzeIngress(ctx context.Context, config *AnalysisConfiguration, client * for _, ing := range list.Items { var failures []string + + // get ingressClassName + ingressClassName := ing.Spec.IngressClassName + if ingressClassName == nil { + ingClassValue := ing.Annotations["kubernetes.io/ingress.class"] + if ingClassValue == "" { + failures = append(failures, fmt.Sprintf("Ingress %s/%s does not specify an Ingress class.", ing.Namespace, ing.Name)) + } else { + ingressClassName = &ingClassValue + } + } + + // check if ingressclass exist + if ingressClassName != nil { + _, err := client.GetClient().NetworkingV1().IngressClasses().Get(ctx, *ingressClassName, metav1.GetOptions{}) + if err != nil { + failures = append(failures, fmt.Sprintf("Ingress uses the ingress class %s which does not exist.", *ingressClassName)) + } + } + // loop over rules for _, rule := range ing.Spec.Rules { // loop over paths From c8f3c946b00c00cd185961a4fa777806da94014e Mon Sep 17 00:00:00 2001 From: Alex Jones Date: Thu, 30 Mar 2023 12:49:02 +0100 Subject: [PATCH 09/24] fix: now supports different kubeconfig and kubectx Signed-off-by: Alex Jones --- cmd/root.go | 24 ++++++++++++++---------- pkg/kubernetes/kubernetes.go | 21 +++++++++++---------- 2 files changed, 25 insertions(+), 20 deletions(-) diff --git a/cmd/root.go b/cmd/root.go index 446250bee2..e4030c4c30 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -2,8 +2,10 @@ package cmd import ( "os" + "path/filepath" "github.com/k8sgpt-ai/k8sgpt/cmd/generate" + "k8s.io/client-go/util/homedir" "github.com/fatih/color" "github.com/k8sgpt-ai/k8sgpt/cmd/analyze" @@ -14,10 +16,10 @@ import ( ) var ( - cfgFile string - masterURL string - kubeconfig string - version string + cfgFile string + kubecontext string + kubeconfig string + version string ) // rootCmd represents the base command when called without any subcommands @@ -43,23 +45,25 @@ func Execute(v string) { func init() { cobra.OnInitialize(initConfig) - // Here you will define your flags and configuration settings. - // Cobra supports persistent flags, which, if defined here, - // will be global for your application. + var kubeconfigPath string + if home := homedir.HomeDir(); home != "" { + kubeconfigPath = filepath.Join(home, ".kube", "config") + } rootCmd.AddCommand(auth.AuthCmd) rootCmd.AddCommand(analyze.AnalyzeCmd) rootCmd.AddCommand(generate.GenerateCmd) rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.k8sgpt.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.") + rootCmd.PersistentFlags().StringVar(&kubecontext, "kubecontext", "", "Kubernetes context to use. Only required if out-of-cluster.") + rootCmd.PersistentFlags().StringVar(&kubeconfig, "kubeconfig", kubeconfigPath, "Path to a kubeconfig. Only required if out-of-cluster.") // Cobra also supports local flags, which will only run // when this action is called directly. // rootCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle") //Initialise the kubeconfig - kubernetesClient, err := kubernetes.NewClient(masterURL, kubeconfig) + kubernetesClient, err := kubernetes.NewClient(kubecontext, kubeconfig) if err != nil { color.Red("Error initialising kubernetes client: %v", err) + os.Exit(1) } viper.Set("kubernetesClient", kubernetesClient) diff --git a/pkg/kubernetes/kubernetes.go b/pkg/kubernetes/kubernetes.go index 8d589aa392..522b2c4a98 100644 --- a/pkg/kubernetes/kubernetes.go +++ b/pkg/kubernetes/kubernetes.go @@ -2,7 +2,6 @@ package kubernetes import ( "k8s.io/client-go/kubernetes" - "k8s.io/client-go/rest" "k8s.io/client-go/tools/clientcmd" ) @@ -14,21 +13,23 @@ func (c *Client) GetClient() *kubernetes.Clientset { return c.client } -func NewClient(masterURL string, kubeconfig string) (*Client, error) { +func NewClient(kubecontext string, kubeconfig string) (*Client, error) { - config, err := rest.InClusterConfig() + config := clientcmd.NewNonInteractiveDeferredLoadingClientConfig( + &clientcmd.ClientConfigLoadingRules{ExplicitPath: kubeconfig}, + &clientcmd.ConfigOverrides{ + CurrentContext: kubecontext, + }) + // create the clientset + c, err := config.ClientConfig() if err != nil { - kubeconfig := - clientcmd.NewDefaultClientConfigLoadingRules().GetDefaultFilename() - config, err = clientcmd.BuildConfigFromFlags(masterURL, kubeconfig) - if err != nil { - return nil, err - } + return nil, err } - clientSet, err := kubernetes.NewForConfig(config) + clientSet, err := kubernetes.NewForConfig(c) if err != nil { return nil, err } + return &Client{ client: clientSet, }, nil From 26db0f6941036f201907417a63de3153aacc8b20 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 30 Mar 2023 12:29:37 +0000 Subject: [PATCH 10/24] chore(main): release 0.1.4 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 78eef9520c..e16b739746 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1 +1 @@ -{".":"0.1.3"} \ No newline at end of file +{".":"0.1.4"} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b07996eed..9dd3dd07c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,23 @@ # Changelog +## [0.1.4](https://github.com/k8sgpt-ai/k8sgpt/compare/v0.1.3...v0.1.4) (2023-03-30) + + +### Features + +* add Ingress class validation ([#154](https://github.com/k8sgpt-ai/k8sgpt/issues/154)) ([b061566](https://github.com/k8sgpt-ai/k8sgpt/commit/b061566404ef80288ca29add2d401574109d44c0)) +* output selected backend ([#153](https://github.com/k8sgpt-ai/k8sgpt/issues/153)) ([be061da](https://github.com/k8sgpt-ai/k8sgpt/commit/be061da5b65045938acd70ad2eb2d21b87d2d6bf)) + + +### Bug Fixes + +* now supports different kubeconfig and kubectx ([c8f3c94](https://github.com/k8sgpt-ai/k8sgpt/commit/c8f3c946b00c00cd185961a4fa777806da94014e)) + + +### Refactoring + +* removed sample flag ([0afd528](https://github.com/k8sgpt-ai/k8sgpt/commit/0afd52844b96579391f77698bf0555145b6d2be8)) + ## [0.1.3](https://github.com/k8sgpt-ai/k8sgpt/compare/v0.1.2...v0.1.3) (2023-03-30) From 6e17c9e285e3871bb8f694b734a8cd6fd02e60f0 Mon Sep 17 00:00:00 2001 From: HOLLEVILLE Matthis <99146727+matthisholleville@users.noreply.github.com> Date: Thu, 30 Mar 2023 20:58:41 +0200 Subject: [PATCH 11/24] feat: add filter command add "list" subcommand (#159) * feat: add filter command add "list" subcommand to display available filters Signed-off-by: Matthis Holleville * feat: create specific file to filterList Signed-off-by: Matthis Holleville * feat: rename ListAnalyzers to ListFilters Signed-off-by: Matthis Holleville --------- Signed-off-by: Matthis Holleville --- README.md | 8 ++++++++ cmd/filters/filters.go | 23 +++++++++++++++++++++++ cmd/filters/filtersList.go | 21 +++++++++++++++++++++ cmd/root.go | 2 ++ pkg/analyzer/analyzer.go | 8 ++++++++ 5 files changed, 62 insertions(+) create mode 100644 cmd/filters/filters.go create mode 100644 cmd/filters/filtersList.go diff --git a/README.md b/README.md index a648b5edc2..de9c76350f 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,7 @@ If you install gcc as suggested, the problem will persist. Therefore, you need t * Currently the default AI provider is OpenAI, you will need to generate an API key from [OpenAI](https://openai.com) * You can do this by running `k8sgpt generate` to open a browser link to generate it * Run `k8sgpt auth` to set it in k8sgpt. +* Run `k8sgpt filters` to manage filters. * Run `k8sgpt analyze` to run a scan. * And use `k8sgpt analyze --explain` to get a more detailed explanation of the issues. @@ -76,6 +77,7 @@ Available Commands: analyze This command will find problems within your Kubernetes cluster auth Authenticate with your chosen backend completion Generate the autocompletion script for the specified shell + filters Manage filters for analyzing Kubernetes resources generate Generate Key for your chosen backend (opens browser) help Help about any command version Print the version number of k8sgpt @@ -98,6 +100,12 @@ k8sgpt auth k8sgpt analyze --explain ``` +_List filters_ + +``` +k8sgpt filters list +``` + _Filter on resource_ ``` diff --git a/cmd/filters/filters.go b/cmd/filters/filters.go new file mode 100644 index 0000000000..f2146ffff4 --- /dev/null +++ b/cmd/filters/filters.go @@ -0,0 +1,23 @@ +package filters + +import ( + "github.com/spf13/cobra" +) + +var FiltersCmd = &cobra.Command{ + Use: "filters", + Aliases: []string{"filters"}, + Short: "Manage filters for analyzing Kubernetes resources", + Long: `The filters command allows you to manage filters that are used to analyze Kubernetes resources. + You can list available filters to analyze resources.`, + Run: func(cmd *cobra.Command, args []string) { + if len(args) == 0 { + cmd.Help() + return + } + }, +} + +func init() { + FiltersCmd.AddCommand(filterListCmd) +} diff --git a/cmd/filters/filtersList.go b/cmd/filters/filtersList.go new file mode 100644 index 0000000000..3f230b522c --- /dev/null +++ b/cmd/filters/filtersList.go @@ -0,0 +1,21 @@ +package filters + +import ( + "fmt" + + "github.com/fatih/color" + "github.com/k8sgpt-ai/k8sgpt/pkg/analyzer" + "github.com/spf13/cobra" +) + +var filterListCmd = &cobra.Command{ + Use: "list", + Short: "List available filters", + Long: `The list command displays a list of available filters that can be used to analyze Kubernetes resources.`, + Run: func(cmd *cobra.Command, args []string) { + fmt.Printf("Available filters : \n") + for _, analyzer := range analyzer.ListFilters() { + fmt.Printf("> %s\n", color.GreenString(analyzer)) + } + }, +} diff --git a/cmd/root.go b/cmd/root.go index e4030c4c30..aa1c75ef9a 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -4,6 +4,7 @@ import ( "os" "path/filepath" + "github.com/k8sgpt-ai/k8sgpt/cmd/filters" "github.com/k8sgpt-ai/k8sgpt/cmd/generate" "k8s.io/client-go/util/homedir" @@ -51,6 +52,7 @@ func init() { } rootCmd.AddCommand(auth.AuthCmd) rootCmd.AddCommand(analyze.AnalyzeCmd) + rootCmd.AddCommand(filters.FiltersCmd) rootCmd.AddCommand(generate.GenerateCmd) rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.k8sgpt.yaml)") rootCmd.PersistentFlags().StringVar(&kubecontext, "kubecontext", "", "Kubernetes context to use. Only required if out-of-cluster.") diff --git a/pkg/analyzer/analyzer.go b/pkg/analyzer/analyzer.go index 89bfaed065..e5a7d954d9 100644 --- a/pkg/analyzer/analyzer.go +++ b/pkg/analyzer/analyzer.go @@ -81,3 +81,11 @@ func ParseViaAI(ctx context.Context, config *AnalysisConfiguration, } return response, nil } + +func ListFilters() []string { + keys := make([]string, 0, len(analyzerMap)) + for k := range analyzerMap { + keys = append(keys, k) + } + return keys +} From 32ddf6691ce083fd4283a1d5ac4b9f02e90df867 Mon Sep 17 00:00:00 2001 From: Matthis Holleville Date: Thu, 30 Mar 2023 22:02:17 +0200 Subject: [PATCH 12/24] feat: add & remove default filter(s) to analyze. Signed-off-by: Matthis Holleville --- README.md | 38 +++++++++++++++++---- cmd/filters/filters.go | 2 ++ cmd/filters/filtersAdd.go | 65 ++++++++++++++++++++++++++++++++++++ cmd/filters/filtersRemove.go | 62 ++++++++++++++++++++++++++++++++++ pkg/analyzer/analyzer.go | 21 ++++++++++-- pkg/util/util.go | 17 ++++++++++ 6 files changed, 195 insertions(+), 10 deletions(-) create mode 100644 cmd/filters/filtersAdd.go create mode 100644 cmd/filters/filtersRemove.go diff --git a/README.md b/README.md index de9c76350f..742ce994d1 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ If you install gcc as suggested, the problem will persist. Therefore, you need t * Currently the default AI provider is OpenAI, you will need to generate an API key from [OpenAI](https://openai.com) * You can do this by running `k8sgpt generate` to open a browser link to generate it * Run `k8sgpt auth` to set it in k8sgpt. -* Run `k8sgpt filters` to manage filters. +* Run `k8sgpt filters` to manage the default filters used by the analyzer. By default, all filters are executed during analysis. * Run `k8sgpt analyze` to run a scan. * And use `k8sgpt analyze --explain` to get a more detailed explanation of the issues. @@ -92,18 +92,42 @@ Flags: Use "k8sgpt [command] --help" for more information about a command. ``` -_Run a scan with the default analyzers_ +_Manage filters_ + +_List filters_ ``` -k8sgpt generate -k8sgpt auth -k8sgpt analyze --explain +k8sgpt filters list ``` -_List filters_ +_Add default filters_ ``` -k8sgpt filters list +k8sgpt filters add [filter(s)] +``` + +### Examples : + +- Simple filter : `k8sgpt filters add Service` +- Multiple filters : `k8sgpt filters add Ingress Pod` + +_Add default filters_ + +``` +k8sgpt filters remove [filter(s)] +``` + +### Examples : + +- Simple filter : `k8sgpt filters remove Service` +- Multiple filters : `k8sgpt filters remove Ingress Pod` + +_Run a scan with the default analyzers_ + +``` +k8sgpt generate +k8sgpt auth +k8sgpt analyze --explain ``` _Filter on resource_ diff --git a/cmd/filters/filters.go b/cmd/filters/filters.go index f2146ffff4..5edcdb2a86 100644 --- a/cmd/filters/filters.go +++ b/cmd/filters/filters.go @@ -20,4 +20,6 @@ var FiltersCmd = &cobra.Command{ func init() { FiltersCmd.AddCommand(filterListCmd) + FiltersCmd.AddCommand(filtersAddCmd) + FiltersCmd.AddCommand(filtersRemoveCmd) } diff --git a/cmd/filters/filtersAdd.go b/cmd/filters/filtersAdd.go new file mode 100644 index 0000000000..bada0943d6 --- /dev/null +++ b/cmd/filters/filtersAdd.go @@ -0,0 +1,65 @@ +package filters + +import ( + "os" + "strings" + + "github.com/fatih/color" + "github.com/k8sgpt-ai/k8sgpt/pkg/analyzer" + "github.com/k8sgpt-ai/k8sgpt/pkg/util" + "github.com/spf13/cobra" + "github.com/spf13/viper" +) + +var filtersAddCmd = &cobra.Command{ + Use: "add [filter(s)]", + Short: "Adds one or more new filters.", + Long: `The add command adds one or more new filters to the default set of filters used by the analyze.`, + Args: cobra.MinimumNArgs(1), + Run: func(cmd *cobra.Command, args []string) { + + // Verify filter exist + invalidFilters := []string{} + for _, f := range args { + foundFilter := false + for _, filter := range analyzer.ListFilters() { + if filter == f { + foundFilter = true + break + } + } + if !foundFilter { + invalidFilters = append(invalidFilters, f) + } + } + + if len(invalidFilters) != 0 { + color.Red("Filter %s does not exist. Please use k8sgpt filters list", strings.Join(invalidFilters, ", ")) + os.Exit(1) + } + + // Get defined default_filters + defaultFilters := viper.GetStringSlice("default_filters") + if len(defaultFilters) == 0 { + defaultFilters = []string{} + } + + mergedFilters := append(defaultFilters, args...) + + uniqueFilters, dupplicateFilters := util.RemoveDuplicates(mergedFilters) + + // Verify dupplicate + if len(dupplicateFilters) != 0 { + color.Red("Duplicate filters found: %s", strings.Join(dupplicateFilters, ", ")) + os.Exit(1) + } + + viper.Set("default_filters", uniqueFilters) + + if err := viper.WriteConfig(); err != nil { + color.Red("Error writing config file: %s", err.Error()) + os.Exit(1) + } + color.Green("Filter %s added", strings.Join(args, ", ")) + }, +} diff --git a/cmd/filters/filtersRemove.go b/cmd/filters/filtersRemove.go new file mode 100644 index 0000000000..7e15387535 --- /dev/null +++ b/cmd/filters/filtersRemove.go @@ -0,0 +1,62 @@ +package filters + +import ( + "os" + "strings" + + "github.com/fatih/color" + "github.com/k8sgpt-ai/k8sgpt/pkg/util" + "github.com/spf13/cobra" + "github.com/spf13/viper" +) + +var filtersRemoveCmd = &cobra.Command{ + Use: "remove [filter(s)]", + Short: "Remove one or more filters.", + Long: `The add command remove one or more filters to the default set of filters used by the analyze.`, + Args: cobra.MinimumNArgs(1), + Run: func(cmd *cobra.Command, args []string) { + + // Get defined default_filters + defaultFilters := viper.GetStringSlice("default_filters") + if len(defaultFilters) == 0 { + defaultFilters = []string{} + } + + // verify dupplicate filters example: k8sgpt filters remove Pod Pod + uniqueFilters, dupplicateFilters := util.RemoveDuplicates(args) + if len(dupplicateFilters) != 0 { + color.Red("Duplicate filters found: %s", strings.Join(dupplicateFilters, ", ")) + os.Exit(1) + } + + // Verify if filter exist in config file and update default_filter + filterNotFound := []string{} + for _, filter := range uniqueFilters { + foundFilter := false + for i, f := range defaultFilters { + if f == filter { + foundFilter = true + defaultFilters = append(defaultFilters[:i], defaultFilters[i+1:]...) + break + } + } + if !foundFilter { + filterNotFound = append(filterNotFound, filter) + } + } + + if len(filterNotFound) != 0 { + color.Red("Filter(s) %s does not exist in configuration file. Please use k8sgpt filters add.", strings.Join(filterNotFound, ", ")) + os.Exit(1) + } + + viper.Set("default_filters", defaultFilters) + + if err := viper.WriteConfig(); err != nil { + color.Red("Error writing config file: %s", err.Error()) + os.Exit(1) + } + color.Green("Filter(s) %s removed", strings.Join(args, ", ")) + }, +} diff --git a/pkg/analyzer/analyzer.go b/pkg/analyzer/analyzer.go index e5a7d954d9..325ace230f 100644 --- a/pkg/analyzer/analyzer.go +++ b/pkg/analyzer/analyzer.go @@ -24,8 +24,10 @@ func RunAnalysis(ctx context.Context, filters []string, config *AnalysisConfigur client *kubernetes.Client, aiClient ai.IAI, analysisResults *[]Analysis) error { - // if there are no filters selected then run all of them - if len(filters) == 0 { + defaultFilters := viper.GetStringSlice("default_filters") + + // if there are no filters selected and no default_filters then run all of them + if len(filters) == 0 && len(defaultFilters) == 0 { for _, analyzer := range analyzerMap { if err := analyzer(ctx, config, client, aiClient, analysisResults); err != nil { return err @@ -34,7 +36,20 @@ func RunAnalysis(ctx context.Context, filters []string, config *AnalysisConfigur return nil } - for _, filter := range filters { + // if the filters flag is specified + if len(filters) != 0 { + for _, filter := range filters { + if analyzer, ok := analyzerMap[filter]; ok { + if err := analyzer(ctx, config, client, aiClient, analysisResults); err != nil { + return err + } + } + } + return nil + } + + // use default_filters + for _, filter := range defaultFilters { if analyzer, ok := analyzerMap[filter]; ok { if err := analyzer(ctx, config, client, aiClient, analysisResults); err != nil { return err diff --git a/pkg/util/util.go b/pkg/util/util.go index 598a8c73c3..79a7223f37 100644 --- a/pkg/util/util.go +++ b/pkg/util/util.go @@ -65,3 +65,20 @@ func GetParent(client *kubernetes.Client, meta metav1.ObjectMeta) (string, bool) } return meta.Name, false } + +func RemoveDuplicates(slice []string) ([]string, []string) { + set := make(map[string]bool) + duplicates := []string{} + for _, val := range slice { + if _, ok := set[val]; !ok { + set[val] = true + } else { + duplicates = append(duplicates, val) + } + } + uniqueSlice := make([]string, 0, len(set)) + for val := range set { + uniqueSlice = append(uniqueSlice, val) + } + return uniqueSlice, duplicates +} From 25f8dc390cccd66965993f464351e671af11f8ac Mon Sep 17 00:00:00 2001 From: AlexsJones Date: Fri, 31 Mar 2023 09:07:08 +0100 Subject: [PATCH 13/24] chore: renamed filter list file Signed-off-by: AlexsJones --- cmd/filters/{filtersList.go => list.go} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename cmd/filters/{filtersList.go => list.go} (100%) diff --git a/cmd/filters/filtersList.go b/cmd/filters/list.go similarity index 100% rename from cmd/filters/filtersList.go rename to cmd/filters/list.go From a8bf45134ff3a72dc3e531d720f119790faff9d4 Mon Sep 17 00:00:00 2001 From: Matthis Holleville Date: Fri, 31 Mar 2023 10:24:22 +0200 Subject: [PATCH 14/24] fix: kubecontext flag has no effect Signed-off-by: Matthis Holleville --- cmd/root.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/cmd/root.go b/cmd/root.go index aa1c75ef9a..01e71f5930 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -61,15 +61,6 @@ func init() { // when this action is called directly. // rootCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle") - //Initialise the kubeconfig - kubernetesClient, err := kubernetes.NewClient(kubecontext, kubeconfig) - if err != nil { - color.Red("Error initialising kubernetes client: %v", err) - os.Exit(1) - } - - viper.Set("kubernetesClient", kubernetesClient) - } // initConfig reads in config file and ENV variables if set. @@ -90,6 +81,15 @@ func initConfig() { viper.SafeWriteConfig() } + //Initialise the kubeconfig + kubernetesClient, err := kubernetes.NewClient(kubecontext, kubeconfig) + if err != nil { + color.Red("Error initialising kubernetes client: %v", err) + os.Exit(1) + } + + viper.Set("kubernetesClient", kubernetesClient) + viper.AutomaticEnv() // read in environment variables that match // If a config file is found, read it in. From 30faf842541c0be6b6483f71f6cf04d5cafecef5 Mon Sep 17 00:00:00 2001 From: Matthis Holleville Date: Fri, 31 Mar 2023 12:55:16 +0200 Subject: [PATCH 15/24] feat: remove filter prefix on subcommand Signed-off-by: Matthis Holleville --- cmd/filters/{filtersAdd.go => add.go} | 2 +- cmd/filters/filters.go | 6 +++--- cmd/filters/list.go | 2 +- cmd/filters/{filtersRemove.go => remove.go} | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) rename cmd/filters/{filtersAdd.go => add.go} (97%) rename cmd/filters/{filtersRemove.go => remove.go} (97%) diff --git a/cmd/filters/filtersAdd.go b/cmd/filters/add.go similarity index 97% rename from cmd/filters/filtersAdd.go rename to cmd/filters/add.go index bada0943d6..32aa99aa9a 100644 --- a/cmd/filters/filtersAdd.go +++ b/cmd/filters/add.go @@ -11,7 +11,7 @@ import ( "github.com/spf13/viper" ) -var filtersAddCmd = &cobra.Command{ +var addCmd = &cobra.Command{ Use: "add [filter(s)]", Short: "Adds one or more new filters.", Long: `The add command adds one or more new filters to the default set of filters used by the analyze.`, diff --git a/cmd/filters/filters.go b/cmd/filters/filters.go index 5edcdb2a86..eb555240be 100644 --- a/cmd/filters/filters.go +++ b/cmd/filters/filters.go @@ -19,7 +19,7 @@ var FiltersCmd = &cobra.Command{ } func init() { - FiltersCmd.AddCommand(filterListCmd) - FiltersCmd.AddCommand(filtersAddCmd) - FiltersCmd.AddCommand(filtersRemoveCmd) + FiltersCmd.AddCommand(listCmd) + FiltersCmd.AddCommand(addCmd) + FiltersCmd.AddCommand(removeCmd) } diff --git a/cmd/filters/list.go b/cmd/filters/list.go index 3f230b522c..006cf7b1fc 100644 --- a/cmd/filters/list.go +++ b/cmd/filters/list.go @@ -8,7 +8,7 @@ import ( "github.com/spf13/cobra" ) -var filterListCmd = &cobra.Command{ +var listCmd = &cobra.Command{ Use: "list", Short: "List available filters", Long: `The list command displays a list of available filters that can be used to analyze Kubernetes resources.`, diff --git a/cmd/filters/filtersRemove.go b/cmd/filters/remove.go similarity index 97% rename from cmd/filters/filtersRemove.go rename to cmd/filters/remove.go index 7e15387535..cb8705218b 100644 --- a/cmd/filters/filtersRemove.go +++ b/cmd/filters/remove.go @@ -10,7 +10,7 @@ import ( "github.com/spf13/viper" ) -var filtersRemoveCmd = &cobra.Command{ +var removeCmd = &cobra.Command{ Use: "remove [filter(s)]", Short: "Remove one or more filters.", Long: `The add command remove one or more filters to the default set of filters used by the analyze.`, From 0a124484a23789376258413e73628c7b1d7abded Mon Sep 17 00:00:00 2001 From: Matthis Holleville Date: Fri, 31 Mar 2023 13:02:26 +0200 Subject: [PATCH 16/24] fix: spelling on dupplicateFilters Signed-off-by: Matthis Holleville --- cmd/filters/add.go | 6 +++--- cmd/filters/remove.go | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/filters/add.go b/cmd/filters/add.go index 32aa99aa9a..e6b67cc943 100644 --- a/cmd/filters/add.go +++ b/cmd/filters/add.go @@ -46,11 +46,11 @@ var addCmd = &cobra.Command{ mergedFilters := append(defaultFilters, args...) - uniqueFilters, dupplicateFilters := util.RemoveDuplicates(mergedFilters) + uniqueFilters, dupplicatedFilters := util.RemoveDuplicates(mergedFilters) // Verify dupplicate - if len(dupplicateFilters) != 0 { - color.Red("Duplicate filters found: %s", strings.Join(dupplicateFilters, ", ")) + if len(dupplicatedFilters) != 0 { + color.Red("Duplicate filters found: %s", strings.Join(dupplicatedFilters, ", ")) os.Exit(1) } diff --git a/cmd/filters/remove.go b/cmd/filters/remove.go index cb8705218b..02168e2304 100644 --- a/cmd/filters/remove.go +++ b/cmd/filters/remove.go @@ -24,9 +24,9 @@ var removeCmd = &cobra.Command{ } // verify dupplicate filters example: k8sgpt filters remove Pod Pod - uniqueFilters, dupplicateFilters := util.RemoveDuplicates(args) - if len(dupplicateFilters) != 0 { - color.Red("Duplicate filters found: %s", strings.Join(dupplicateFilters, ", ")) + uniqueFilters, dupplicatedFilters := util.RemoveDuplicates(args) + if len(dupplicatedFilters) != 0 { + color.Red("Duplicate filters found: %s", strings.Join(dupplicatedFilters, ", ")) os.Exit(1) } From 9aa0e8960ee340208b4749954c99867842ba58b9 Mon Sep 17 00:00:00 2001 From: Matthis Holleville Date: Fri, 31 Mar 2023 13:30:59 +0200 Subject: [PATCH 17/24] feat: update filters add & remove to be more consistent Signed-off-by: Matthis Holleville --- README.md | 4 ++-- cmd/filters/add.go | 9 +++++---- cmd/filters/remove.go | 7 ++++--- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 742ce994d1..02ed7adb5c 100644 --- a/README.md +++ b/README.md @@ -109,7 +109,7 @@ k8sgpt filters add [filter(s)] ### Examples : - Simple filter : `k8sgpt filters add Service` -- Multiple filters : `k8sgpt filters add Ingress Pod` +- Multiple filters : `k8sgpt filters add Ingress,Pod` _Add default filters_ @@ -120,7 +120,7 @@ k8sgpt filters remove [filter(s)] ### Examples : - Simple filter : `k8sgpt filters remove Service` -- Multiple filters : `k8sgpt filters remove Ingress Pod` +- Multiple filters : `k8sgpt filters remove Ingress,Pod` _Run a scan with the default analyzers_ diff --git a/cmd/filters/add.go b/cmd/filters/add.go index e6b67cc943..5a280aa80d 100644 --- a/cmd/filters/add.go +++ b/cmd/filters/add.go @@ -15,12 +15,13 @@ var addCmd = &cobra.Command{ Use: "add [filter(s)]", Short: "Adds one or more new filters.", Long: `The add command adds one or more new filters to the default set of filters used by the analyze.`, - Args: cobra.MinimumNArgs(1), + Args: cobra.ExactArgs(1), Run: func(cmd *cobra.Command, args []string) { + filters := strings.Split(args[0], ",") // Verify filter exist invalidFilters := []string{} - for _, f := range args { + for _, f := range filters { foundFilter := false for _, filter := range analyzer.ListFilters() { if filter == f { @@ -44,7 +45,7 @@ var addCmd = &cobra.Command{ defaultFilters = []string{} } - mergedFilters := append(defaultFilters, args...) + mergedFilters := append(defaultFilters, filters...) uniqueFilters, dupplicatedFilters := util.RemoveDuplicates(mergedFilters) @@ -60,6 +61,6 @@ var addCmd = &cobra.Command{ color.Red("Error writing config file: %s", err.Error()) os.Exit(1) } - color.Green("Filter %s added", strings.Join(args, ", ")) + color.Green("Filter %s added", strings.Join(filters, ", ")) }, } diff --git a/cmd/filters/remove.go b/cmd/filters/remove.go index 02168e2304..3461a0d069 100644 --- a/cmd/filters/remove.go +++ b/cmd/filters/remove.go @@ -14,8 +14,9 @@ var removeCmd = &cobra.Command{ Use: "remove [filter(s)]", Short: "Remove one or more filters.", Long: `The add command remove one or more filters to the default set of filters used by the analyze.`, - Args: cobra.MinimumNArgs(1), + Args: cobra.ExactArgs(1), Run: func(cmd *cobra.Command, args []string) { + filters := strings.Split(args[0], ",") // Get defined default_filters defaultFilters := viper.GetStringSlice("default_filters") @@ -24,7 +25,7 @@ var removeCmd = &cobra.Command{ } // verify dupplicate filters example: k8sgpt filters remove Pod Pod - uniqueFilters, dupplicatedFilters := util.RemoveDuplicates(args) + uniqueFilters, dupplicatedFilters := util.RemoveDuplicates(filters) if len(dupplicatedFilters) != 0 { color.Red("Duplicate filters found: %s", strings.Join(dupplicatedFilters, ", ")) os.Exit(1) @@ -57,6 +58,6 @@ var removeCmd = &cobra.Command{ color.Red("Error writing config file: %s", err.Error()) os.Exit(1) } - color.Green("Filter(s) %s removed", strings.Join(args, ", ")) + color.Green("Filter(s) %s removed", strings.Join(filters, ", ")) }, } From 975813d3284719c877630ad20f90c6fe163283da Mon Sep 17 00:00:00 2001 From: Matthis Holleville Date: Fri, 31 Mar 2023 13:57:03 +0200 Subject: [PATCH 18/24] feat: check if filters does not empty on add & remove Signed-off-by: Matthis Holleville --- cmd/filters/add.go | 4 ++++ cmd/filters/remove.go | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/cmd/filters/add.go b/cmd/filters/add.go index 5a280aa80d..b59379cb22 100644 --- a/cmd/filters/add.go +++ b/cmd/filters/add.go @@ -22,6 +22,10 @@ var addCmd = &cobra.Command{ // Verify filter exist invalidFilters := []string{} for _, f := range filters { + if f == "" { + color.Red("Filter cannot be empty. Please use correct syntax.") + os.Exit(1) + } foundFilter := false for _, filter := range analyzer.ListFilters() { if filter == f { diff --git a/cmd/filters/remove.go b/cmd/filters/remove.go index 3461a0d069..8ebdc48ef2 100644 --- a/cmd/filters/remove.go +++ b/cmd/filters/remove.go @@ -24,6 +24,14 @@ var removeCmd = &cobra.Command{ defaultFilters = []string{} } + // Check if input filters is not empty + for _, f := range filters { + if f == "" { + color.Red("Filter cannot be empty. Please use correct syntax.") + os.Exit(1) + } + } + // verify dupplicate filters example: k8sgpt filters remove Pod Pod uniqueFilters, dupplicatedFilters := util.RemoveDuplicates(filters) if len(dupplicatedFilters) != 0 { From 3ed545f33fb3ecb3827c03e8c89027c61386c44f Mon Sep 17 00:00:00 2001 From: Matthis Holleville Date: Fri, 31 Mar 2023 15:43:52 +0200 Subject: [PATCH 19/24] feat: rework filters Signed-off-by: Matthis Holleville --- README.md | 2 +- cmd/filters/add.go | 21 +++++++++++---------- cmd/filters/list.go | 24 +++++++++++++++++++++--- cmd/filters/remove.go | 25 +++++++++++++------------ pkg/analyzer/analyzer.go | 10 +++++----- pkg/util/util.go | 14 ++++++++++++++ 6 files changed, 65 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index 02ed7adb5c..4007263626 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ If you install gcc as suggested, the problem will persist. Therefore, you need t * Currently the default AI provider is OpenAI, you will need to generate an API key from [OpenAI](https://openai.com) * You can do this by running `k8sgpt generate` to open a browser link to generate it * Run `k8sgpt auth` to set it in k8sgpt. -* Run `k8sgpt filters` to manage the default filters used by the analyzer. By default, all filters are executed during analysis. +* Run `k8sgpt filters` to manage the active filters used by the analyzer. By default, all filters are executed during analysis. * Run `k8sgpt analyze` to run a scan. * And use `k8sgpt analyze --explain` to get a more detailed explanation of the issues. diff --git a/cmd/filters/add.go b/cmd/filters/add.go index b59379cb22..2387fa95a4 100644 --- a/cmd/filters/add.go +++ b/cmd/filters/add.go @@ -17,17 +17,18 @@ var addCmd = &cobra.Command{ Long: `The add command adds one or more new filters to the default set of filters used by the analyze.`, Args: cobra.ExactArgs(1), Run: func(cmd *cobra.Command, args []string) { - filters := strings.Split(args[0], ",") + inputFilters := strings.Split(args[0], ",") + availableFilters := analyzer.ListFilters() // Verify filter exist invalidFilters := []string{} - for _, f := range filters { + for _, f := range inputFilters { if f == "" { color.Red("Filter cannot be empty. Please use correct syntax.") os.Exit(1) } foundFilter := false - for _, filter := range analyzer.ListFilters() { + for _, filter := range availableFilters { if filter == f { foundFilter = true break @@ -43,13 +44,13 @@ var addCmd = &cobra.Command{ os.Exit(1) } - // Get defined default_filters - defaultFilters := viper.GetStringSlice("default_filters") - if len(defaultFilters) == 0 { - defaultFilters = []string{} + // Get defined active_filters + activeFilters := viper.GetStringSlice("active_filters") + if len(activeFilters) == 0 { + activeFilters = availableFilters } - mergedFilters := append(defaultFilters, filters...) + mergedFilters := append(activeFilters, inputFilters...) uniqueFilters, dupplicatedFilters := util.RemoveDuplicates(mergedFilters) @@ -59,12 +60,12 @@ var addCmd = &cobra.Command{ os.Exit(1) } - viper.Set("default_filters", uniqueFilters) + viper.Set("active_filters", uniqueFilters) if err := viper.WriteConfig(); err != nil { color.Red("Error writing config file: %s", err.Error()) os.Exit(1) } - color.Green("Filter %s added", strings.Join(filters, ", ")) + color.Green("Filter %s added", strings.Join(inputFilters, ", ")) }, } diff --git a/cmd/filters/list.go b/cmd/filters/list.go index 006cf7b1fc..349ad8beba 100644 --- a/cmd/filters/list.go +++ b/cmd/filters/list.go @@ -5,7 +5,9 @@ import ( "github.com/fatih/color" "github.com/k8sgpt-ai/k8sgpt/pkg/analyzer" + "github.com/k8sgpt-ai/k8sgpt/pkg/util" "github.com/spf13/cobra" + "github.com/spf13/viper" ) var listCmd = &cobra.Command{ @@ -13,9 +15,25 @@ var listCmd = &cobra.Command{ Short: "List available filters", Long: `The list command displays a list of available filters that can be used to analyze Kubernetes resources.`, Run: func(cmd *cobra.Command, args []string) { - fmt.Printf("Available filters : \n") - for _, analyzer := range analyzer.ListFilters() { - fmt.Printf("> %s\n", color.GreenString(analyzer)) + activeFilters := viper.GetStringSlice("active_filters") + availableFilters := analyzer.ListFilters() + + if len(activeFilters) == 0 { + activeFilters = availableFilters + } + + inactiveFilters := util.SliceDiff(availableFilters, activeFilters) + fmt.Printf(color.YellowString("Active: \n")) + for _, filter := range activeFilters { + fmt.Printf("> %s\n", color.GreenString(filter)) } + // display inactive filters + if len(inactiveFilters) != 0 { + fmt.Printf(color.YellowString("Unused: \n")) + for _, filter := range inactiveFilters { + fmt.Printf("> %s\n", color.RedString(filter)) + } + } + }, } diff --git a/cmd/filters/remove.go b/cmd/filters/remove.go index 8ebdc48ef2..dab99a1e6e 100644 --- a/cmd/filters/remove.go +++ b/cmd/filters/remove.go @@ -5,6 +5,7 @@ import ( "strings" "github.com/fatih/color" + "github.com/k8sgpt-ai/k8sgpt/pkg/analyzer" "github.com/k8sgpt-ai/k8sgpt/pkg/util" "github.com/spf13/cobra" "github.com/spf13/viper" @@ -16,16 +17,16 @@ var removeCmd = &cobra.Command{ Long: `The add command remove one or more filters to the default set of filters used by the analyze.`, Args: cobra.ExactArgs(1), Run: func(cmd *cobra.Command, args []string) { - filters := strings.Split(args[0], ",") + inputFilters := strings.Split(args[0], ",") - // Get defined default_filters - defaultFilters := viper.GetStringSlice("default_filters") - if len(defaultFilters) == 0 { - defaultFilters = []string{} + // Get defined active_filters + activeFilters := viper.GetStringSlice("active_filters") + if len(activeFilters) == 0 { + activeFilters = analyzer.ListFilters() } - // Check if input filters is not empty - for _, f := range filters { + // Check if input input filters is not empty + for _, f := range inputFilters { if f == "" { color.Red("Filter cannot be empty. Please use correct syntax.") os.Exit(1) @@ -33,7 +34,7 @@ var removeCmd = &cobra.Command{ } // verify dupplicate filters example: k8sgpt filters remove Pod Pod - uniqueFilters, dupplicatedFilters := util.RemoveDuplicates(filters) + uniqueFilters, dupplicatedFilters := util.RemoveDuplicates(inputFilters) if len(dupplicatedFilters) != 0 { color.Red("Duplicate filters found: %s", strings.Join(dupplicatedFilters, ", ")) os.Exit(1) @@ -43,10 +44,10 @@ var removeCmd = &cobra.Command{ filterNotFound := []string{} for _, filter := range uniqueFilters { foundFilter := false - for i, f := range defaultFilters { + for i, f := range activeFilters { if f == filter { foundFilter = true - defaultFilters = append(defaultFilters[:i], defaultFilters[i+1:]...) + activeFilters = append(activeFilters[:i], activeFilters[i+1:]...) break } } @@ -60,12 +61,12 @@ var removeCmd = &cobra.Command{ os.Exit(1) } - viper.Set("default_filters", defaultFilters) + viper.Set("active_filters", activeFilters) if err := viper.WriteConfig(); err != nil { color.Red("Error writing config file: %s", err.Error()) os.Exit(1) } - color.Green("Filter(s) %s removed", strings.Join(filters, ", ")) + color.Green("Filter(s) %s removed", strings.Join(inputFilters, ", ")) }, } diff --git a/pkg/analyzer/analyzer.go b/pkg/analyzer/analyzer.go index 325ace230f..72bc8ea786 100644 --- a/pkg/analyzer/analyzer.go +++ b/pkg/analyzer/analyzer.go @@ -24,10 +24,10 @@ func RunAnalysis(ctx context.Context, filters []string, config *AnalysisConfigur client *kubernetes.Client, aiClient ai.IAI, analysisResults *[]Analysis) error { - defaultFilters := viper.GetStringSlice("default_filters") + activeFilters := viper.GetStringSlice("active_filters") - // if there are no filters selected and no default_filters then run all of them - if len(filters) == 0 && len(defaultFilters) == 0 { + // if there are no filters selected and no active_filters then run all of them + if len(filters) == 0 && len(activeFilters) == 0 { for _, analyzer := range analyzerMap { if err := analyzer(ctx, config, client, aiClient, analysisResults); err != nil { return err @@ -48,8 +48,8 @@ func RunAnalysis(ctx context.Context, filters []string, config *AnalysisConfigur return nil } - // use default_filters - for _, filter := range defaultFilters { + // use active_filters + for _, filter := range activeFilters { if analyzer, ok := analyzerMap[filter]; ok { if err := analyzer(ctx, config, client, aiClient, analysisResults); err != nil { return err diff --git a/pkg/util/util.go b/pkg/util/util.go index 79a7223f37..78e3cf3774 100644 --- a/pkg/util/util.go +++ b/pkg/util/util.go @@ -82,3 +82,17 @@ func RemoveDuplicates(slice []string) ([]string, []string) { } return uniqueSlice, duplicates } + +func SliceDiff(source, dest []string) []string { + mb := make(map[string]struct{}, len(dest)) + for _, x := range dest { + mb[x] = struct{}{} + } + var diff []string + for _, x := range source { + if _, found := mb[x]; !found { + diff = append(diff, x) + } + } + return diff +} From 8e99076497d35efeb8364f63b91d68e7c81a73a0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 31 Mar 2023 14:04:36 +0000 Subject: [PATCH 20/24] chore(main): release 0.1.5 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index e16b739746..896376d096 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1 +1 @@ -{".":"0.1.4"} \ No newline at end of file +{".":"0.1.5"} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 9dd3dd07c7..482949e2a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,28 @@ # Changelog +## [0.1.5](https://github.com/k8sgpt-ai/k8sgpt/compare/v0.1.4...v0.1.5) (2023-03-31) + + +### Features + +* add & remove default filter(s) to analyze. ([32ddf66](https://github.com/k8sgpt-ai/k8sgpt/commit/32ddf6691ce083fd4283a1d5ac4b9f02e90df867)) +* add filter command add "list" subcommand ([#159](https://github.com/k8sgpt-ai/k8sgpt/issues/159)) ([6e17c9e](https://github.com/k8sgpt-ai/k8sgpt/commit/6e17c9e285e3871bb8f694b734a8cd6fd02e60f0)) +* check if filters does not empty on add & remove ([975813d](https://github.com/k8sgpt-ai/k8sgpt/commit/975813d3284719c877630ad20f90c6fe163283da)) +* remove filter prefix on subcommand ([30faf84](https://github.com/k8sgpt-ai/k8sgpt/commit/30faf842541c0be6b6483f71f6cf04d5cafecef5)) +* rework filters ([3ed545f](https://github.com/k8sgpt-ai/k8sgpt/commit/3ed545f33fb3ecb3827c03e8c89027c61386c44f)) +* update filters add & remove to be more consistent ([9aa0e89](https://github.com/k8sgpt-ai/k8sgpt/commit/9aa0e8960ee340208b4749954c99867842ba58b9)) + + +### Bug Fixes + +* kubecontext flag has no effect ([a8bf451](https://github.com/k8sgpt-ai/k8sgpt/commit/a8bf45134ff3a72dc3e531d720f119790faff9d4)) +* spelling on dupplicateFilters ([0a12448](https://github.com/k8sgpt-ai/k8sgpt/commit/0a124484a23789376258413e73628c7b1d7abded)) + + +### Other + +* renamed filter list file ([25f8dc3](https://github.com/k8sgpt-ai/k8sgpt/commit/25f8dc390cccd66965993f464351e671af11f8ac)) + ## [0.1.4](https://github.com/k8sgpt-ai/k8sgpt/compare/v0.1.3...v0.1.4) (2023-03-30) From 869ba909075a5543413fb6ae7fc79aa067c08da4 Mon Sep 17 00:00:00 2001 From: Matthis Holleville Date: Fri, 31 Mar 2023 16:39:28 +0200 Subject: [PATCH 21/24] fix: analysis detail not displayed when --explain Signed-off-by: Matthis Holleville --- cmd/analyze/analyze.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/analyze/analyze.go b/cmd/analyze/analyze.go index 9a1c08d489..b17cabc368 100644 --- a/cmd/analyze/analyze.go +++ b/cmd/analyze/analyze.go @@ -132,7 +132,7 @@ var AnalyzeCmd = &cobra.Command{ for _, err := range analysis.Error { fmt.Printf("- %s %s\n", color.RedString("Error:"), color.RedString(err)) } - color.GreenString(analysis.Details) + fmt.Println(color.GreenString(analysis.Details)) } } }, From 825ad538fe915a020695e1c318ec4db8d3e0b9ab Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 31 Mar 2023 14:42:48 +0000 Subject: [PATCH 22/24] chore(main): release 0.1.6 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 896376d096..e1d78c7112 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1 +1 @@ -{".":"0.1.5"} \ No newline at end of file +{".":"0.1.6"} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 482949e2a2..aa3afd9c9a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.1.6](https://github.com/k8sgpt-ai/k8sgpt/compare/v0.1.5...v0.1.6) (2023-03-31) + + +### Bug Fixes + +* analysis detail not displayed when --explain ([869ba90](https://github.com/k8sgpt-ai/k8sgpt/commit/869ba909075a5543413fb6ae7fc79aa067c08da4)) + ## [0.1.5](https://github.com/k8sgpt-ai/k8sgpt/compare/v0.1.4...v0.1.5) (2023-03-31) From d23da9ae836a07f0fd59c20a1c3c71d6b7f75277 Mon Sep 17 00:00:00 2001 From: Thomas Schuetz <38893055+thschue@users.noreply.github.com> Date: Fri, 31 Mar 2023 21:53:03 +0200 Subject: [PATCH 23/24] chore: refine renovate config (#172) Signed-off-by: Thomas Schuetz --- renovate.json | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/renovate.json b/renovate.json index 1910fc3907..e4f1dff0d3 100644 --- a/renovate.json +++ b/renovate.json @@ -2,7 +2,14 @@ "$schema": "https://docs.renovatebot.com/renovate-schema.json", "extends": [ "config:base", - "helpers:pinGitHubActionDigests" + "helpers:pinGitHubActionDigests", + ":gitSignOff" + + ], + "addLabels": ["dependencies"], + "postUpdateOptions": [ + "gomodTidy", + "gomodMassage" ], "packageRules": [ { @@ -10,9 +17,31 @@ "matchCurrentVersion": "!/^0/", "automerge": true }, + { + "matchManagers": ["gomod"], + "addLabels": ["go"] + }, { "matchManagers": ["github-actions"], - "automerge": true + "addLabels": ["github_actions"] + }, + { + "matchManagers": ["dockerfile"], + "addLabels": ["docker"] + } + ], + "regexManagers": [ + { + "fileMatch": [ + "(^|\\/)Makefile$", + "(^|\\/)Dockerfile", + "(^|\\/).*\\.ya?ml$", + "(^|\\/).*\\.toml$", + "(^|\\/).*\\.sh$" + ], + "matchStrings": [ + "# renovate: datasource=(?.+?) depName=(?.+?)\\s.*?_VERSION ?(\\??=|\\: ?) ?\\\"?(?.+?)?\\\"?\\s" + ] } ] } \ No newline at end of file From 9d9c26214fbb4c4faba7ef85f2204bc961396de8 Mon Sep 17 00:00:00 2001 From: Thomas Schuetz <38893055+thschue@users.noreply.github.com> Date: Fri, 31 Mar 2023 22:02:54 +0200 Subject: [PATCH 24/24] chore: update dependencies (#174) * chore: refine renovate config Signed-off-by: Thomas Schuetz * chore: update dependencies Signed-off-by: Thomas Schuetz --------- Signed-off-by: Thomas Schuetz --- go.mod | 43 +++++++++---------- go.sum | 129 +++++++++++++++++++++++++++++++++++---------------------- 2 files changed, 101 insertions(+), 71 deletions(-) diff --git a/go.mod b/go.mod index 1553fd7572..3bdb85a6b3 100644 --- a/go.mod +++ b/go.mod @@ -16,54 +16,55 @@ require ( require ( github.com/davecgh/go-spew v1.1.1 // indirect - github.com/emicklei/go-restful/v3 v3.9.0 // indirect + github.com/emicklei/go-restful/v3 v3.10.2 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/go-logr/logr v1.2.3 // indirect - github.com/go-openapi/jsonpointer v0.19.5 // indirect - github.com/go-openapi/jsonreference v0.20.0 // indirect - github.com/go-openapi/swag v0.19.14 // indirect + github.com/go-logr/logr v1.2.4 // indirect + github.com/go-openapi/jsonpointer v0.19.6 // indirect + github.com/go-openapi/jsonreference v0.20.2 // indirect + github.com/go-openapi/swag v0.22.3 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.2 // indirect - github.com/google/gnostic v0.5.7-v3refs // indirect + github.com/golang/protobuf v1.5.3 // indirect + github.com/google/gnostic v0.6.9 // indirect github.com/google/go-cmp v0.5.9 // indirect - github.com/google/gofuzz v1.1.0 // indirect + github.com/google/gofuzz v1.2.0 // indirect + github.com/google/uuid v1.3.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect - github.com/imdario/mergo v0.3.6 // indirect - github.com/inconshreveable/mousetrap v1.0.1 // indirect + github.com/imdario/mergo v0.3.15 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/magiconair/properties v1.8.7 // indirect - github.com/mailru/easyjson v0.7.6 // indirect + github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.17 // indirect + github.com/mattn/go-isatty v0.0.18 // indirect github.com/mattn/go-runewidth v0.0.14 // indirect github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect - github.com/pelletier/go-toml/v2 v2.0.6 // indirect + github.com/pelletier/go-toml/v2 v2.0.7 // indirect github.com/rivo/uniseg v0.4.4 // indirect - github.com/spf13/afero v1.9.3 // indirect + github.com/spf13/afero v1.9.5 // indirect github.com/spf13/cast v1.5.0 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/subosito/gotenv v1.4.2 // indirect golang.org/x/net v0.8.0 // indirect - golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783 // indirect + golang.org/x/oauth2 v0.6.0 // indirect golang.org/x/sys v0.6.0 // indirect golang.org/x/text v0.8.0 // indirect - golang.org/x/time v0.1.0 // indirect + golang.org/x/time v0.3.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/protobuf v1.28.1 // indirect + google.golang.org/protobuf v1.30.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/klog/v2 v2.80.1 // indirect - k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 // indirect - k8s.io/utils v0.0.0-20221107191617-1a15be271d1d // indirect - sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect + k8s.io/klog/v2 v2.90.1 // indirect + k8s.io/kube-openapi v0.0.0-20230327201221-f5883ff37f0c // indirect + k8s.io/utils v0.0.0-20230313181309-38a27ef9d749 // indirect + sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/go.sum b/go.sum index 11ab542d24..9074ffd081 100644 --- a/go.sum +++ b/go.sum @@ -38,7 +38,11 @@ cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3f dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= @@ -46,39 +50,41 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= -github.com/emicklei/go-restful/v3 v3.9.0 h1:XwGDlfxEnQZzuopoqxwSEllNcCOM9DhhFyhFIIGKwxE= -github.com/emicklei/go-restful/v3 v3.9.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.10.2 h1:hIovbnmBTLjHXkqEBUz3HGpXZdM7ZrE9fJIZIqlJLqE= +github.com/emicklei/go-restful/v3 v3.10.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= +github.com/flowstack/go-jsonschema v0.1.1/go.mod h1:yL7fNggx1o8rm9RlgXv7hTBWxdBM0rVwpMwimd3F3N0= github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= -github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= -github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonreference v0.20.0 h1:MYlu0sBgChmCfJxxUKZ8g1cPWFOB37YSZqewK7OKeyA= -github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo= -github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.19.14 h1:gm3vOOXfiuw5i9p5N9xJvfjvuofpyvLA9Wr6QfK5Fng= -github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= +github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= +github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= +github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= +github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= +github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= +github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= @@ -107,12 +113,13 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/gnostic v0.5.7-v3refs h1:FhTMOKj2VhjpouxvWJAV1TL304uMlb9zcDqkl6cEI54= -github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ= +github.com/google/gnostic v0.6.9 h1:ZK/5VhkoX835RikCHpSUJV9a+S3e1zLh59YnyWeBW+0= +github.com/google/gnostic v0.6.9/go.mod h1:Nm8234We1lq6iB9OmlgNv3nH91XLLVZHCDayfA3xq+E= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -126,8 +133,8 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= -github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= @@ -143,19 +150,23 @@ github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imdario/mergo v0.3.6 h1:xTNEAn+kxVO7dTZGu0CegyqKZmoWFI0rF8UxjlB2d28= -github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= +github.com/imdario/mergo v0.3.15 h1:M8XP7IuFNsqUx6VPK2P9OSmsYsI/YFaGil0uD21V3dM= +github.com/imdario/mergo v0.3.15/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= @@ -168,6 +179,7 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= @@ -175,15 +187,14 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= -github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= -github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.18 h1:DOKFKCQ7FNG2L1rbrmstDN4QVRdS89Nkh85u68Uwp98= +github.com/mattn/go-isatty v0.0.18/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db h1:62I3jR2EmQ4l5rM/4FEfDWcRD+abF5XlKShorW5LRoQ= @@ -197,12 +208,10 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/onsi/ginkgo/v2 v2.4.0 h1:+Ig9nvqgS5OBSACXNk15PLdp0U9XPYROt9CFzVdFGIs= github.com/onsi/gomega v1.23.0 h1:/oxKu9c2HVap+F3PfKort2Hw5DEU+HGlW8n+tguWsys= -github.com/pelletier/go-toml/v2 v2.0.6 h1:nrzqCb7j9cDFj2coyLNLaZuJTLjWjlaz6nvTvIwycIU= -github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= +github.com/pelletier/go-toml/v2 v2.0.7 h1:muncTPStnKRos5dpVKULv2FVd4bMOhNePj9CjgDb8Us= +github.com/pelletier/go-toml/v2 v2.0.7/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= @@ -211,6 +220,7 @@ github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1: github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -218,8 +228,9 @@ github.com/sashabaranov/go-openai v1.5.7 h1:8DGgRG+P7yWixte5j720y6yiXgY3Hlgcd0gc github.com/sashabaranov/go-openai v1.5.7/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg= github.com/schollz/progressbar/v3 v3.13.1 h1:o8rySDYiQ59Mwzy2FELeHY5ZARXZTVJC7iHD6PEFUiE= github.com/schollz/progressbar/v3 v3.13.1/go.mod h1:xvrbki8kfT1fzWzBT/UZd9L6GA+jdL7HAgq2RFnO6fQ= -github.com/spf13/afero v1.9.3 h1:41FoI0fD7OR7mGcKE/aOiLkGreyf8ifIOQmJANWogMk= -github.com/spf13/afero v1.9.3/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= +github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= @@ -238,7 +249,6 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= @@ -246,6 +256,9 @@ github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKs github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= +github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= +github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -256,13 +269,14 @@ go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -327,6 +341,9 @@ golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -338,8 +355,8 @@ golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783 h1:nt+Q6cXKz4MosCSpnbMtqiQ8Oz0pxTef2B4Vca2lvfk= -golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.6.0 h1:Lh8GPgSKBfWSwFvtuWOfeI3aAAnbXTSutYxJiOJFgIw= +golang.org/x/oauth2 v0.6.0/go.mod h1:ycmewcwgD4Rpr3eZJLSB4Kyyljb3qDh40vJ8STE5HKw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -382,7 +399,10 @@ golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -397,13 +417,16 @@ golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3 golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.1.0 h1:xYY+Bajn2a7VBmTM5GikTmnK8ZuX8YgnQCqZpbBNtmA= -golang.org/x/time v0.1.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= +golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -507,6 +530,7 @@ google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= @@ -514,13 +538,13 @@ google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -534,9 +558,12 @@ google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3Iji google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -549,19 +576,21 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= +google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= @@ -582,17 +611,17 @@ k8s.io/apimachinery v0.26.3 h1:dQx6PNETJ7nODU3XPtrwkfuubs6w7sX0M8n61zHIV/k= k8s.io/apimachinery v0.26.3/go.mod h1:ats7nN1LExKHvJ9TmwootT00Yz05MuYqPXEXaVeOy5I= k8s.io/client-go v0.26.3 h1:k1UY+KXfkxV2ScEL3gilKcF7761xkYsSD6BC9szIu8s= k8s.io/client-go v0.26.3/go.mod h1:ZPNu9lm8/dbRIPAgteN30RSXea6vrCpFvq+MateTUuQ= -k8s.io/klog/v2 v2.80.1 h1:atnLQ121W371wYYFawwYx1aEY2eUfs4l3J72wtgAwV4= -k8s.io/klog/v2 v2.80.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 h1:+70TFaan3hfJzs+7VK2o+OGxg8HsuBr/5f6tVAjDu6E= -k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280/go.mod h1:+Axhij7bCpeqhklhUTe3xmOn6bWxolyZEeyaFpjGtl4= -k8s.io/utils v0.0.0-20221107191617-1a15be271d1d h1:0Smp/HP1OH4Rvhe+4B8nWGERtlqAGSftbSbbmm45oFs= -k8s.io/utils v0.0.0-20221107191617-1a15be271d1d/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/klog/v2 v2.90.1 h1:m4bYOKall2MmOiRaR1J+We67Do7vm9KiQVlT96lnHUw= +k8s.io/klog/v2 v2.90.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/kube-openapi v0.0.0-20230327201221-f5883ff37f0c h1:EFfsozyzZ/pggw5qNx7ftTVZdp7WZl+3ih89GEjYEK8= +k8s.io/kube-openapi v0.0.0-20230327201221-f5883ff37f0c/go.mod h1:byini6yhqGC14c3ebc/QwanvYwhuMWF6yz2F8uwW8eg= +k8s.io/utils v0.0.0-20230313181309-38a27ef9d749 h1:xMMXJlJbsU8w3V5N2FLDQ8YgU8s1EoULdbQBcAeNJkY= +k8s.io/utils v0.0.0-20230313181309-38a27ef9d749/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 h1:iXTIw73aPyC+oRdyqqvVJuloN1p0AC/kzH07hu3NE+k= -sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo=