Skip to content

Commit

Permalink
Extend the API for the Job job-index-failure-count annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
mimowo committed Jul 18, 2023
1 parent fcbfdc1 commit cf0b747
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion pkg/apis/batch/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion staging/src/k8s.io/api/batch/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cf0b747

Please sign in to comment.