mirror of
https://github.com/k8sgpt-ai/k8sgpt.git
synced 2025-09-05 09:12:00 +00:00
fix: append coreAnalyzer if active_filter is empty and integration is added (#441)
Signed-off-by: Matthis Holleville <matthish29@gmail.com>
This commit is contained in:
@@ -66,14 +66,11 @@ func (*Integration) Get(name string) (IIntegration, error) {
|
||||
return integrations[name], nil
|
||||
}
|
||||
|
||||
func (*Integration) Activate(name string, namespace string) error {
|
||||
func (*Integration) Activate(name string, namespace string, activeFilters []string) error {
|
||||
if _, ok := integrations[name]; !ok {
|
||||
return errors.New("integration not found")
|
||||
}
|
||||
|
||||
// Update filters
|
||||
activeFilters := viper.GetStringSlice("active_filters")
|
||||
|
||||
mergedFilters := append(activeFilters, integrations[name].GetAnalyzerName())
|
||||
|
||||
uniqueFilters, dupplicatedFilters := util.RemoveDuplicates(mergedFilters)
|
||||
|
Reference in New Issue
Block a user