You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[x ] I've searched for similar issues and couldn't find anything matching
[x ] I've discussed this feature in the #k8sgpt slack channel
Is this feature request related to a problem?
Yes
[ x] No
As we start to build out more capabilities, there are those that are not necessarily catching "errors" but more best-practice or good guidance on how to operate with Kubernetes. One such example os PDB ( Pod disruption budget ), it is not an error not to have this on a deployment/sts/ds but it is good practice for when you wish to roll a small deployment without loss of availability.
I propose that we have a mechanism to list/set default filters
e.g.
k8sgpt filters list
> Pod
> Service
> Ingress
etc..
Then you could add or remove a filter
k8sgpt filters add: <Resource>
// Check if its found
k8sgpt filters remove: <Resource>
// Check if its found
This would then form the basis of a new array we would pull from viper and loop over
e.g.
func RunAnalysis(ctx context.Context, filters []string, config *AnalysisConfiguration,
client *kubernetes.Client,
aiClient ai.IAI, analysisResults *[]Analysis) error {
// HERE WE WOULD BUILD THE ANALYZER MAP BASED OFF OF viper.Get("default_filters")
// 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
}
for _, filter := range filters {
if analyzer, ok := analyzerMap[filter]; ok {
if err := analyzer(ctx, config, client, aiClient, analysisResults); err != nil {
return err
}
}
}
return nil
}
The text was updated successfully, but these errors were encountered:
Checklist:
Is this feature request related to a problem?
As we start to build out more capabilities, there are those that are not necessarily catching "errors" but more best-practice or good guidance on how to operate with Kubernetes. One such example os PDB ( Pod disruption budget ), it is not an error not to have this on a deployment/sts/ds but it is good practice for when you wish to roll a small deployment without loss of availability.
I propose that we have a mechanism to list/set default filters
e.g.
Then you could add or remove a filter
This would then form the basis of a new array we would pull from viper and loop over
e.g.
The text was updated successfully, but these errors were encountered: