diff --git a/pkg/apis/batch/types.go b/pkg/apis/batch/types.go index e1a6c8ff675..b2f322e7e8b 100644 --- a/pkg/apis/batch/types.go +++ b/pkg/apis/batch/types.go @@ -45,8 +45,12 @@ const ( // Controller UID is used for selectors and labels for jobs ControllerUidLabel = labelPrefix + LegacyControllerUidLabel // Annotation indicating the number of failures for the index corresponding - // to the pod. + // to the pod, which are counted towards the backoff limit. JobIndexFailureCountAnnotation = labelPrefix + "job-index-failure-count" + // Annotation indicating the number of failures for the index corresponding + // to the pod, which don't count towards the backoff limit, according to the + // pod failure policy. When the annotation is absent zero is implied. + JobIndexIgnoredFailureCountAnnotation = labelPrefix + "job-index-ignored-failure-count" ) // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object diff --git a/staging/src/k8s.io/api/batch/v1/types.go b/staging/src/k8s.io/api/batch/v1/types.go index c34d2aebecb..9c730e81931 100644 --- a/staging/src/k8s.io/api/batch/v1/types.go +++ b/staging/src/k8s.io/api/batch/v1/types.go @@ -51,8 +51,12 @@ const ( // There is a corresponding label without the batch.kubernetes.io that we support for legacy reasons. ControllerUidLabel = labelPrefix + "controller-uid" // Annotation indicating the number of failures for the index corresponding - // to the pod. + // to the pod, which are counted towards the backoff limit. JobIndexFailureCountAnnotation = labelPrefix + "job-index-failure-count" + // Annotation indicating the number of failures for the index corresponding + // to the pod, which don't count towards the backoff limit, according to the + // pod failure policy. When the annotation is absent zero is implied. + JobIndexIgnoredFailureCountAnnotation = labelPrefix + "job-index-ignored-failure-count" ) // +genclient