Skip to content

Commit a6fbf14

Browse files
authored
feat: container statuses analyzer (#1698)
* new schema for analyzer ClusterContainerStatues
1 parent b38a6a0 commit a6fbf14

11 files changed

+827
-0
lines changed

config/crds/troubleshoot.sh_analyzers.yaml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,61 @@ spec:
141141
required:
142142
- outcomes
143143
type: object
144+
clusterContainerStatuses:
145+
properties:
146+
annotations:
147+
additionalProperties:
148+
type: string
149+
type: object
150+
checkName:
151+
type: string
152+
exclude:
153+
type: BoolString
154+
namespaces:
155+
items:
156+
type: string
157+
type: array
158+
outcomes:
159+
items:
160+
properties:
161+
fail:
162+
properties:
163+
message:
164+
type: string
165+
uri:
166+
type: string
167+
when:
168+
type: string
169+
type: object
170+
pass:
171+
properties:
172+
message:
173+
type: string
174+
uri:
175+
type: string
176+
when:
177+
type: string
178+
type: object
179+
warn:
180+
properties:
181+
message:
182+
type: string
183+
uri:
184+
type: string
185+
when:
186+
type: string
187+
type: object
188+
type: object
189+
type: array
190+
restartCount:
191+
format: int32
192+
type: integer
193+
strict:
194+
type: BoolString
195+
required:
196+
- outcomes
197+
- restartCount
198+
type: object
144199
clusterPodStatuses:
145200
properties:
146201
annotations:

config/crds/troubleshoot.sh_preflights.yaml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,61 @@ spec:
141141
required:
142142
- outcomes
143143
type: object
144+
clusterContainerStatuses:
145+
properties:
146+
annotations:
147+
additionalProperties:
148+
type: string
149+
type: object
150+
checkName:
151+
type: string
152+
exclude:
153+
type: BoolString
154+
namespaces:
155+
items:
156+
type: string
157+
type: array
158+
outcomes:
159+
items:
160+
properties:
161+
fail:
162+
properties:
163+
message:
164+
type: string
165+
uri:
166+
type: string
167+
when:
168+
type: string
169+
type: object
170+
pass:
171+
properties:
172+
message:
173+
type: string
174+
uri:
175+
type: string
176+
when:
177+
type: string
178+
type: object
179+
warn:
180+
properties:
181+
message:
182+
type: string
183+
uri:
184+
type: string
185+
when:
186+
type: string
187+
type: object
188+
type: object
189+
type: array
190+
restartCount:
191+
format: int32
192+
type: integer
193+
strict:
194+
type: BoolString
195+
required:
196+
- outcomes
197+
- restartCount
198+
type: object
144199
clusterPodStatuses:
145200
properties:
146201
annotations:

config/crds/troubleshoot.sh_supportbundles.yaml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,61 @@ spec:
172172
required:
173173
- outcomes
174174
type: object
175+
clusterContainerStatuses:
176+
properties:
177+
annotations:
178+
additionalProperties:
179+
type: string
180+
type: object
181+
checkName:
182+
type: string
183+
exclude:
184+
type: BoolString
185+
namespaces:
186+
items:
187+
type: string
188+
type: array
189+
outcomes:
190+
items:
191+
properties:
192+
fail:
193+
properties:
194+
message:
195+
type: string
196+
uri:
197+
type: string
198+
when:
199+
type: string
200+
type: object
201+
pass:
202+
properties:
203+
message:
204+
type: string
205+
uri:
206+
type: string
207+
when:
208+
type: string
209+
type: object
210+
warn:
211+
properties:
212+
message:
213+
type: string
214+
uri:
215+
type: string
216+
when:
217+
type: string
218+
type: object
219+
type: object
220+
type: array
221+
restartCount:
222+
format: int32
223+
type: integer
224+
strict:
225+
type: BoolString
226+
required:
227+
- outcomes
228+
- restartCount
229+
type: object
175230
clusterPodStatuses:
176231
properties:
177232
annotations:

pkg/analyze/analyzer.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,8 @@ func GetAnalyzer(analyzer *troubleshootv1beta2.Analyze) Analyzer {
214214
return &AnalyzeReplicaSetStatus{analyzer: analyzer.ReplicaSetStatus}
215215
case analyzer.ClusterPodStatuses != nil:
216216
return &AnalyzeClusterPodStatuses{analyzer: analyzer.ClusterPodStatuses}
217+
case analyzer.ClusterContainerStatuses != nil:
218+
return &AnalyzeClusterContainerStatuses{analyzer: analyzer.ClusterContainerStatuses}
217219
case analyzer.ContainerRuntime != nil:
218220
return &AnalyzeContainerRuntime{analyzer: analyzer.ContainerRuntime}
219221
case analyzer.Distribution != nil:

0 commit comments

Comments
 (0)