File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -219,10 +219,10 @@ func jobMetricFamilies(allowAnnotationsList, allowLabelsList []string) []generat
219
219
}
220
220
}
221
221
222
+ reasonKnown := false
222
223
for _ , c := range j .Status .Conditions {
223
224
condition := c
224
225
if condition .Type == v1batch .JobFailed {
225
- reasonKnown := false
226
226
for _ , reason := range jobFailureReasons {
227
227
reasonKnown = reasonKnown || failureReason (& condition , reason )
228
228
@@ -233,16 +233,16 @@ func jobMetricFamilies(allowAnnotationsList, allowLabelsList []string) []generat
233
233
Value : boolFloat64 (failureReason (& condition , reason )),
234
234
})
235
235
}
236
- // for unknown reasons
237
- if ! reasonKnown {
238
- ms = append (ms , & metric.Metric {
239
- LabelKeys : []string {"reason" },
240
- LabelValues : []string {"" },
241
- Value : float64 (j .Status .Failed ),
242
- })
243
- }
244
236
}
245
237
}
238
+ // for unknown reasons
239
+ if ! reasonKnown {
240
+ ms = append (ms , & metric.Metric {
241
+ LabelKeys : []string {"reason" },
242
+ LabelValues : []string {"" },
243
+ Value : float64 (j .Status .Failed ),
244
+ })
245
+ }
246
246
247
247
return & metric.Family {
248
248
Metrics : ms ,
You can’t perform that action at this time.
0 commit comments