Skip to content

Commit

Permalink
Update protobuf files for k8s v1.29.2 (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
danroux authored Apr 18, 2024
1 parent b7c5ca8 commit 09a4c18
Show file tree
Hide file tree
Showing 4 changed files with 743 additions and 48 deletions.
3 changes: 3 additions & 0 deletions .changelog/36.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:improvement
k8s: Update protobuf files for k8s v1.29.2
```
91 changes: 88 additions & 3 deletions src/components/protos/k8s.io/api/batch/v1/generated_pb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,38 @@ export class JobSpec extends Message<JobSpec> {
*/
backoffLimit?: number;

/**
* Specifies the limit for the number of retries within an
* index before marking this index as failed. When enabled the number of
* failures per index is kept in the pod's
* batch.kubernetes.io/job-index-failure-count annotation. It can only
* be set when Job's completionMode=Indexed, and the Pod's restart
* policy is Never. The field is immutable.
* This field is beta-level. It can be used when the `JobBackoffLimitPerIndex`
* feature gate is enabled (enabled by default).
* +optional
*
* @generated from field: optional int32 backoffLimitPerIndex = 12;
*/
backoffLimitPerIndex?: number;

/**
* Specifies the maximal number of failed indexes before marking the Job as
* failed, when backoffLimitPerIndex is set. Once the number of failed
* indexes exceeds this number the entire Job is marked as Failed and its
* execution is terminated. When left as null the job continues execution of
* all of its indexes and is marked with the `Complete` Job condition.
* It can only be specified when backoffLimitPerIndex is set.
* It can be null or up to completions. It is required and must be
* less than or equal to 10^4 when is completions greater than 10^5.
* This field is beta-level. It can be used when the `JobBackoffLimitPerIndex`
* feature gate is enabled (enabled by default).
* +optional
*
* @generated from field: optional int32 maxFailedIndexes = 13;
*/
maxFailedIndexes?: number;

/**
* A label query over pods that should match the pod count.
* Normally, the system sets this field for you.
Expand Down Expand Up @@ -682,6 +714,24 @@ export class JobSpec extends Message<JobSpec> {
*/
suspend?: boolean;

/**
* podReplacementPolicy specifies when to create replacement Pods.
* Possible values are:
* - TerminatingOrFailed means that we recreate pods
* when they are terminating (has a metadata.deletionTimestamp) or failed.
* - Failed means to wait until a previously created Pod is fully terminated (has phase
* Failed or Succeeded) before creating a replacement Pod.
*
* When using podFailurePolicy, Failed is the the only allowed value.
* TerminatingOrFailed and Failed are allowed values when podFailurePolicy is not in use.
* This is an beta field. To use this, enable the JobPodReplacementPolicy feature toggle.
* This is on by default.
* +optional
*
* @generated from field: optional string podReplacementPolicy = 14;
*/
podReplacementPolicy?: string;

constructor(data?: PartialMessage<JobSpec>) {
super();
proto2.util.initPartial(data, this);
Expand All @@ -695,12 +745,15 @@ export class JobSpec extends Message<JobSpec> {
{ no: 3, name: "activeDeadlineSeconds", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true },
{ no: 11, name: "podFailurePolicy", kind: "message", T: PodFailurePolicy, opt: true },
{ no: 7, name: "backoffLimit", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
{ no: 12, name: "backoffLimitPerIndex", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
{ no: 13, name: "maxFailedIndexes", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
{ no: 4, name: "selector", kind: "message", T: LabelSelector, opt: true },
{ no: 5, name: "manualSelector", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
{ no: 6, name: "template", kind: "message", T: PodTemplateSpec, opt: true },
{ no: 8, name: "ttlSecondsAfterFinished", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
{ no: 9, name: "completionMode", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
{ no: 10, name: "suspend", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
{ no: 14, name: "podReplacementPolicy", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
]);

static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): JobSpec {
Expand Down Expand Up @@ -789,6 +842,18 @@ export class JobStatus extends Message<JobStatus> {
*/
failed?: number;

/**
* The number of pods which are terminating (in phase Pending or Running
* and have a deletionTimestamp).
*
* This field is beta-level. The job controller populates the field when
* the feature gate JobPodReplacementPolicy is enabled (enabled by default).
* +optional
*
* @generated from field: optional int32 terminating = 11;
*/
terminating?: number;

/**
* completedIndexes holds the completed indexes when .spec.completionMode =
* "Indexed" in a text format. The indexes are represented as decimal integers
Expand All @@ -803,6 +868,23 @@ export class JobStatus extends Message<JobStatus> {
*/
completedIndexes?: string;

/**
* FailedIndexes holds the failed indexes when backoffLimitPerIndex=true.
* The indexes are represented in the text format analogous as for the
* `completedIndexes` field, ie. they are kept as decimal integers
* separated by commas. The numbers are listed in increasing order. Three or
* more consecutive numbers are compressed and represented by the first and
* last element of the series, separated by a hyphen.
* For example, if the failed indexes are 1, 3, 4, 5 and 7, they are
* represented as "1,3-5,7".
* This field is beta-level. It can be used when the `JobBackoffLimitPerIndex`
* feature gate is enabled (enabled by default).
* +optional
*
* @generated from field: optional string failedIndexes = 10;
*/
failedIndexes?: string;

/**
* uncountedTerminatedPods holds the UIDs of Pods that have terminated but
* the job controller hasn't yet accounted for in the status counters.
Expand All @@ -826,9 +908,6 @@ export class JobStatus extends Message<JobStatus> {

/**
* The number of pods which have a Ready condition.
*
* This field is beta-level. The job controller populates the field when
* the feature gate JobReadyPods is enabled (enabled by default).
* +optional
*
* @generated from field: optional int32 ready = 9;
Expand All @@ -849,7 +928,9 @@ export class JobStatus extends Message<JobStatus> {
{ no: 4, name: "active", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
{ no: 5, name: "succeeded", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
{ no: 6, name: "failed", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
{ no: 11, name: "terminating", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
{ no: 7, name: "completedIndexes", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
{ no: 10, name: "failedIndexes", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
{ no: 8, name: "uncountedTerminatedPods", kind: "message", T: UncountedTerminatedPods, opt: true },
{ no: 9, name: "ready", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
]);
Expand Down Expand Up @@ -1118,6 +1199,10 @@ export class PodFailurePolicyRule extends Message<PodFailurePolicyRule> {
*
* - FailJob: indicates that the pod's job is marked as Failed and all
* running pods are terminated.
* - FailIndex: indicates that the pod's index is marked as Failed and will
* not be restarted.
* This value is beta-level. It can be used when the
* `JobBackoffLimitPerIndex` feature gate is enabled (enabled by default).
* - Ignore: indicates that the counter towards the .backoffLimit is not
* incremented and a replacement pod is created.
* - Count: indicates that the pod is handled in the default way - the
Expand Down
Loading

0 comments on commit 09a4c18

Please sign in to comment.