Skip to content

Commit ada35eb

Browse files
committed
Replicaset collector and analyzer
1 parent e7f7e75 commit ada35eb

File tree

9 files changed

+10293
-5
lines changed

9 files changed

+10293
-5
lines changed

pkg/analyze/analyzer.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,20 @@ func Analyze(analyzer *troubleshootv1beta2.Analyze, getFile getCollectedFileCont
219219
}
220220
return results, nil
221221
}
222+
if analyzer.ReplicaSetStatus != nil {
223+
isExcluded, err := isExcluded(analyzer.ReplicaSetStatus.Exclude)
224+
if err != nil {
225+
return nil, err
226+
}
227+
if isExcluded {
228+
return nil, nil
229+
}
230+
results, err := analyzeReplicaSetStatus(analyzer.ReplicaSetStatus, findFiles)
231+
if err != nil {
232+
return nil, err
233+
}
234+
return results, nil
235+
}
222236
if analyzer.ClusterPodStatuses != nil {
223237
isExcluded, err := isExcluded(analyzer.ClusterPodStatuses.Exclude)
224238
if err != nil {

pkg/analyze/data_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,6 @@ var collectedNodes string
1212

1313
//go:embed files/jobs.json
1414
var collectedJobs string
15+
16+
//go:embed files/replicasets.json
17+
var collectedReplicaSets string

0 commit comments

Comments
 (0)