File tree 1 file changed +4
-2
lines changed
operator/src/main/java/oracle/kubernetes/operator 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -165,7 +165,8 @@ private static List<V1JobCondition> getJobConditions(@Nonnull V1Job job) {
165
165
}
166
166
167
167
private static boolean isJobConditionFailed (V1JobCondition jobCondition ) {
168
- return "Failed" .equals (getType (jobCondition )) && getStatus (jobCondition ).equals ("True" );
168
+ return ("FailureTarget" .equals (getType (jobCondition )) || "Failed" .equals (getType (jobCondition )))
169
+ && getStatus (jobCondition ).equals ("True" );
169
170
}
170
171
171
172
private static String getType (V1JobCondition jobCondition ) {
@@ -185,7 +186,8 @@ public static String getFailedReason(V1Job job) {
185
186
V1JobStatus status = job .getStatus ();
186
187
if (status != null && status .getConditions () != null ) {
187
188
for (V1JobCondition cond : status .getConditions ()) {
188
- if ("Failed" .equals (cond .getType ()) && "True" .equals (cond .getStatus ())) {
189
+ if (("FailureTarget" .equals (cond .getType ()) || "Failed" .equals (cond .getType ()))
190
+ && "True" .equals (cond .getStatus ())) {
189
191
return cond .getReason ();
190
192
}
191
193
}
You can’t perform that action at this time.
0 commit comments