mirror of
https://github.com/k8sgpt-ai/k8sgpt.git
synced 2025-09-24 20:57:29 +00:00
feat: add anonymization flag
Signed-off-by: Matthis Holleville <matthish29@gmail.com>
This commit is contained in:
@@ -2,6 +2,7 @@ package analyzer
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/k8sgpt-ai/k8sgpt/pkg/util"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
@@ -19,7 +20,7 @@ func (ReplicaSetAnalyzer) Analyze(a Analyzer) ([]Result, error) {
|
||||
var preAnalysis = map[string]PreAnalysis{}
|
||||
|
||||
for _, rs := range list.Items {
|
||||
var failures []string
|
||||
var failures []Failure
|
||||
|
||||
// Check for empty rs
|
||||
if rs.Status.Replicas == 0 {
|
||||
@@ -27,7 +28,11 @@ func (ReplicaSetAnalyzer) Analyze(a Analyzer) ([]Result, error) {
|
||||
// Check through container status to check for crashes
|
||||
for _, rsStatus := range rs.Status.Conditions {
|
||||
if rsStatus.Type == "ReplicaFailure" && rsStatus.Reason == "FailedCreate" {
|
||||
failures = []string{rsStatus.Message}
|
||||
failures = append(failures, Failure{
|
||||
Text: rsStatus.Message,
|
||||
Sensitive: []Sensitive{},
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user