Skip to content

Commit 742e92f

Browse files
authored
New Event Analyzer (#1474)
* add new Event analyzer
1 parent 553d709 commit 742e92f

11 files changed

+1020
-0
lines changed

config/crds/troubleshoot.sh_analyzers.yaml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -559,6 +559,65 @@ spec:
559559
required:
560560
- outcomes
561561
type: object
562+
event:
563+
properties:
564+
annotations:
565+
additionalProperties:
566+
type: string
567+
type: object
568+
checkName:
569+
type: string
570+
collectorName:
571+
type: string
572+
exclude:
573+
type: BoolString
574+
kind:
575+
type: string
576+
namespace:
577+
type: string
578+
outcomes:
579+
items:
580+
properties:
581+
fail:
582+
properties:
583+
message:
584+
type: string
585+
uri:
586+
type: string
587+
when:
588+
type: string
589+
type: object
590+
pass:
591+
properties:
592+
message:
593+
type: string
594+
uri:
595+
type: string
596+
when:
597+
type: string
598+
type: object
599+
warn:
600+
properties:
601+
message:
602+
type: string
603+
uri:
604+
type: string
605+
when:
606+
type: string
607+
type: object
608+
type: object
609+
type: array
610+
reason:
611+
type: string
612+
regex:
613+
type: string
614+
strict:
615+
type: BoolString
616+
required:
617+
- collectorName
618+
- outcomes
619+
- reason
620+
type: object
562621
goldpinger:
563622
properties:
564623
annotations:

config/crds/troubleshoot.sh_preflights.yaml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -559,6 +559,65 @@ spec:
559559
required:
560560
- outcomes
561561
type: object
562+
event:
563+
properties:
564+
annotations:
565+
additionalProperties:
566+
type: string
567+
type: object
568+
checkName:
569+
type: string
570+
collectorName:
571+
type: string
572+
exclude:
573+
type: BoolString
574+
kind:
575+
type: string
576+
namespace:
577+
type: string
578+
outcomes:
579+
items:
580+
properties:
581+
fail:
582+
properties:
583+
message:
584+
type: string
585+
uri:
586+
type: string
587+
when:
588+
type: string
589+
type: object
590+
pass:
591+
properties:
592+
message:
593+
type: string
594+
uri:
595+
type: string
596+
when:
597+
type: string
598+
type: object
599+
warn:
600+
properties:
601+
message:
602+
type: string
603+
uri:
604+
type: string
605+
when:
606+
type: string
607+
type: object
608+
type: object
609+
type: array
610+
reason:
611+
type: string
612+
regex:
613+
type: string
614+
strict:
615+
type: BoolString
616+
required:
617+
- collectorName
618+
- outcomes
619+
- reason
620+
type: object
562621
goldpinger:
563622
properties:
564623
annotations:

config/crds/troubleshoot.sh_supportbundles.yaml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,65 @@ spec:
590590
required:
591591
- outcomes
592592
type: object
593+
event:
594+
properties:
595+
annotations:
596+
additionalProperties:
597+
type: string
598+
type: object
599+
checkName:
600+
type: string
601+
collectorName:
602+
type: string
603+
exclude:
604+
type: BoolString
605+
kind:
606+
type: string
607+
namespace:
608+
type: string
609+
outcomes:
610+
items:
611+
properties:
612+
fail:
613+
properties:
614+
message:
615+
type: string
616+
uri:
617+
type: string
618+
when:
619+
type: string
620+
type: object
621+
pass:
622+
properties:
623+
message:
624+
type: string
625+
uri:
626+
type: string
627+
when:
628+
type: string
629+
type: object
630+
warn:
631+
properties:
632+
message:
633+
type: string
634+
uri:
635+
type: string
636+
when:
637+
type: string
638+
type: object
639+
type: object
640+
type: array
641+
reason:
642+
type: string
643+
regex:
644+
type: string
645+
strict:
646+
type: BoolString
647+
required:
648+
- collectorName
649+
- outcomes
650+
- reason
651+
type: object
593652
goldpinger:
594653
properties:
595654
annotations:

pkg/analyze/analyzer.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,8 @@ func getAnalyzer(analyzer *troubleshootv1beta2.Analyze) Analyzer {
246246
return &AnalyzeCertificates{analyzer: analyzer.Certificates}
247247
case analyzer.Goldpinger != nil:
248248
return &AnalyzeGoldpinger{analyzer: analyzer.Goldpinger}
249+
case analyzer.Event != nil:
250+
return &AnalyzeEvent{analyzer: analyzer.Event}
249251
default:
250252
return nil
251253
}

0 commit comments

Comments
 (0)