File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
operator/src/main/java/oracle/kubernetes/operator Expand file tree Collapse file tree 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) {
165165 }
166166
167167 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" );
169170 }
170171
171172 private static String getType (V1JobCondition jobCondition ) {
@@ -185,7 +186,8 @@ public static String getFailedReason(V1Job job) {
185186 V1JobStatus status = job .getStatus ();
186187 if (status != null && status .getConditions () != null ) {
187188 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 ())) {
189191 return cond .getReason ();
190192 }
191193 }
You can’t perform that action at this time.
0 commit comments