Extend the API for the Job job-index-failure-count annotation

This commit is contained in:
Michal Wozniak 2023-07-18 11:27:16 +02:00
parent fcbfdc1710
commit cf0b74774f
2 changed files with 10 additions and 2 deletions

View File

@ -45,8 +45,12 @@ const (
// Controller UID is used for selectors and labels for jobs // Controller UID is used for selectors and labels for jobs
ControllerUidLabel = labelPrefix + LegacyControllerUidLabel ControllerUidLabel = labelPrefix + LegacyControllerUidLabel
// Annotation indicating the number of failures for the index corresponding // 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" 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 // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

View File

@ -51,8 +51,12 @@ const (
// There is a corresponding label without the batch.kubernetes.io that we support for legacy reasons. // There is a corresponding label without the batch.kubernetes.io that we support for legacy reasons.
ControllerUidLabel = labelPrefix + "controller-uid" ControllerUidLabel = labelPrefix + "controller-uid"
// Annotation indicating the number of failures for the index corresponding // 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" 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 // +genclient