Skip to content

Commit

Permalink
New Event Analyzer (#1474)
Browse files Browse the repository at this point in the history
* add new Event analyzer
  • Loading branch information
nvanthao authored Mar 6, 2024
1 parent 553d709 commit 742e92f
Show file tree
Hide file tree
Showing 11 changed files with 1,020 additions and 0 deletions.
59 changes: 59 additions & 0 deletions config/crds/troubleshoot.sh_analyzers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,65 @@ spec:
required:
- outcomes
type: object
event:
properties:
annotations:
additionalProperties:
type: string
type: object
checkName:
type: string
collectorName:
type: string
exclude:
type: BoolString
kind:
type: string
namespace:
type: string
outcomes:
items:
properties:
fail:
properties:
message:
type: string
uri:
type: string
when:
type: string
type: object
pass:
properties:
message:
type: string
uri:
type: string
when:
type: string
type: object
warn:
properties:
message:
type: string
uri:
type: string
when:
type: string
type: object
type: object
type: array
reason:
type: string
regex:
type: string
strict:
type: BoolString
required:
- collectorName
- outcomes
- reason
type: object
goldpinger:
properties:
annotations:
Expand Down
59 changes: 59 additions & 0 deletions config/crds/troubleshoot.sh_preflights.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,65 @@ spec:
required:
- outcomes
type: object
event:
properties:
annotations:
additionalProperties:
type: string
type: object
checkName:
type: string
collectorName:
type: string
exclude:
type: BoolString
kind:
type: string
namespace:
type: string
outcomes:
items:
properties:
fail:
properties:
message:
type: string
uri:
type: string
when:
type: string
type: object
pass:
properties:
message:
type: string
uri:
type: string
when:
type: string
type: object
warn:
properties:
message:
type: string
uri:
type: string
when:
type: string
type: object
type: object
type: array
reason:
type: string
regex:
type: string
strict:
type: BoolString
required:
- collectorName
- outcomes
- reason
type: object
goldpinger:
properties:
annotations:
Expand Down
59 changes: 59 additions & 0 deletions config/crds/troubleshoot.sh_supportbundles.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,65 @@ spec:
required:
- outcomes
type: object
event:
properties:
annotations:
additionalProperties:
type: string
type: object
checkName:
type: string
collectorName:
type: string
exclude:
type: BoolString
kind:
type: string
namespace:
type: string
outcomes:
items:
properties:
fail:
properties:
message:
type: string
uri:
type: string
when:
type: string
type: object
pass:
properties:
message:
type: string
uri:
type: string
when:
type: string
type: object
warn:
properties:
message:
type: string
uri:
type: string
when:
type: string
type: object
type: object
type: array
reason:
type: string
regex:
type: string
strict:
type: BoolString
required:
- collectorName
- outcomes
- reason
type: object
goldpinger:
properties:
annotations:
Expand Down
2 changes: 2 additions & 0 deletions pkg/analyze/analyzer.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,8 @@ func getAnalyzer(analyzer *troubleshootv1beta2.Analyze) Analyzer {
return &AnalyzeCertificates{analyzer: analyzer.Certificates}
case analyzer.Goldpinger != nil:
return &AnalyzeGoldpinger{analyzer: analyzer.Goldpinger}
case analyzer.Event != nil:
return &AnalyzeEvent{analyzer: analyzer.Event}
default:
return nil
}
Expand Down
Loading

0 comments on commit 742e92f

Please sign in to comment.