-
Notifications
You must be signed in to change notification settings - Fork 134
/
events.pb.go
16411 lines (15808 loc) · 396 KB
/
events.pb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: pkg/armadaevents/events.proto
package armadaevents
import (
encoding_binary "encoding/binary"
fmt "fmt"
io "io"
math "math"
math_bits "math/bits"
time "time"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
_ "github.com/gogo/protobuf/types"
github_com_gogo_protobuf_types "github.com/gogo/protobuf/types"
v11 "k8s.io/api/core/v1"
v1 "k8s.io/api/networking/v1"
resource "k8s.io/apimachinery/pkg/api/resource"
schedulerobjects "github.com/armadaproject/armada/internal/scheduler/schedulerobjects"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
var _ = time.Kitchen
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
type JobState int32
const (
JobState_QUEUED JobState = 0
JobState_PENDING JobState = 1
JobState_RUNNING JobState = 2
)
var JobState_name = map[int32]string{
0: "QUEUED",
1: "PENDING",
2: "RUNNING",
}
var JobState_value = map[string]int32{
"QUEUED": 0,
"PENDING": 1,
"RUNNING": 2,
}
func (x JobState) String() string {
return proto.EnumName(JobState_name, int32(x))
}
func (JobState) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_6aab92ca59e015f8, []int{0}
}
// Reason reported by Kubernetes.
type KubernetesReason int32
const (
KubernetesReason_AppError KubernetesReason = 0
KubernetesReason_Evicted KubernetesReason = 1
KubernetesReason_OOM KubernetesReason = 2
KubernetesReason_DeadlineExceeded KubernetesReason = 3
)
var KubernetesReason_name = map[int32]string{
0: "AppError",
1: "Evicted",
2: "OOM",
3: "DeadlineExceeded",
}
var KubernetesReason_value = map[string]int32{
"AppError": 0,
"Evicted": 1,
"OOM": 2,
"DeadlineExceeded": 3,
}
func (x KubernetesReason) String() string {
return proto.EnumName(KubernetesReason_name, int32(x))
}
func (KubernetesReason) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_6aab92ca59e015f8, []int{1}
}
// Message representing a sequence of state transitions.
// This is the only message type that should ever be published to the log.
type EventSequence struct {
// The system is namespaced by queue, and all events are associated with a job set.
// Hence, these are included with every message.
Queue string `protobuf:"bytes,1,opt,name=queue,proto3" json:"queue,omitempty"`
// Each job set has a unique name.
JobSetName string `protobuf:"bytes,2,opt,name=job_set_name,json=jobSetName,proto3" json:"jobSetName,omitempty"`
// Id of the user submitting the message. Is passed on to Kubernetes.
// Leave empty for messages generated by Armada itself.
UserId string `protobuf:"bytes,3,opt,name=user_id,json=userId,proto3" json:"userId,omitempty"`
// List of groups the user is member of. Is passed on to Kubernetes.
Groups []string `protobuf:"bytes,4,rep,name=groups,proto3" json:"groups,omitempty"`
// For efficiency, we bundle several events (i.e., state transitions) in a single log message.
Events []*EventSequence_Event `protobuf:"bytes,5,rep,name=events,proto3" json:"events,omitempty"`
}
func (m *EventSequence) Reset() { *m = EventSequence{} }
func (m *EventSequence) String() string { return proto.CompactTextString(m) }
func (*EventSequence) ProtoMessage() {}
func (*EventSequence) Descriptor() ([]byte, []int) {
return fileDescriptor_6aab92ca59e015f8, []int{0}
}
func (m *EventSequence) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *EventSequence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_EventSequence.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 *EventSequence) XXX_Merge(src proto.Message) {
xxx_messageInfo_EventSequence.Merge(m, src)
}
func (m *EventSequence) XXX_Size() int {
return m.Size()
}
func (m *EventSequence) XXX_DiscardUnknown() {
xxx_messageInfo_EventSequence.DiscardUnknown(m)
}
var xxx_messageInfo_EventSequence proto.InternalMessageInfo
func (m *EventSequence) GetQueue() string {
if m != nil {
return m.Queue
}
return ""
}
func (m *EventSequence) GetJobSetName() string {
if m != nil {
return m.JobSetName
}
return ""
}
func (m *EventSequence) GetUserId() string {
if m != nil {
return m.UserId
}
return ""
}
func (m *EventSequence) GetGroups() []string {
if m != nil {
return m.Groups
}
return nil
}
func (m *EventSequence) GetEvents() []*EventSequence_Event {
if m != nil {
return m.Events
}
return nil
}
// List of possible events, i.e., state transitions.
type EventSequence_Event struct {
Created *time.Time `protobuf:"bytes,18,opt,name=created,proto3,stdtime" json:"created,omitempty"`
// Types that are valid to be assigned to Event:
// *EventSequence_Event_SubmitJob
// *EventSequence_Event_ReprioritiseJob
// *EventSequence_Event_ReprioritiseJobSet
// *EventSequence_Event_ReprioritisedJob
// *EventSequence_Event_CancelJob
// *EventSequence_Event_CancelJobSet
// *EventSequence_Event_CancelledJob
// *EventSequence_Event_JobSucceeded
// *EventSequence_Event_JobErrors
// *EventSequence_Event_JobRunLeased
// *EventSequence_Event_JobRunAssigned
// *EventSequence_Event_JobRunRunning
// *EventSequence_Event_JobRunSucceeded
// *EventSequence_Event_JobRunErrors
// *EventSequence_Event_JobDuplicateDetected
// *EventSequence_Event_StandaloneIngressInfo
// *EventSequence_Event_ResourceUtilisation
// *EventSequence_Event_JobRunPreempted
// *EventSequence_Event_PartitionMarker
// *EventSequence_Event_JobRunPreemptionRequested
// *EventSequence_Event_JobRequeued
Event isEventSequence_Event_Event `protobuf_oneof:"event"`
}
func (m *EventSequence_Event) Reset() { *m = EventSequence_Event{} }
func (m *EventSequence_Event) String() string { return proto.CompactTextString(m) }
func (*EventSequence_Event) ProtoMessage() {}
func (*EventSequence_Event) Descriptor() ([]byte, []int) {
return fileDescriptor_6aab92ca59e015f8, []int{0, 0}
}
func (m *EventSequence_Event) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *EventSequence_Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_EventSequence_Event.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 *EventSequence_Event) XXX_Merge(src proto.Message) {
xxx_messageInfo_EventSequence_Event.Merge(m, src)
}
func (m *EventSequence_Event) XXX_Size() int {
return m.Size()
}
func (m *EventSequence_Event) XXX_DiscardUnknown() {
xxx_messageInfo_EventSequence_Event.DiscardUnknown(m)
}
var xxx_messageInfo_EventSequence_Event proto.InternalMessageInfo
type isEventSequence_Event_Event interface {
isEventSequence_Event_Event()
MarshalTo([]byte) (int, error)
Size() int
}
type EventSequence_Event_SubmitJob struct {
SubmitJob *SubmitJob `protobuf:"bytes,1,opt,name=submitJob,proto3,oneof" json:"submitJob,omitempty"`
}
type EventSequence_Event_ReprioritiseJob struct {
ReprioritiseJob *ReprioritiseJob `protobuf:"bytes,2,opt,name=reprioritiseJob,proto3,oneof" json:"reprioritiseJob,omitempty"`
}
type EventSequence_Event_ReprioritiseJobSet struct {
ReprioritiseJobSet *ReprioritiseJobSet `protobuf:"bytes,3,opt,name=reprioritiseJobSet,proto3,oneof" json:"reprioritiseJobSet,omitempty"`
}
type EventSequence_Event_ReprioritisedJob struct {
ReprioritisedJob *ReprioritisedJob `protobuf:"bytes,4,opt,name=reprioritisedJob,proto3,oneof" json:"reprioritisedJob,omitempty"`
}
type EventSequence_Event_CancelJob struct {
CancelJob *CancelJob `protobuf:"bytes,5,opt,name=cancelJob,proto3,oneof" json:"cancelJob,omitempty"`
}
type EventSequence_Event_CancelJobSet struct {
CancelJobSet *CancelJobSet `protobuf:"bytes,6,opt,name=cancelJobSet,proto3,oneof" json:"cancelJobSet,omitempty"`
}
type EventSequence_Event_CancelledJob struct {
CancelledJob *CancelledJob `protobuf:"bytes,7,opt,name=cancelledJob,proto3,oneof" json:"cancelledJob,omitempty"`
}
type EventSequence_Event_JobSucceeded struct {
JobSucceeded *JobSucceeded `protobuf:"bytes,8,opt,name=jobSucceeded,proto3,oneof" json:"jobSucceeded,omitempty"`
}
type EventSequence_Event_JobErrors struct {
JobErrors *JobErrors `protobuf:"bytes,9,opt,name=jobErrors,proto3,oneof" json:"jobErrors,omitempty"`
}
type EventSequence_Event_JobRunLeased struct {
JobRunLeased *JobRunLeased `protobuf:"bytes,10,opt,name=jobRunLeased,proto3,oneof" json:"jobRunLeased,omitempty"`
}
type EventSequence_Event_JobRunAssigned struct {
JobRunAssigned *JobRunAssigned `protobuf:"bytes,11,opt,name=jobRunAssigned,proto3,oneof" json:"jobRunAssigned,omitempty"`
}
type EventSequence_Event_JobRunRunning struct {
JobRunRunning *JobRunRunning `protobuf:"bytes,12,opt,name=jobRunRunning,proto3,oneof" json:"jobRunRunning,omitempty"`
}
type EventSequence_Event_JobRunSucceeded struct {
JobRunSucceeded *JobRunSucceeded `protobuf:"bytes,13,opt,name=jobRunSucceeded,proto3,oneof" json:"jobRunSucceeded,omitempty"`
}
type EventSequence_Event_JobRunErrors struct {
JobRunErrors *JobRunErrors `protobuf:"bytes,14,opt,name=jobRunErrors,proto3,oneof" json:"jobRunErrors,omitempty"`
}
type EventSequence_Event_JobDuplicateDetected struct {
JobDuplicateDetected *JobDuplicateDetected `protobuf:"bytes,15,opt,name=jobDuplicateDetected,proto3,oneof" json:"jobDuplicateDetected,omitempty"`
}
type EventSequence_Event_StandaloneIngressInfo struct {
StandaloneIngressInfo *StandaloneIngressInfo `protobuf:"bytes,16,opt,name=standaloneIngressInfo,proto3,oneof" json:"standaloneIngressInfo,omitempty"`
}
type EventSequence_Event_ResourceUtilisation struct {
ResourceUtilisation *ResourceUtilisation `protobuf:"bytes,17,opt,name=resourceUtilisation,proto3,oneof" json:"resourceUtilisation,omitempty"`
}
type EventSequence_Event_JobRunPreempted struct {
JobRunPreempted *JobRunPreempted `protobuf:"bytes,19,opt,name=jobRunPreempted,proto3,oneof" json:"jobRunPreempted,omitempty"`
}
type EventSequence_Event_PartitionMarker struct {
PartitionMarker *PartitionMarker `protobuf:"bytes,20,opt,name=partitionMarker,proto3,oneof" json:"partitionMarker,omitempty"`
}
type EventSequence_Event_JobRunPreemptionRequested struct {
JobRunPreemptionRequested *JobRunPreemptionRequested `protobuf:"bytes,21,opt,name=jobRunPreemptionRequested,proto3,oneof" json:"jobRunPreemptionRequested,omitempty"`
}
type EventSequence_Event_JobRequeued struct {
JobRequeued *JobRequeued `protobuf:"bytes,22,opt,name=jobRequeued,proto3,oneof" json:"jobRequeued,omitempty"`
}
func (*EventSequence_Event_SubmitJob) isEventSequence_Event_Event() {}
func (*EventSequence_Event_ReprioritiseJob) isEventSequence_Event_Event() {}
func (*EventSequence_Event_ReprioritiseJobSet) isEventSequence_Event_Event() {}
func (*EventSequence_Event_ReprioritisedJob) isEventSequence_Event_Event() {}
func (*EventSequence_Event_CancelJob) isEventSequence_Event_Event() {}
func (*EventSequence_Event_CancelJobSet) isEventSequence_Event_Event() {}
func (*EventSequence_Event_CancelledJob) isEventSequence_Event_Event() {}
func (*EventSequence_Event_JobSucceeded) isEventSequence_Event_Event() {}
func (*EventSequence_Event_JobErrors) isEventSequence_Event_Event() {}
func (*EventSequence_Event_JobRunLeased) isEventSequence_Event_Event() {}
func (*EventSequence_Event_JobRunAssigned) isEventSequence_Event_Event() {}
func (*EventSequence_Event_JobRunRunning) isEventSequence_Event_Event() {}
func (*EventSequence_Event_JobRunSucceeded) isEventSequence_Event_Event() {}
func (*EventSequence_Event_JobRunErrors) isEventSequence_Event_Event() {}
func (*EventSequence_Event_JobDuplicateDetected) isEventSequence_Event_Event() {}
func (*EventSequence_Event_StandaloneIngressInfo) isEventSequence_Event_Event() {}
func (*EventSequence_Event_ResourceUtilisation) isEventSequence_Event_Event() {}
func (*EventSequence_Event_JobRunPreempted) isEventSequence_Event_Event() {}
func (*EventSequence_Event_PartitionMarker) isEventSequence_Event_Event() {}
func (*EventSequence_Event_JobRunPreemptionRequested) isEventSequence_Event_Event() {}
func (*EventSequence_Event_JobRequeued) isEventSequence_Event_Event() {}
func (m *EventSequence_Event) GetEvent() isEventSequence_Event_Event {
if m != nil {
return m.Event
}
return nil
}
func (m *EventSequence_Event) GetCreated() *time.Time {
if m != nil {
return m.Created
}
return nil
}
func (m *EventSequence_Event) GetSubmitJob() *SubmitJob {
if x, ok := m.GetEvent().(*EventSequence_Event_SubmitJob); ok {
return x.SubmitJob
}
return nil
}
func (m *EventSequence_Event) GetReprioritiseJob() *ReprioritiseJob {
if x, ok := m.GetEvent().(*EventSequence_Event_ReprioritiseJob); ok {
return x.ReprioritiseJob
}
return nil
}
func (m *EventSequence_Event) GetReprioritiseJobSet() *ReprioritiseJobSet {
if x, ok := m.GetEvent().(*EventSequence_Event_ReprioritiseJobSet); ok {
return x.ReprioritiseJobSet
}
return nil
}
func (m *EventSequence_Event) GetReprioritisedJob() *ReprioritisedJob {
if x, ok := m.GetEvent().(*EventSequence_Event_ReprioritisedJob); ok {
return x.ReprioritisedJob
}
return nil
}
func (m *EventSequence_Event) GetCancelJob() *CancelJob {
if x, ok := m.GetEvent().(*EventSequence_Event_CancelJob); ok {
return x.CancelJob
}
return nil
}
func (m *EventSequence_Event) GetCancelJobSet() *CancelJobSet {
if x, ok := m.GetEvent().(*EventSequence_Event_CancelJobSet); ok {
return x.CancelJobSet
}
return nil
}
func (m *EventSequence_Event) GetCancelledJob() *CancelledJob {
if x, ok := m.GetEvent().(*EventSequence_Event_CancelledJob); ok {
return x.CancelledJob
}
return nil
}
func (m *EventSequence_Event) GetJobSucceeded() *JobSucceeded {
if x, ok := m.GetEvent().(*EventSequence_Event_JobSucceeded); ok {
return x.JobSucceeded
}
return nil
}
func (m *EventSequence_Event) GetJobErrors() *JobErrors {
if x, ok := m.GetEvent().(*EventSequence_Event_JobErrors); ok {
return x.JobErrors
}
return nil
}
func (m *EventSequence_Event) GetJobRunLeased() *JobRunLeased {
if x, ok := m.GetEvent().(*EventSequence_Event_JobRunLeased); ok {
return x.JobRunLeased
}
return nil
}
func (m *EventSequence_Event) GetJobRunAssigned() *JobRunAssigned {
if x, ok := m.GetEvent().(*EventSequence_Event_JobRunAssigned); ok {
return x.JobRunAssigned
}
return nil
}
func (m *EventSequence_Event) GetJobRunRunning() *JobRunRunning {
if x, ok := m.GetEvent().(*EventSequence_Event_JobRunRunning); ok {
return x.JobRunRunning
}
return nil
}
func (m *EventSequence_Event) GetJobRunSucceeded() *JobRunSucceeded {
if x, ok := m.GetEvent().(*EventSequence_Event_JobRunSucceeded); ok {
return x.JobRunSucceeded
}
return nil
}
func (m *EventSequence_Event) GetJobRunErrors() *JobRunErrors {
if x, ok := m.GetEvent().(*EventSequence_Event_JobRunErrors); ok {
return x.JobRunErrors
}
return nil
}
func (m *EventSequence_Event) GetJobDuplicateDetected() *JobDuplicateDetected {
if x, ok := m.GetEvent().(*EventSequence_Event_JobDuplicateDetected); ok {
return x.JobDuplicateDetected
}
return nil
}
func (m *EventSequence_Event) GetStandaloneIngressInfo() *StandaloneIngressInfo {
if x, ok := m.GetEvent().(*EventSequence_Event_StandaloneIngressInfo); ok {
return x.StandaloneIngressInfo
}
return nil
}
func (m *EventSequence_Event) GetResourceUtilisation() *ResourceUtilisation {
if x, ok := m.GetEvent().(*EventSequence_Event_ResourceUtilisation); ok {
return x.ResourceUtilisation
}
return nil
}
func (m *EventSequence_Event) GetJobRunPreempted() *JobRunPreempted {
if x, ok := m.GetEvent().(*EventSequence_Event_JobRunPreempted); ok {
return x.JobRunPreempted
}
return nil
}
func (m *EventSequence_Event) GetPartitionMarker() *PartitionMarker {
if x, ok := m.GetEvent().(*EventSequence_Event_PartitionMarker); ok {
return x.PartitionMarker
}
return nil
}
func (m *EventSequence_Event) GetJobRunPreemptionRequested() *JobRunPreemptionRequested {
if x, ok := m.GetEvent().(*EventSequence_Event_JobRunPreemptionRequested); ok {
return x.JobRunPreemptionRequested
}
return nil
}
func (m *EventSequence_Event) GetJobRequeued() *JobRequeued {
if x, ok := m.GetEvent().(*EventSequence_Event_JobRequeued); ok {
return x.JobRequeued
}
return nil
}
// XXX_OneofWrappers is for the internal use of the proto package.
func (*EventSequence_Event) XXX_OneofWrappers() []interface{} {
return []interface{}{
(*EventSequence_Event_SubmitJob)(nil),
(*EventSequence_Event_ReprioritiseJob)(nil),
(*EventSequence_Event_ReprioritiseJobSet)(nil),
(*EventSequence_Event_ReprioritisedJob)(nil),
(*EventSequence_Event_CancelJob)(nil),
(*EventSequence_Event_CancelJobSet)(nil),
(*EventSequence_Event_CancelledJob)(nil),
(*EventSequence_Event_JobSucceeded)(nil),
(*EventSequence_Event_JobErrors)(nil),
(*EventSequence_Event_JobRunLeased)(nil),
(*EventSequence_Event_JobRunAssigned)(nil),
(*EventSequence_Event_JobRunRunning)(nil),
(*EventSequence_Event_JobRunSucceeded)(nil),
(*EventSequence_Event_JobRunErrors)(nil),
(*EventSequence_Event_JobDuplicateDetected)(nil),
(*EventSequence_Event_StandaloneIngressInfo)(nil),
(*EventSequence_Event_ResourceUtilisation)(nil),
(*EventSequence_Event_JobRunPreempted)(nil),
(*EventSequence_Event_PartitionMarker)(nil),
(*EventSequence_Event_JobRunPreemptionRequested)(nil),
(*EventSequence_Event_JobRequeued)(nil),
}
}
// Resource usage of a particular k8s object created as part of a job.
type ResourceUtilisation struct {
RunId *Uuid `protobuf:"bytes,1,opt,name=run_id,json=runId,proto3" json:"runId,omitempty"`
JobId *Uuid `protobuf:"bytes,2,opt,name=job_id,json=jobId,proto3" json:"jobId,omitempty"`
ResourceInfo *KubernetesResourceInfo `protobuf:"bytes,3,opt,name=resource_info,json=resourceInfo,proto3" json:"resourceInfo,omitempty"`
MaxResourcesForPeriod map[string]resource.Quantity `protobuf:"bytes,4,rep,name=max_resources_for_period,json=maxResourcesForPeriod,proto3" json:"maxResourcesForPeriod" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
TotalCumulativeUsage map[string]resource.Quantity `protobuf:"bytes,5,rep,name=total_cumulative_usage,json=totalCumulativeUsage,proto3" json:"totalCumulativeUsage" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (m *ResourceUtilisation) Reset() { *m = ResourceUtilisation{} }
func (m *ResourceUtilisation) String() string { return proto.CompactTextString(m) }
func (*ResourceUtilisation) ProtoMessage() {}
func (*ResourceUtilisation) Descriptor() ([]byte, []int) {
return fileDescriptor_6aab92ca59e015f8, []int{1}
}
func (m *ResourceUtilisation) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *ResourceUtilisation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_ResourceUtilisation.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 *ResourceUtilisation) XXX_Merge(src proto.Message) {
xxx_messageInfo_ResourceUtilisation.Merge(m, src)
}
func (m *ResourceUtilisation) XXX_Size() int {
return m.Size()
}
func (m *ResourceUtilisation) XXX_DiscardUnknown() {
xxx_messageInfo_ResourceUtilisation.DiscardUnknown(m)
}
var xxx_messageInfo_ResourceUtilisation proto.InternalMessageInfo
func (m *ResourceUtilisation) GetRunId() *Uuid {
if m != nil {
return m.RunId
}
return nil
}
func (m *ResourceUtilisation) GetJobId() *Uuid {
if m != nil {
return m.JobId
}
return nil
}
func (m *ResourceUtilisation) GetResourceInfo() *KubernetesResourceInfo {
if m != nil {
return m.ResourceInfo
}
return nil
}
func (m *ResourceUtilisation) GetMaxResourcesForPeriod() map[string]resource.Quantity {
if m != nil {
return m.MaxResourcesForPeriod
}
return nil
}
func (m *ResourceUtilisation) GetTotalCumulativeUsage() map[string]resource.Quantity {
if m != nil {
return m.TotalCumulativeUsage
}
return nil
}
// A UUID, encoded in accordance with section 4.1.2 of RFC 4122
// (technically equivalent to ITU-T Rec. X.667 and ISO/IEC 9834-8).
// As of March 2022, this seems to be the most efficient way to include UUIDs in proto messages; see
// https://github.com/protocolbuffers/protobuf/issues/2224#issuecomment-760635430
type Uuid struct {
// The high 64 bits of the UUID - MSB -> LSB: time_low (32 bits) | time_mid (16 bits) | time_hi_and_version (16 bits).
High64 uint64 `protobuf:"fixed64,1,opt,name=high64,proto3" json:"high64,omitempty"`
// The low 64 bits of the UUID - MSB -> LSB: clock_seq_hi_and_reserved (8 bits) | clock_seq_low (8 bits) | node (48 bits).
Low64 uint64 `protobuf:"fixed64,2,opt,name=low64,proto3" json:"low64,omitempty"`
}
func (m *Uuid) Reset() { *m = Uuid{} }
func (m *Uuid) String() string { return proto.CompactTextString(m) }
func (*Uuid) ProtoMessage() {}
func (*Uuid) Descriptor() ([]byte, []int) {
return fileDescriptor_6aab92ca59e015f8, []int{2}
}
func (m *Uuid) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Uuid) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Uuid.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 *Uuid) XXX_Merge(src proto.Message) {
xxx_messageInfo_Uuid.Merge(m, src)
}
func (m *Uuid) XXX_Size() int {
return m.Size()
}
func (m *Uuid) XXX_DiscardUnknown() {
xxx_messageInfo_Uuid.DiscardUnknown(m)
}
var xxx_messageInfo_Uuid proto.InternalMessageInfo
func (m *Uuid) GetHigh64() uint64 {
if m != nil {
return m.High64
}
return 0
}
func (m *Uuid) GetLow64() uint64 {
if m != nil {
return m.Low64
}
return 0
}
// A request to run an Armada job. Each job consists of a set of Kubernetes objects,
// one of which is the main object (typically a pod spec.) and has a priority associated with it.
// When the main object exits, all other objects are cleaned up.
// The priority, together with the queue the job is submitted to, determines the order in which jobs are run.
type SubmitJob struct {
// Each application may be run multiple times. This id uniquely identifies this job.
JobId *Uuid `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"jobId,omitempty"`
// User-provided id used for server-side deduplication.
// I.e., jobs submitted with the same deduplication_id as an existing job are discarded.
// TODO: If we can deduplicate at the API endpoint, we don't need this on the log.
DeduplicationId string `protobuf:"bytes,2,opt,name=deduplication_id,json=deduplicationId,proto3" json:"deduplicationId,omitempty"`
// Priority of this job. Measured relative to other jobs in the same queue.
Priority uint32 `protobuf:"varint,3,opt,name=priority,proto3" json:"priority,omitempty"`
// Shared ObjectMeta for all Kubernetes objects in this job.
// If provided, the namespace therein is used for all objects that do not explicitly specify another.
// And the labels and annotations therein are applied to all objects part of the job.
ObjectMeta *ObjectMeta `protobuf:"bytes,4,opt,name=objectMeta,proto3" json:"objectMeta,omitempty"`
// Main object that determines when an application has finished.
MainObject *KubernetesMainObject `protobuf:"bytes,5,opt,name=mainObject,proto3" json:"mainObject,omitempty"`
// Set of additional Kubernetes objects to create as part of the job.
Objects []*KubernetesObject `protobuf:"bytes,6,rep,name=objects,proto3" json:"objects,omitempty"`
// Maximum lifetime of the job in seconds. Zero indicates an infinite lifetime.
Lifetime uint32 `protobuf:"varint,7,opt,name=lifetime,proto3" json:"lifetime,omitempty"`
// If true, the job is run at most once, i.e., at most one job run will be created for it.
// If false, the job may be re-leased on failure, which may cause the job to run more than once
// (e.g., if a job run succeeds but the executor fails before it can report job success).
AtMostOnce bool `protobuf:"varint,8,opt,name=atMostOnce,proto3" json:"atMostOnce,omitempty"`
// If true, Armada may preempt the job while running.
Preemptible bool `protobuf:"varint,9,opt,name=preemptible,proto3" json:"preemptible,omitempty"`
// If true, Armada may optimistically run several instances of the job concurrently
// (typically on different clusters).
// If false, a new job run may only be created once Armada is certain that all existing runs have finished.
ConcurrencySafe bool `protobuf:"varint,10,opt,name=concurrencySafe,proto3" json:"concurrencySafe,omitempty"`
// Indicates which scheduler should manage this job.
// If empty, the default scheduler is used.
Scheduler string `protobuf:"bytes,11,opt,name=scheduler,proto3" json:"scheduler,omitempty"`
// Indicates whether job is a duplicate
IsDuplicate bool `protobuf:"varint,12,opt,name=isDuplicate,proto3" json:"isDuplicate,omitempty"`
// Queuing TTL for this job in seconds. If this job queues for more than this duration it will be cancelled. Zero indicates an infinite lifetime.
QueueTtlSeconds int64 `protobuf:"varint,13,opt,name=queue_ttl_seconds,json=queueTtlSeconds,proto3" json:"queueTtlSeconds,omitempty"`
}
func (m *SubmitJob) Reset() { *m = SubmitJob{} }
func (m *SubmitJob) String() string { return proto.CompactTextString(m) }
func (*SubmitJob) ProtoMessage() {}
func (*SubmitJob) Descriptor() ([]byte, []int) {
return fileDescriptor_6aab92ca59e015f8, []int{3}
}
func (m *SubmitJob) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *SubmitJob) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_SubmitJob.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 *SubmitJob) XXX_Merge(src proto.Message) {
xxx_messageInfo_SubmitJob.Merge(m, src)
}
func (m *SubmitJob) XXX_Size() int {
return m.Size()
}
func (m *SubmitJob) XXX_DiscardUnknown() {
xxx_messageInfo_SubmitJob.DiscardUnknown(m)
}
var xxx_messageInfo_SubmitJob proto.InternalMessageInfo
func (m *SubmitJob) GetJobId() *Uuid {
if m != nil {
return m.JobId
}
return nil
}
func (m *SubmitJob) GetDeduplicationId() string {
if m != nil {
return m.DeduplicationId
}
return ""
}
func (m *SubmitJob) GetPriority() uint32 {
if m != nil {
return m.Priority
}
return 0
}
func (m *SubmitJob) GetObjectMeta() *ObjectMeta {
if m != nil {
return m.ObjectMeta
}
return nil
}
func (m *SubmitJob) GetMainObject() *KubernetesMainObject {
if m != nil {
return m.MainObject
}
return nil
}
func (m *SubmitJob) GetObjects() []*KubernetesObject {
if m != nil {
return m.Objects
}
return nil
}
func (m *SubmitJob) GetLifetime() uint32 {
if m != nil {
return m.Lifetime
}
return 0
}
func (m *SubmitJob) GetAtMostOnce() bool {
if m != nil {
return m.AtMostOnce
}
return false
}
func (m *SubmitJob) GetPreemptible() bool {
if m != nil {
return m.Preemptible
}
return false
}
func (m *SubmitJob) GetConcurrencySafe() bool {
if m != nil {
return m.ConcurrencySafe
}
return false
}
func (m *SubmitJob) GetScheduler() string {
if m != nil {
return m.Scheduler
}
return ""
}
func (m *SubmitJob) GetIsDuplicate() bool {
if m != nil {
return m.IsDuplicate
}
return false
}
func (m *SubmitJob) GetQueueTtlSeconds() int64 {
if m != nil {
return m.QueueTtlSeconds
}
return 0
}
// Kubernetes objects that can serve as main objects for an Armada job.
type KubernetesMainObject struct {
ObjectMeta *ObjectMeta `protobuf:"bytes,1,opt,name=objectMeta,proto3" json:"objectMeta,omitempty"`
// Types that are valid to be assigned to Object:
// *KubernetesMainObject_PodSpec
Object isKubernetesMainObject_Object `protobuf_oneof:"object"`
}
func (m *KubernetesMainObject) Reset() { *m = KubernetesMainObject{} }
func (m *KubernetesMainObject) String() string { return proto.CompactTextString(m) }
func (*KubernetesMainObject) ProtoMessage() {}
func (*KubernetesMainObject) Descriptor() ([]byte, []int) {
return fileDescriptor_6aab92ca59e015f8, []int{4}
}
func (m *KubernetesMainObject) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *KubernetesMainObject) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_KubernetesMainObject.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 *KubernetesMainObject) XXX_Merge(src proto.Message) {
xxx_messageInfo_KubernetesMainObject.Merge(m, src)
}
func (m *KubernetesMainObject) XXX_Size() int {
return m.Size()
}
func (m *KubernetesMainObject) XXX_DiscardUnknown() {
xxx_messageInfo_KubernetesMainObject.DiscardUnknown(m)
}
var xxx_messageInfo_KubernetesMainObject proto.InternalMessageInfo
type isKubernetesMainObject_Object interface {
isKubernetesMainObject_Object()
MarshalTo([]byte) (int, error)
Size() int
}
type KubernetesMainObject_PodSpec struct {
PodSpec *PodSpecWithAvoidList `protobuf:"bytes,2,opt,name=pod_spec,json=podSpec,proto3,oneof" json:"podSpec,omitempty"`
}
func (*KubernetesMainObject_PodSpec) isKubernetesMainObject_Object() {}
func (m *KubernetesMainObject) GetObject() isKubernetesMainObject_Object {
if m != nil {
return m.Object
}
return nil
}
func (m *KubernetesMainObject) GetObjectMeta() *ObjectMeta {
if m != nil {
return m.ObjectMeta
}
return nil
}
func (m *KubernetesMainObject) GetPodSpec() *PodSpecWithAvoidList {
if x, ok := m.GetObject().(*KubernetesMainObject_PodSpec); ok {
return x.PodSpec
}
return nil
}
// XXX_OneofWrappers is for the internal use of the proto package.
func (*KubernetesMainObject) XXX_OneofWrappers() []interface{} {
return []interface{}{
(*KubernetesMainObject_PodSpec)(nil),
}
}
// Kubernetes objects that can be created as part of an Armada.
type KubernetesObject struct {
ObjectMeta *ObjectMeta `protobuf:"bytes,1,opt,name=objectMeta,proto3" json:"objectMeta,omitempty"`
// Types that are valid to be assigned to Object:
// *KubernetesObject_PodSpec
// *KubernetesObject_Ingress
// *KubernetesObject_Service
// *KubernetesObject_ConfigMap
Object isKubernetesObject_Object `protobuf_oneof:"object"`
}
func (m *KubernetesObject) Reset() { *m = KubernetesObject{} }
func (m *KubernetesObject) String() string { return proto.CompactTextString(m) }
func (*KubernetesObject) ProtoMessage() {}
func (*KubernetesObject) Descriptor() ([]byte, []int) {
return fileDescriptor_6aab92ca59e015f8, []int{5}
}
func (m *KubernetesObject) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *KubernetesObject) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_KubernetesObject.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 *KubernetesObject) XXX_Merge(src proto.Message) {
xxx_messageInfo_KubernetesObject.Merge(m, src)
}
func (m *KubernetesObject) XXX_Size() int {
return m.Size()
}
func (m *KubernetesObject) XXX_DiscardUnknown() {
xxx_messageInfo_KubernetesObject.DiscardUnknown(m)
}
var xxx_messageInfo_KubernetesObject proto.InternalMessageInfo
type isKubernetesObject_Object interface {
isKubernetesObject_Object()
MarshalTo([]byte) (int, error)
Size() int
}
type KubernetesObject_PodSpec struct {
PodSpec *PodSpecWithAvoidList `protobuf:"bytes,2,opt,name=pod_spec,json=podSpec,proto3,oneof" json:"podSpec,omitempty"`
}
type KubernetesObject_Ingress struct {
Ingress *v1.IngressSpec `protobuf:"bytes,3,opt,name=ingress,proto3,oneof" json:"ingress,omitempty"`
}
type KubernetesObject_Service struct {
Service *v11.ServiceSpec `protobuf:"bytes,4,opt,name=service,proto3,oneof" json:"service,omitempty"`
}
type KubernetesObject_ConfigMap struct {
ConfigMap *v11.ConfigMap `protobuf:"bytes,5,opt,name=configMap,proto3,oneof" json:"configMap,omitempty"`
}
func (*KubernetesObject_PodSpec) isKubernetesObject_Object() {}
func (*KubernetesObject_Ingress) isKubernetesObject_Object() {}
func (*KubernetesObject_Service) isKubernetesObject_Object() {}
func (*KubernetesObject_ConfigMap) isKubernetesObject_Object() {}
func (m *KubernetesObject) GetObject() isKubernetesObject_Object {
if m != nil {
return m.Object
}
return nil
}
func (m *KubernetesObject) GetObjectMeta() *ObjectMeta {
if m != nil {
return m.ObjectMeta
}
return nil
}
func (m *KubernetesObject) GetPodSpec() *PodSpecWithAvoidList {
if x, ok := m.GetObject().(*KubernetesObject_PodSpec); ok {
return x.PodSpec
}
return nil
}
func (m *KubernetesObject) GetIngress() *v1.IngressSpec {
if x, ok := m.GetObject().(*KubernetesObject_Ingress); ok {
return x.Ingress
}
return nil
}