diff --git a/internal/scheduler/simulator/simulator.go b/internal/scheduler/simulator/simulator.go index 2dde5298010..d581450aa00 100644 --- a/internal/scheduler/simulator/simulator.go +++ b/internal/scheduler/simulator/simulator.go @@ -10,6 +10,7 @@ import ( "sync/atomic" "time" + "github.com/gogo/protobuf/proto" "github.com/pkg/errors" "golang.org/x/exp/maps" "golang.org/x/exp/slices" @@ -143,6 +144,7 @@ func NewSimulator( if err := validateWorkloadSpec(workloadSpec); err != nil { return nil, err } + workloadSpec = expandRepeatingTemplates(workloadSpec) jobDb := jobdb.NewJobDb( schedulingConfig.PriorityClasses, schedulingConfig.DefaultPriorityClassName, @@ -292,6 +294,14 @@ func validateWorkloadSpec(workloadSpec *WorkloadSpec) error { if template.GangCardinality != 0 && int(template.Number)%int(template.GangCardinality) != 0 { return errors.Errorf("template.Number [%d] is not exactly divisible by template.GangCardinality [%d]", template.Number, template.GangCardinality) } + if template.Repeat != nil { + if template.Repeat.Period == nil { + return errors.Errorf("template.Repeat.Period is unset") + } + if template.Repeat.NumTimes < 1 { + return errors.Errorf("template.Repeat.NumTimes must be greater than 0") + } + } } } return nil @@ -1035,3 +1045,26 @@ func (s *Simulator) removeJobFromDemand(job *jobdb.Job) { r.SubV1ResourceList(job.PodRequirements().ResourceRequirements.Requests) } } + +func expandRepeatingTemplates(w *WorkloadSpec) *WorkloadSpec { + workload := proto.Clone(w).(*WorkloadSpec) + for _, q := range workload.GetQueues() { + var templates []*JobTemplate + for _, template := range q.GetJobTemplates() { + if template.Repeat != nil { + period := *template.Repeat.Period + for i := 0; i < int(template.Repeat.NumTimes); i++ { + t := proto.Clone(template).(*JobTemplate) + t.Repeat = nil + t.Id = fmt.Sprintf("%s-repeat-%d", t.Id, i) + t.EarliestSubmitTime = t.EarliestSubmitTime + time.Duration(i)*period + templates = append(templates, t) + } + } else { + templates = append(templates, template) + } + } + q.JobTemplates = templates + } + return workload +} diff --git a/internal/scheduler/simulator/simulator.pb.go b/internal/scheduler/simulator/simulator.pb.go index 472ca2cf906..22f78aea673 100644 --- a/internal/scheduler/simulator/simulator.pb.go +++ b/internal/scheduler/simulator/simulator.pb.go @@ -384,6 +384,8 @@ type JobTemplate struct { GangCardinality uint32 `protobuf:"varint,13,opt,name=gang_cardinality,json=gangCardinality,proto3" json:"gangCardinality,omitempty"` // Node Uniformity label when scheduling gangs. Only applies if gang_cardinality is non-zero. If unset it defaults to armadaproject.io/clusterName GangNodeUniformityLabel string `protobuf:"bytes,14,opt,name=gang_node_uniformity_label,json=gangNodeUniformityLabel,proto3" json:"gangNodeUniformityLabel,omitempty"` + // If set then the template will be repeated at some frequency. If null then the template will be submitted a single time. + Repeat *RepeatDetails `protobuf:"bytes,15,opt,name=repeat,proto3" json:"repeat,omitempty"` } func (m *JobTemplate) Reset() { *m = JobTemplate{} } @@ -517,6 +519,67 @@ func (m *JobTemplate) GetGangNodeUniformityLabel() string { return "" } +func (m *JobTemplate) GetRepeat() *RepeatDetails { + if m != nil { + return m.Repeat + } + return nil +} + +type RepeatDetails struct { + // The number of times that template should be repeated. Must be > 0 + NumTimes uint32 `protobuf:"varint,1,opt,name=num_times,json=numTimes,proto3" json:"numTimes,omitempty"` + // The period between template submissions. May not be null + Period *time.Duration `protobuf:"bytes,2,opt,name=period,proto3,stdduration" json:"period,omitempty"` +} + +func (m *RepeatDetails) Reset() { *m = RepeatDetails{} } +func (m *RepeatDetails) String() string { return proto.CompactTextString(m) } +func (*RepeatDetails) ProtoMessage() {} +func (*RepeatDetails) Descriptor() ([]byte, []int) { + return fileDescriptor_63baccdfe9127510, []int{6} +} +func (m *RepeatDetails) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RepeatDetails) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RepeatDetails.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RepeatDetails) XXX_Merge(src proto.Message) { + xxx_messageInfo_RepeatDetails.Merge(m, src) +} +func (m *RepeatDetails) XXX_Size() int { + return m.Size() +} +func (m *RepeatDetails) XXX_DiscardUnknown() { + xxx_messageInfo_RepeatDetails.DiscardUnknown(m) +} + +var xxx_messageInfo_RepeatDetails proto.InternalMessageInfo + +func (m *RepeatDetails) GetNumTimes() uint32 { + if m != nil { + return m.NumTimes + } + return 0 +} + +func (m *RepeatDetails) GetPeriod() *time.Duration { + if m != nil { + return m.Period + } + return nil +} + type ShiftedExponential struct { Minimum time.Duration `protobuf:"bytes,1,opt,name=minimum,proto3,stdduration" json:"minimum"` TailMean time.Duration `protobuf:"bytes,2,opt,name=tail_mean,json=tailMean,proto3,stdduration" json:"tailMean"` @@ -526,7 +589,7 @@ func (m *ShiftedExponential) Reset() { *m = ShiftedExponential{} } func (m *ShiftedExponential) String() string { return proto.CompactTextString(m) } func (*ShiftedExponential) ProtoMessage() {} func (*ShiftedExponential) Descriptor() ([]byte, []int) { - return fileDescriptor_63baccdfe9127510, []int{6} + return fileDescriptor_63baccdfe9127510, []int{7} } func (m *ShiftedExponential) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -577,6 +640,7 @@ func init() { proto.RegisterMapType((map[string]string)(nil), "simulator.NodeTemplate.LabelsEntry") proto.RegisterType((*Queue)(nil), "simulator.Queue") proto.RegisterType((*JobTemplate)(nil), "simulator.JobTemplate") + proto.RegisterType((*RepeatDetails)(nil), "simulator.RepeatDetails") proto.RegisterType((*ShiftedExponential)(nil), "simulator.ShiftedExponential") } @@ -585,84 +649,89 @@ func init() { } var fileDescriptor_63baccdfe9127510 = []byte{ - // 1228 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x56, 0xcf, 0x6e, 0x13, 0x47, - 0x18, 0xcf, 0xc6, 0xe0, 0xc4, 0x63, 0x27, 0x84, 0x49, 0x14, 0x8c, 0x11, 0x5e, 0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0xd1, 0x30, 0x09, 0xe5, 0x0a, 0xfa, 0x64, 0x0d, 0xd7, 0x55, 0x8a, 0x4a, 0x0f, - 0x59, 0xa0, 0x52, 0xc0, 0xf7, 0x51, 0x4d, 0x10, 0x1a, 0x38, 0x21, 0x90, 0x48, 0xae, 0xa5, 0x4f, - 0xc6, 0x2a, 0xa7, 0x66, 0x39, 0xf7, 0x79, 0x00, 0xa4, 0xa8, 0xf6, 0x54, 0xb2, 0x7f, 0x7a, 0xf3, - 0xae, 0x6d, 0xbc, 0x7d, 0xd7, 0x36, 0xfe, 0x7d, 0xd7, 0x36, 0x7e, 0x7b, 0xdf, 0x5e, 0x78, 0xfb, - 0xbe, 0xbd, 0xf0, 0xf7, 0xfb, 0xf6, 0xc2, 0xcf, 0xdf, 0x69, 0xaf, 0x60, 0xc2, 0x43, 0xe2, 0x93, - 0x31, 0x67, 0xf9, 0x68, 0x2a, 0xa9, 0xff, 0xa9, 0x27, 0xba, 0x5b, 0x95, 0x54, 0xbe, 0xfe, 0x3f, - 0x00, 0x00, 0xff, 0xff, 0xb2, 0x34, 0xbe, 0x7a, 0xc9, 0x0b, 0x00, 0x00, + // 1310 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x57, 0x41, 0x6f, 0x13, 0xc7, + 0x17, 0xcf, 0xc6, 0xe0, 0xe0, 0x49, 0x9c, 0x84, 0x49, 0x14, 0x16, 0x23, 0xbc, 0xc6, 0xe8, 0x8f, + 0xfc, 0xaf, 0xc2, 0x5a, 0x80, 0x54, 0x51, 0x54, 0x21, 0x75, 0x13, 0x10, 0xa2, 0x40, 0xc1, 0xa1, + 0x45, 0x2a, 0x87, 0xd5, 0xd8, 0xfb, 0xe2, 0x4c, 0xb2, 0xbb, 0x63, 0x66, 0x67, 0xa1, 0x3e, 0xf4, + 0x3b, 0xb4, 0x87, 0xa2, 0x7e, 0x88, 0x5e, 0x7a, 0xe1, 0xdc, 0x23, 0x47, 0x8e, 0x3d, 0x6d, 0x2b, + 0xb8, 0xed, 0xa7, 0xa8, 0x76, 0x66, 0xd6, 0x19, 0xe3, 0x00, 0xe1, 0x14, 0xcf, 0xef, 0xfd, 0xde, + 0xdb, 0xdf, 0xbc, 0x79, 0xef, 0xcd, 0x04, 0x6d, 0xd2, 0x58, 0x00, 0x8f, 0x49, 0xd8, 0x4d, 0x06, + 0x7b, 0x10, 0xa4, 0x21, 0xf0, 0x6e, 0x42, 0xa3, 0x34, 0x24, 0x82, 0x19, 0xbf, 0xdc, 0x11, 0x67, + 0x82, 0xe1, 0xda, 0x04, 0x68, 0x34, 0x87, 0x8c, 0x0d, 0x43, 0xe8, 0x4a, 0x43, 0x3f, 0xdd, 0xed, + 0x06, 0x29, 0x27, 0x82, 0xb2, 0x58, 0x51, 0x1b, 0xed, 0x83, 0xeb, 0x89, 0x4b, 0x59, 0x97, 0x8c, + 0x68, 0x77, 0xc0, 0x38, 0x74, 0x9f, 0x5f, 0xe9, 0x0e, 0x21, 0x06, 0x4e, 0x04, 0x04, 0x9a, 0x73, + 0x79, 0x48, 0xc5, 0x5e, 0xda, 0x77, 0x07, 0x2c, 0xea, 0x0e, 0xd9, 0x90, 0x1d, 0x06, 0x2b, 0x56, + 0x72, 0x21, 0x7f, 0x69, 0xfa, 0x8d, 0xa3, 0xb4, 0x96, 0xbf, 0x58, 0x7f, 0x1f, 0x06, 0x22, 0x99, + 0x01, 0x94, 0x6f, 0xfb, 0xb7, 0x0a, 0x5a, 0xdc, 0x0a, 0xd3, 0x44, 0x00, 0xdf, 0x19, 0xc1, 0x00, + 0x5f, 0x42, 0x27, 0x62, 0x12, 0x81, 0x6d, 0xb5, 0xac, 0x4e, 0xcd, 0xc3, 0x79, 0xe6, 0x2c, 0x17, + 0xeb, 0x4d, 0x16, 0x51, 0x01, 0xd1, 0x48, 0x8c, 0x7b, 0xd2, 0x8e, 0x6f, 0xa3, 0x53, 0x03, 0xe5, + 0x96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0xc0, 0x2b, 0x31, 0xfc, 0x2d, 0xaa, 0x8e, 0x80, 0x53, 0xa6, 0x6e, 0xf4, 0x8f, 0x96, 0x4e, + 0x71, 0xd9, 0xaf, 0x2a, 0xf2, 0x61, 0x28, 0x59, 0x1c, 0x3a, 0x44, 0xfb, 0x0f, 0x0b, 0xe1, 0xd9, + 0x23, 0xc5, 0x77, 0xd0, 0x42, 0x44, 0x63, 0x1a, 0xa5, 0x91, 0x94, 0xf5, 0xd1, 0x8f, 0xac, 0xe9, + 0xe3, 0x2f, 0x3d, 0x64, 0xfc, 0x72, 0x81, 0xef, 0xa1, 0x5a, 0xb1, 0x57, 0x3f, 0x02, 0x12, 0x7f, + 0x5a, 0x70, 0x39, 0x11, 0x4e, 0x15, 0x3e, 0xf7, 0x81, 0xa8, 0x4a, 0x9e, 0xac, 0xbc, 0x1f, 0x5e, + 0xbf, 0x6d, 0x5a, 0x6f, 0xde, 0x36, 0xad, 0x7f, 0xdf, 0x36, 0xad, 0x5f, 0xde, 0x35, 0xe7, 0xde, + 0xbc, 0x6b, 0xce, 0xfd, 0xfd, 0xae, 0x39, 0xf7, 0xe3, 0xd7, 0xc6, 0x0b, 0x9f, 0xf0, 0x88, 0x04, + 0x64, 0xc4, 0x59, 0x31, 0x76, 0xf4, 0xaa, 0xfb, 0xb1, 0x7f, 0x3f, 0xfa, 0x55, 0x29, 0xe5, 0xda, + 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xb1, 0x00, 0x01, 0x6c, 0xa5, 0x0c, 0x00, 0x00, } func (m *ClusterSpec) Marshal() (dAtA []byte, err error) { @@ -970,6 +1039,18 @@ func (m *JobTemplate) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.Repeat != nil { + { + size, err := m.Repeat.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSimulator(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x7a + } if len(m.GangNodeUniformityLabel) > 0 { i -= len(m.GangNodeUniformityLabel) copy(dAtA[i:], m.GangNodeUniformityLabel) @@ -992,21 +1073,21 @@ func (m *JobTemplate) MarshalToSizedBuffer(dAtA []byte) (int, error) { } i-- dAtA[i] = 0x62 - n5, err5 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.EarliestSubmitTimeFromDependencyCompletion, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.EarliestSubmitTimeFromDependencyCompletion):]) - if err5 != nil { - return 0, err5 - } - i -= n5 - i = encodeVarintSimulator(dAtA, i, uint64(n5)) - i-- - dAtA[i] = 0x5a - n6, err6 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.EarliestSubmitTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.EarliestSubmitTime):]) + n6, err6 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.EarliestSubmitTimeFromDependencyCompletion, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.EarliestSubmitTimeFromDependencyCompletion):]) if err6 != nil { return 0, err6 } i -= n6 i = encodeVarintSimulator(dAtA, i, uint64(n6)) i-- + dAtA[i] = 0x5a + n7, err7 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.EarliestSubmitTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.EarliestSubmitTime):]) + if err7 != nil { + return 0, err7 + } + i -= n7 + i = encodeVarintSimulator(dAtA, i, uint64(n7)) + i-- dAtA[i] = 0x52 if len(m.Dependencies) > 0 { for iNdEx := len(m.Dependencies) - 1; iNdEx >= 0; iNdEx-- { @@ -1073,6 +1154,44 @@ func (m *JobTemplate) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *RepeatDetails) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RepeatDetails) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RepeatDetails) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Period != nil { + n9, err9 := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.Period, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Period):]) + if err9 != nil { + return 0, err9 + } + i -= n9 + i = encodeVarintSimulator(dAtA, i, uint64(n9)) + i-- + dAtA[i] = 0x12 + } + if m.NumTimes != 0 { + i = encodeVarintSimulator(dAtA, i, uint64(m.NumTimes)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + func (m *ShiftedExponential) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1093,20 +1212,20 @@ func (m *ShiftedExponential) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - n8, err8 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.TailMean, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.TailMean):]) - if err8 != nil { - return 0, err8 + n10, err10 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.TailMean, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.TailMean):]) + if err10 != nil { + return 0, err10 } - i -= n8 - i = encodeVarintSimulator(dAtA, i, uint64(n8)) + i -= n10 + i = encodeVarintSimulator(dAtA, i, uint64(n10)) i-- dAtA[i] = 0x12 - n9, err9 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.Minimum, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.Minimum):]) - if err9 != nil { - return 0, err9 + n11, err11 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.Minimum, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.Minimum):]) + if err11 != nil { + return 0, err11 } - i -= n9 - i = encodeVarintSimulator(dAtA, i, uint64(n9)) + i -= n11 + i = encodeVarintSimulator(dAtA, i, uint64(n11)) i-- dAtA[i] = 0xa return len(dAtA) - i, nil @@ -1293,6 +1412,26 @@ func (m *JobTemplate) Size() (n int) { if l > 0 { n += 1 + l + sovSimulator(uint64(l)) } + if m.Repeat != nil { + l = m.Repeat.Size() + n += 1 + l + sovSimulator(uint64(l)) + } + return n +} + +func (m *RepeatDetails) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.NumTimes != 0 { + n += 1 + sovSimulator(uint64(m.NumTimes)) + } + if m.Period != nil { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Period) + n += 1 + l + sovSimulator(uint64(l)) + } return n } @@ -2599,6 +2738,147 @@ func (m *JobTemplate) Unmarshal(dAtA []byte) error { } m.GangNodeUniformityLabel = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Repeat", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSimulator + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSimulator + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSimulator + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Repeat == nil { + m.Repeat = &RepeatDetails{} + } + if err := m.Repeat.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipSimulator(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthSimulator + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RepeatDetails) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSimulator + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RepeatDetails: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RepeatDetails: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NumTimes", wireType) + } + m.NumTimes = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSimulator + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NumTimes |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Period", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSimulator + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSimulator + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSimulator + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Period == nil { + m.Period = new(time.Duration) + } + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(m.Period, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipSimulator(dAtA[iNdEx:]) diff --git a/internal/scheduler/simulator/simulator.proto b/internal/scheduler/simulator/simulator.proto index 7aea2c46321..cc71e807855 100644 --- a/internal/scheduler/simulator/simulator.proto +++ b/internal/scheduler/simulator/simulator.proto @@ -79,6 +79,15 @@ message JobTemplate { uint32 gang_cardinality = 13; // Node Uniformity label when scheduling gangs. Only applies if gang_cardinality is non-zero. If unset it defaults to armadaproject.io/clusterName string gang_node_uniformity_label = 14; + // If set then the template will be repeated at some frequency. If null then the template will be submitted a single time. + RepeatDetails repeat = 15; +} + +message RepeatDetails { + // The number of times that template should be repeated. Must be > 0 + uint32 num_times = 1; + // The period between template submissions. May not be null + google.protobuf.Duration period = 2 [(gogoproto.stdduration) = true]; } message ShiftedExponential {