diff --git a/api/openapi-spec/swagger.json b/api/openapi-spec/swagger.json index ddeaf135dc3..4668e692c91 100644 --- a/api/openapi-spec/swagger.json +++ b/api/openapi-spec/swagger.json @@ -40977,6 +40977,11 @@ "description": "ConcurrencyPolicy specifies how to treat concurrent executions of a Job.", "type": "string" }, + "failedJobsHistoryLimit": { + "description": "The number of failed finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified.", + "type": "integer", + "format": "int32" + }, "jobTemplate": { "description": "JobTemplate is the object that describes the job that will be created when executing a CronJob.", "$ref": "#/definitions/io.k8s.kubernetes.pkg.apis.batch.v2alpha1.JobTemplateSpec" @@ -40990,6 +40995,11 @@ "type": "integer", "format": "int64" }, + "successfulJobsHistoryLimit": { + "description": "The number of successful finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified.", + "type": "integer", + "format": "int32" + }, "suspend": { "description": "Suspend flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false.", "type": "boolean" diff --git a/pkg/apis/batch/v2alpha1/generated.pb.go b/pkg/apis/batch/v2alpha1/generated.pb.go index bb7b1046ffb..b722f3dc935 100644 --- a/pkg/apis/batch/v2alpha1/generated.pb.go +++ b/pkg/apis/batch/v2alpha1/generated.pb.go @@ -244,6 +244,16 @@ func (m *CronJobSpec) MarshalTo(data []byte) (int, error) { return 0, err } i += n5 + if m.SuccessfulJobsHistoryLimit != nil { + data[i] = 0x30 + i++ + i = encodeVarintGenerated(data, i, uint64(*m.SuccessfulJobsHistoryLimit)) + } + if m.FailedJobsHistoryLimit != nil { + data[i] = 0x38 + i++ + i = encodeVarintGenerated(data, i, uint64(*m.FailedJobsHistoryLimit)) + } return i, nil } @@ -673,6 +683,12 @@ func (m *CronJobSpec) Size() (n int) { } l = m.JobTemplate.Size() n += 1 + l + sovGenerated(uint64(l)) + if m.SuccessfulJobsHistoryLimit != nil { + n += 1 + sovGenerated(uint64(*m.SuccessfulJobsHistoryLimit)) + } + if m.FailedJobsHistoryLimit != nil { + n += 1 + sovGenerated(uint64(*m.FailedJobsHistoryLimit)) + } return n } @@ -849,6 +865,8 @@ func (this *CronJobSpec) String() string { `ConcurrencyPolicy:` + fmt.Sprintf("%v", this.ConcurrencyPolicy) + `,`, `Suspend:` + valueToStringGenerated(this.Suspend) + `,`, `JobTemplate:` + strings.Replace(strings.Replace(this.JobTemplate.String(), "JobTemplateSpec", "JobTemplateSpec", 1), `&`, ``, 1) + `,`, + `SuccessfulJobsHistoryLimit:` + valueToStringGenerated(this.SuccessfulJobsHistoryLimit) + `,`, + `FailedJobsHistoryLimit:` + valueToStringGenerated(this.FailedJobsHistoryLimit) + `,`, `}`, }, "") return s @@ -1371,6 +1389,46 @@ func (m *CronJobSpec) Unmarshal(data []byte) error { return err } iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SuccessfulJobsHistoryLimit", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.SuccessfulJobsHistoryLimit = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FailedJobsHistoryLimit", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FailedJobsHistoryLimit = &v default: iNdEx = preIndex skippy, err := skipGenerated(data[iNdEx:]) @@ -2707,78 +2765,82 @@ var ( ) var fileDescriptorGenerated = []byte{ - // 1162 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xd4, 0x56, 0x4b, 0x6f, 0x23, 0x45, - 0x10, 0xce, 0xd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f4, 0xfb, 0x67, 0x17, 0x95, 0xb9, 0xf3, 0x8b, - 0xca, 0xdc, 0x9f, 0x17, 0x95, 0xb9, 0xef, 0x82, 0x8a, 0x72, 0x16, 0x54, 0x94, 0xf3, 0xa0, 0xa2, - 0xfc, 0x1d, 0x54, 0x94, 0x1f, 0xfe, 0xa9, 0xcc, 0x7d, 0x59, 0x88, 0x78, 0xfe, 0x0d, 0x00, 0x00, - 0xff, 0xff, 0xef, 0x59, 0xca, 0xdd, 0x1e, 0x0f, 0x00, 0x00, + // 1224 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xd4, 0x56, 0xcd, 0x6e, 0x1c, 0x45, + 0x10, 0xf6, 0xec, 0xff, 0xf6, 0xc6, 0x8e, 0xd3, 0x90, 0x64, 0x59, 0xa4, 0x1d, 0x6b, 0x25, 0x90, + 0x13, 0x25, 0x33, 0x64, 0x13, 0x85, 0x90, 0x03, 0x52, 0xc6, 0x08, 0x81, 0xe5, 0x28, 0x56, 0xaf, + 0x43, 0x10, 0x04, 0x94, 0xde, 0xd9, 0xf6, 0xee, 0xc4, 0xf3, 0xc7, 0x74, 0xcf, 0x8a, 0xbd, 0xf1, + 0x08, 0xdc, 0x79, 0x00, 0x5e, 0x01, 0x21, 0xc4, 0x89, 0x43, 0xb8, 0xe5, 0xc0, 0x01, 0x2e, 0x23, + 0x32, 0xbc, 0x85, 0x4f, 0x68, 0x7a, 0x7a, 0x7e, 0xf6, 0xcf, 0xf1, 0x1a, 0xc9, 0x12, 0xb7, 0x99, + 0xea, 0xfa, 0xbe, 0xae, 0xae, 0xfa, 0xba, 0xaa, 0xc1, 0x07, 0x47, 0xf7, 0xa8, 0x62, 0x38, 0xea, + 0x91, 0xdf, 0x27, 0x9e, 0x4d, 0x18, 0xa1, 0xaa, 0x7b, 0x34, 0x54, 0xb1, 0x6b, 0x50, 0xb5, 0x8f, + 0x99, 0x3e, 0x52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8, + 0xba, 0xef, 0x79, 0xc4, 0xd6, 0x27, 0xfb, 0x8e, 0x69, 0xe8, 0x13, 0x5e, 0xc8, 0xba, 0xa6, 0x88, + 0x68, 0x2e, 0xed, 0xcc, 0x3a, 0x1c, 0x2f, 0x32, 0xa2, 0x79, 0x22, 0xf8, 0x0e, 0xa8, 0x52, 0x9f, + 0xba, 0xc4, 0x1e, 0x34, 0x4b, 0x5b, 0xd2, 0x76, 0x4d, 0x6b, 0x84, 0x81, 0x5c, 0xed, 0xc5, 0x26, + 0x94, 0xac, 0xc1, 0x6f, 0x40, 0xe3, 0xb9, 0xd3, 0x3f, 0x20, 0x96, 0x6b, 0x62, 0x46, 0x9a, 0x65, + 0x5e, 0xd3, 0xfb, 0x2b, 0x24, 0x7e, 0x37, 0x43, 0x73, 0x9d, 0xbe, 0x21, 0x42, 0x6f, 0xe4, 0x16, + 0x50, 0x7e, 0x0f, 0xf8, 0x35, 0x68, 0x51, 0x5f, 0xd7, 0x09, 0xa5, 0x87, 0xbe, 0xb9, 0xeb, 0xf4, + 0xe9, 0x27, 0x06, 0x65, 0x8e, 0x37, 0xd9, 0x33, 0x2c, 0x83, 0x35, 0x2b, 0x5b, 0xd2, 0x76, 0x59, + 0x6b, 0x87, 0x81, 0xdc, 0xea, 0x2d, 0xf5, 0x42, 0x27, 0x30, 0x40, 0x04, 0xae, 0x1c, 0x62, 0xc3, + 0x24, 0x83, 0x39, 0xee, 0x2a, 0xe7, 0x6e, 0x85, 0x81, 0x7c, 0xe5, 0xe3, 0x85, 0x1e, 0x68, 0x09, + 0xb2, 0xf3, 0x87, 0x04, 0xd6, 0xa7, 0x6e, 0x0c, 0x7c, 0x0c, 0x2a, 0x58, 0x67, 0xc6, 0x38, 0x12, + 0x50, 0x24, 0xd6, 0x9b, 0xcb, 0x73, 0x96, 0x75, 0x0b, 0x44, 0x0e, 0x49, 0x54, 0x24, 0x92, 0x5d, + 0xb8, 0x07, 0x9c, 0x04, 0x09, 0x32, 0x68, 0x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, 0x4f, 0xae, 0x35, 0x15, 0x13, 0xe4, 0xfd, 0xd5, 0x24, 0x92, 0xb6, + 0x85, 0xac, 0xf3, 0xa6, 0x26, 0x8a, 0x72, 0xf4, 0xf0, 0x09, 0xa8, 0xf3, 0x37, 0x08, 0xbf, 0xb6, + 0x85, 0x95, 0xaf, 0xed, 0x7a, 0x18, 0xc8, 0xf5, 0x5e, 0x42, 0x80, 0x32, 0x2e, 0x78, 0x08, 0x36, + 0x32, 0xad, 0x9c, 0xb1, 0x05, 0xf1, 0xc2, 0xec, 0x4c, 0xb1, 0xa0, 0x19, 0xd6, 0xa8, 0x11, 0x88, + 0x59, 0x5b, 0xe2, 0x92, 0x5d, 0x36, 0x3c, 0x55, 0x50, 0xe7, 0xef, 0x02, 0x32, 0x20, 0x03, 0x5e, + 0xf7, 0xb2, 0x76, 0x49, 0xb8, 0xd6, 0x7b, 0xc9, 0x02, 0xca, 0x7c, 0x22, 0xe2, 0x78, 0xe0, 0x8b, + 0x67, 0x47, 0x4a, 0x1c, 0x3f, 0x0f, 0x90, 0x58, 0xed, 0xfc, 0x25, 0x81, 0xfc, 0x7b, 0xe6, 0x1c, + 0xe6, 0xe5, 0x28, 0xa7, 0xc5, 0xc2, 0x7f, 0x7e, 0x94, 0x9d, 0x24, 0xcc, 0xdf, 0x25, 0x70, 0x71, + 0xc6, 0xff, 0xff, 0xfa, 0x1e, 0xd0, 0xae, 0xbf, 0x78, 0xd5, 0x5e, 0x7b, 0xf9, 0xaa, 0xbd, 0xf6, + 0xe7, 0xab, 0xf6, 0xda, 0x77, 0x61, 0x5b, 0x7a, 0x11, 0xb6, 0xa5, 0x97, 0x61, 0x5b, 0xfa, 0x3b, + 0x6c, 0x4b, 0xdf, 0xff, 0xd3, 0x5e, 0xfb, 0xa2, 0x96, 0xf0, 0xfc, 0x1b, 0x00, 0x00, 0xff, 0xff, + 0x0b, 0x15, 0xd8, 0x21, 0xd2, 0x0f, 0x00, 0x00, } diff --git a/pkg/apis/batch/v2alpha1/generated.proto b/pkg/apis/batch/v2alpha1/generated.proto index 6a842429ad7..1a58f867e8f 100644 --- a/pkg/apis/batch/v2alpha1/generated.proto +++ b/pkg/apis/batch/v2alpha1/generated.proto @@ -82,6 +82,16 @@ message CronJobSpec { // JobTemplate is the object that describes the job that will be created when // executing a CronJob. optional JobTemplateSpec jobTemplate = 5; + + // The number of successful finished jobs to retain. + // This is a pointer to distinguish between explicit zero and not specified. + // +optional + optional int32 successfulJobsHistoryLimit = 6; + + // The number of failed finished jobs to retain. + // This is a pointer to distinguish between explicit zero and not specified. + // +optional + optional int32 failedJobsHistoryLimit = 7; } // CronJobStatus represents the current state of a cron job. diff --git a/pkg/apis/batch/v2alpha1/types.generated.go b/pkg/apis/batch/v2alpha1/types.generated.go index 8efab7a6762..d6d0fe55bfb 100644 --- a/pkg/apis/batch/v2alpha1/types.generated.go +++ b/pkg/apis/batch/v2alpha1/types.generated.go @@ -3793,15 +3793,17 @@ func (x *CronJobSpec) CodecEncodeSelf(e *codec1978.Encoder) { } else { yysep2 := !z.EncBinary() yy2arr2 := z.EncBasicHandle().StructToArray - var yyq2 [5]bool + var yyq2 [7]bool _, _, _ = yysep2, yyq2, yy2arr2 const yyr2 bool = false yyq2[1] = x.StartingDeadlineSeconds != nil yyq2[2] = x.ConcurrencyPolicy != "" yyq2[3] = x.Suspend != nil + yyq2[5] = x.SuccessfulJobsHistoryLimit != nil + yyq2[6] = x.FailedJobsHistoryLimit != nil var yynn2 int if yyr2 || yy2arr2 { - r.EncodeArrayStart(5) + r.EncodeArrayStart(7) } else { yynn2 = 2 for _, b := range yyq2 { @@ -3927,6 +3929,76 @@ func (x *CronJobSpec) CodecEncodeSelf(e *codec1978.Encoder) { yy22 := &x.JobTemplate yy22.CodecEncodeSelf(e) } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[5] { + if x.SuccessfulJobsHistoryLimit == nil { + r.EncodeNil() + } else { + yy25 := *x.SuccessfulJobsHistoryLimit + yym26 := z.EncBinary() + _ = yym26 + if false { + } else { + r.EncodeInt(int64(yy25)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[5] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("successfulJobsHistoryLimit")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.SuccessfulJobsHistoryLimit == nil { + r.EncodeNil() + } else { + yy27 := *x.SuccessfulJobsHistoryLimit + yym28 := z.EncBinary() + _ = yym28 + if false { + } else { + r.EncodeInt(int64(yy27)) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[6] { + if x.FailedJobsHistoryLimit == nil { + r.EncodeNil() + } else { + yy30 := *x.FailedJobsHistoryLimit + yym31 := z.EncBinary() + _ = yym31 + if false { + } else { + r.EncodeInt(int64(yy30)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[6] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("failedJobsHistoryLimit")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.FailedJobsHistoryLimit == nil { + r.EncodeNil() + } else { + yy32 := *x.FailedJobsHistoryLimit + yym33 := z.EncBinary() + _ = yym33 + if false { + } else { + r.EncodeInt(int64(yy32)) + } + } + } + } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { @@ -4046,6 +4118,38 @@ func (x *CronJobSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { yyv11 := &x.JobTemplate yyv11.CodecDecodeSelf(d) } + case "successfulJobsHistoryLimit": + if r.TryDecodeAsNil() { + if x.SuccessfulJobsHistoryLimit != nil { + x.SuccessfulJobsHistoryLimit = nil + } + } else { + if x.SuccessfulJobsHistoryLimit == nil { + x.SuccessfulJobsHistoryLimit = new(int32) + } + yym13 := z.DecBinary() + _ = yym13 + if false { + } else { + *((*int32)(x.SuccessfulJobsHistoryLimit)) = int32(r.DecodeInt(32)) + } + } + case "failedJobsHistoryLimit": + if r.TryDecodeAsNil() { + if x.FailedJobsHistoryLimit != nil { + x.FailedJobsHistoryLimit = nil + } + } else { + if x.FailedJobsHistoryLimit == nil { + x.FailedJobsHistoryLimit = new(int32) + } + yym15 := z.DecBinary() + _ = yym15 + if false { + } else { + *((*int32)(x.FailedJobsHistoryLimit)) = int32(r.DecodeInt(32)) + } + } default: z.DecStructFieldNotFound(-1, yys3) } // end switch yys3 @@ -4057,16 +4161,16 @@ func (x *CronJobSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj12 int - var yyb12 bool - var yyhl12 bool = l >= 0 - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l + var yyj16 int + var yyb16 bool + var yyhl16 bool = l >= 0 + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l } else { - yyb12 = r.CheckBreak() + yyb16 = r.CheckBreak() } - if yyb12 { + if yyb16 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4074,21 +4178,21 @@ func (x *CronJobSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Schedule = "" } else { - yyv13 := &x.Schedule - yym14 := z.DecBinary() - _ = yym14 + yyv17 := &x.Schedule + yym18 := z.DecBinary() + _ = yym18 if false { } else { - *((*string)(yyv13)) = r.DecodeString() + *((*string)(yyv17)) = r.DecodeString() } } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l } else { - yyb12 = r.CheckBreak() + yyb16 = r.CheckBreak() } - if yyb12 { + if yyb16 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4101,20 +4205,20 @@ func (x *CronJobSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.StartingDeadlineSeconds == nil { x.StartingDeadlineSeconds = new(int64) } - yym16 := z.DecBinary() - _ = yym16 + yym20 := z.DecBinary() + _ = yym20 if false { } else { *((*int64)(x.StartingDeadlineSeconds)) = int64(r.DecodeInt(64)) } } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l } else { - yyb12 = r.CheckBreak() + yyb16 = r.CheckBreak() } - if yyb12 { + if yyb16 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4122,16 +4226,16 @@ func (x *CronJobSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ConcurrencyPolicy = "" } else { - yyv17 := &x.ConcurrencyPolicy - yyv17.CodecDecodeSelf(d) + yyv21 := &x.ConcurrencyPolicy + yyv21.CodecDecodeSelf(d) } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l } else { - yyb12 = r.CheckBreak() + yyb16 = r.CheckBreak() } - if yyb12 { + if yyb16 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4144,20 +4248,20 @@ func (x *CronJobSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.Suspend == nil { x.Suspend = new(bool) } - yym19 := z.DecBinary() - _ = yym19 + yym23 := z.DecBinary() + _ = yym23 if false { } else { *((*bool)(x.Suspend)) = r.DecodeBool() } } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l } else { - yyb12 = r.CheckBreak() + yyb16 = r.CheckBreak() } - if yyb12 { + if yyb16 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4165,21 +4269,73 @@ func (x *CronJobSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.JobTemplate = JobTemplateSpec{} } else { - yyv20 := &x.JobTemplate - yyv20.CodecDecodeSelf(d) + yyv24 := &x.JobTemplate + yyv24.CodecDecodeSelf(d) + } + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l + } else { + yyb16 = r.CheckBreak() + } + if yyb16 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.SuccessfulJobsHistoryLimit != nil { + x.SuccessfulJobsHistoryLimit = nil + } + } else { + if x.SuccessfulJobsHistoryLimit == nil { + x.SuccessfulJobsHistoryLimit = new(int32) + } + yym26 := z.DecBinary() + _ = yym26 + if false { + } else { + *((*int32)(x.SuccessfulJobsHistoryLimit)) = int32(r.DecodeInt(32)) + } + } + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l + } else { + yyb16 = r.CheckBreak() + } + if yyb16 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.FailedJobsHistoryLimit != nil { + x.FailedJobsHistoryLimit = nil + } + } else { + if x.FailedJobsHistoryLimit == nil { + x.FailedJobsHistoryLimit = new(int32) + } + yym28 := z.DecBinary() + _ = yym28 + if false { + } else { + *((*int32)(x.FailedJobsHistoryLimit)) = int32(r.DecodeInt(32)) + } } for { - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l + yyj16++ + if yyhl16 { + yyb16 = yyj16 > l } else { - yyb12 = r.CheckBreak() + yyb16 = r.CheckBreak() } - if yyb12 { + if yyb16 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj12-1, "") + z.DecStructFieldNotFound(yyj16-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -4772,7 +4928,7 @@ func (x codecSelfer1234) decSliceCronJob(v *[]CronJob, d *codec1978.Decoder) { yyrg1 := len(yyv1) > 0 yyv21 := yyv1 - yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 1128) + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 1144) if yyrt1 { if yyrl1 <= cap(yyv1) { yyv1 = yyv1[:yyrl1] diff --git a/pkg/apis/batch/v2alpha1/types_swagger_doc_generated.go b/pkg/apis/batch/v2alpha1/types_swagger_doc_generated.go index 6e8c40a0feb..0140e92d3ec 100644 --- a/pkg/apis/batch/v2alpha1/types_swagger_doc_generated.go +++ b/pkg/apis/batch/v2alpha1/types_swagger_doc_generated.go @@ -49,12 +49,14 @@ func (CronJobList) SwaggerDoc() map[string]string { } var map_CronJobSpec = map[string]string{ - "": "CronJobSpec describes how the job execution will look like and when it will actually run.", - "schedule": "Schedule contains the schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.", - "startingDeadlineSeconds": "Optional deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones.", - "concurrencyPolicy": "ConcurrencyPolicy specifies how to treat concurrent executions of a Job.", - "suspend": "Suspend flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false.", - "jobTemplate": "JobTemplate is the object that describes the job that will be created when executing a CronJob.", + "": "CronJobSpec describes how the job execution will look like and when it will actually run.", + "schedule": "Schedule contains the schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.", + "startingDeadlineSeconds": "Optional deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones.", + "concurrencyPolicy": "ConcurrencyPolicy specifies how to treat concurrent executions of a Job.", + "suspend": "Suspend flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false.", + "jobTemplate": "JobTemplate is the object that describes the job that will be created when executing a CronJob.", + "successfulJobsHistoryLimit": "The number of successful finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified.", + "failedJobsHistoryLimit": "The number of failed finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified.", } func (CronJobSpec) SwaggerDoc() map[string]string { diff --git a/pkg/apis/batch/v2alpha1/zz_generated.conversion.go b/pkg/apis/batch/v2alpha1/zz_generated.conversion.go index efea0a5aa0a..428f5c8849e 100644 --- a/pkg/apis/batch/v2alpha1/zz_generated.conversion.go +++ b/pkg/apis/batch/v2alpha1/zz_generated.conversion.go @@ -141,6 +141,8 @@ func autoConvert_v2alpha1_CronJobSpec_To_batch_CronJobSpec(in *CronJobSpec, out if err := Convert_v2alpha1_JobTemplateSpec_To_batch_JobTemplateSpec(&in.JobTemplate, &out.JobTemplate, s); err != nil { return err } + out.SuccessfulJobsHistoryLimit = (*int32)(unsafe.Pointer(in.SuccessfulJobsHistoryLimit)) + out.FailedJobsHistoryLimit = (*int32)(unsafe.Pointer(in.FailedJobsHistoryLimit)) return nil } @@ -156,6 +158,8 @@ func autoConvert_batch_CronJobSpec_To_v2alpha1_CronJobSpec(in *batch.CronJobSpec if err := Convert_batch_JobTemplateSpec_To_v2alpha1_JobTemplateSpec(&in.JobTemplate, &out.JobTemplate, s); err != nil { return err } + out.SuccessfulJobsHistoryLimit = (*int32)(unsafe.Pointer(in.SuccessfulJobsHistoryLimit)) + out.FailedJobsHistoryLimit = (*int32)(unsafe.Pointer(in.FailedJobsHistoryLimit)) return nil } diff --git a/pkg/apis/batch/v2alpha1/zz_generated.deepcopy.go b/pkg/apis/batch/v2alpha1/zz_generated.deepcopy.go index 09bd21ab1b4..1d89e93b0a3 100644 --- a/pkg/apis/batch/v2alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/batch/v2alpha1/zz_generated.deepcopy.go @@ -106,6 +106,16 @@ func DeepCopy_v2alpha1_CronJobSpec(in interface{}, out interface{}, c *conversio if err := DeepCopy_v2alpha1_JobTemplateSpec(&in.JobTemplate, &out.JobTemplate, c); err != nil { return err } + if in.SuccessfulJobsHistoryLimit != nil { + in, out := &in.SuccessfulJobsHistoryLimit, &out.SuccessfulJobsHistoryLimit + *out = new(int32) + **out = **in + } + if in.FailedJobsHistoryLimit != nil { + in, out := &in.FailedJobsHistoryLimit, &out.FailedJobsHistoryLimit + *out = new(int32) + **out = **in + } return nil } } diff --git a/pkg/apis/batch/zz_generated.deepcopy.go b/pkg/apis/batch/zz_generated.deepcopy.go index b620c81422b..8e3ff29e75f 100644 --- a/pkg/apis/batch/zz_generated.deepcopy.go +++ b/pkg/apis/batch/zz_generated.deepcopy.go @@ -106,6 +106,16 @@ func DeepCopy_batch_CronJobSpec(in interface{}, out interface{}, c *conversion.C if err := DeepCopy_batch_JobTemplateSpec(&in.JobTemplate, &out.JobTemplate, c); err != nil { return err } + if in.SuccessfulJobsHistoryLimit != nil { + in, out := &in.SuccessfulJobsHistoryLimit, &out.SuccessfulJobsHistoryLimit + *out = new(int32) + **out = **in + } + if in.FailedJobsHistoryLimit != nil { + in, out := &in.FailedJobsHistoryLimit, &out.FailedJobsHistoryLimit + *out = new(int32) + **out = **in + } return nil } } diff --git a/pkg/generated/openapi/zz_generated.openapi.go b/pkg/generated/openapi/zz_generated.openapi.go index 9419fb040f9..07c2422f1f9 100644 --- a/pkg/generated/openapi/zz_generated.openapi.go +++ b/pkg/generated/openapi/zz_generated.openapi.go @@ -16189,6 +16189,20 @@ func GetOpenAPIDefinitions(ref openapi.ReferenceCallback) map[string]openapi.Ope Ref: ref("k8s.io/kubernetes/pkg/apis/batch/v2alpha1.JobTemplateSpec"), }, }, + "successfulJobsHistoryLimit": { + SchemaProps: spec.SchemaProps{ + Description: "The number of successful finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "failedJobsHistoryLimit": { + SchemaProps: spec.SchemaProps{ + Description: "The number of failed finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified.", + Type: []string{"integer"}, + Format: "int32", + }, + }, }, Required: []string{"schedule", "jobTemplate"}, },