Skip to content

Commit

Permalink
feat: container statuses analyzer (#1698)
Browse files Browse the repository at this point in the history
* new schema for analyzer ClusterContainerStatues
  • Loading branch information
nvanthao authored Dec 3, 2024
1 parent b38a6a0 commit a6fbf14
Show file tree
Hide file tree
Showing 11 changed files with 827 additions and 0 deletions.
55 changes: 55 additions & 0 deletions config/crds/troubleshoot.sh_analyzers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,61 @@ spec:
required:
- outcomes
type: object
clusterContainerStatuses:
properties:
annotations:
additionalProperties:
type: string
type: object
checkName:
type: string
exclude:
type: BoolString
namespaces:
items:
type: string
type: array
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
restartCount:
format: int32
type: integer
strict:
type: BoolString
required:
- outcomes
- restartCount
type: object
clusterPodStatuses:
properties:
annotations:
Expand Down
55 changes: 55 additions & 0 deletions config/crds/troubleshoot.sh_preflights.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,61 @@ spec:
required:
- outcomes
type: object
clusterContainerStatuses:
properties:
annotations:
additionalProperties:
type: string
type: object
checkName:
type: string
exclude:
type: BoolString
namespaces:
items:
type: string
type: array
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
restartCount:
format: int32
type: integer
strict:
type: BoolString
required:
- outcomes
- restartCount
type: object
clusterPodStatuses:
properties:
annotations:
Expand Down
55 changes: 55 additions & 0 deletions config/crds/troubleshoot.sh_supportbundles.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,61 @@ spec:
required:
- outcomes
type: object
clusterContainerStatuses:
properties:
annotations:
additionalProperties:
type: string
type: object
checkName:
type: string
exclude:
type: BoolString
namespaces:
items:
type: string
type: array
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
restartCount:
format: int32
type: integer
strict:
type: BoolString
required:
- outcomes
- restartCount
type: object
clusterPodStatuses:
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 @@ -214,6 +214,8 @@ func GetAnalyzer(analyzer *troubleshootv1beta2.Analyze) Analyzer {
return &AnalyzeReplicaSetStatus{analyzer: analyzer.ReplicaSetStatus}
case analyzer.ClusterPodStatuses != nil:
return &AnalyzeClusterPodStatuses{analyzer: analyzer.ClusterPodStatuses}
case analyzer.ClusterContainerStatuses != nil:
return &AnalyzeClusterContainerStatuses{analyzer: analyzer.ClusterContainerStatuses}
case analyzer.ContainerRuntime != nil:
return &AnalyzeContainerRuntime{analyzer: analyzer.ContainerRuntime}
case analyzer.Distribution != nil:
Expand Down
Loading

0 comments on commit a6fbf14

Please sign in to comment.