mirror of
https://github.com/k8sgpt-ai/k8sgpt.git
synced 2025-09-15 23:01:33 +00:00
feat: integration refactor (#684)
* feat: more significant refactor Signed-off-by: Alex Jones <alexsimonjones@gmail.com> * feat: more significant refactor Signed-off-by: Alex Jones <alexsimonjones@gmail.com> * feat: reworked the integration activate/deactivation Signed-off-by: Alex Jones <alexsimonjones@gmail.com> * chore: updated schema for list integrations Signed-off-by: Alex Jones <alexsimonjones@gmail.com> * fix: error with incorrect error being swallowed Signed-off-by: Alex Jones <alexsimonjones@gmail.com> * feat: added namespace check Signed-off-by: Alex Jones <alexsimonjones@gmail.com> * chore: fixed issue with namespace and skip install validation Signed-off-by: Alex Jones <alexsimonjones@gmail.com> --------- Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
This commit is contained in:
@@ -32,6 +32,8 @@ type IIntegration interface {
|
||||
AddAnalyzer(*map[string]common.IAnalyzer)
|
||||
|
||||
GetAnalyzerName() []string
|
||||
// An integration must keep record of its deployed namespace (if not using --no-install)
|
||||
GetNamespace() (string, error)
|
||||
|
||||
OwnsAnalyzer(string) bool
|
||||
|
||||
@@ -86,7 +88,6 @@ func (*Integration) Activate(name string, namespace string, activeFilters []stri
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
mergedFilters := activeFilters
|
||||
mergedFilters = append(mergedFilters, integrations[name].GetAnalyzerName()...)
|
||||
uniqueFilters, _ := util.RemoveDuplicates(mergedFilters)
|
||||
|
Reference in New Issue
Block a user