-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.go
2925 lines (2445 loc) · 148 KB
/
types.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
package k8sTypes
import (
"encoding/json"
"fmt"
"strings"
"time"
)
const (
NamespaceNodeLease string = "kube-node-lease"
)
type MicroTime struct {
time.Time `protobuf:"-"`
}
type Volume struct {
Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
VolumeSource `json:",inline" protobuf:"bytes,2,opt,name=volumeSource"`
}
type VolumeSource struct {
HostPath *HostPathVolumeSource `json:"hostPath,omitempty" protobuf:"bytes,1,opt,name=hostPath"`
EmptyDir *EmptyDirVolumeSource `json:"emptyDir,omitempty" protobuf:"bytes,2,opt,name=emptyDir"`
GCEPersistentDisk *GCEPersistentDiskVolumeSource `json:"gcePersistentDisk,omitempty" protobuf:"bytes,3,opt,name=gcePersistentDisk"`
AWSElasticBlockStore *AWSElasticBlockStoreVolumeSource `json:"awsElasticBlockStore,omitempty" protobuf:"bytes,4,opt,name=awsElasticBlockStore"`
GitRepo *GitRepoVolumeSource `json:"gitRepo,omitempty" protobuf:"bytes,5,opt,name=gitRepo"`
Secret *SecretVolumeSource `json:"secret,omitempty" protobuf:"bytes,6,opt,name=secret"`
NFS *NFSVolumeSource `json:"nfs,omitempty" protobuf:"bytes,7,opt,name=nfs"`
ISCSI *ISCSIVolumeSource `json:"iscsi,omitempty" protobuf:"bytes,8,opt,name=iscsi"`
Glusterfs *GlusterfsVolumeSource `json:"glusterfs,omitempty" protobuf:"bytes,9,opt,name=glusterfs"`
PersistentVolumeClaim *PersistentVolumeClaimVolumeSource `json:"persistentVolumeClaim,omitempty" protobuf:"bytes,10,opt,name=persistentVolumeClaim"`
RBD *RBDVolumeSource `json:"rbd,omitempty" protobuf:"bytes,11,opt,name=rbd"`
FlexVolume *FlexVolumeSource `json:"flexVolume,omitempty" protobuf:"bytes,12,opt,name=flexVolume"`
Cinder *CinderVolumeSource `json:"cinder,omitempty" protobuf:"bytes,13,opt,name=cinder"`
CephFS *CephFSVolumeSource `json:"cephfs,omitempty" protobuf:"bytes,14,opt,name=cephfs"`
Flocker *FlockerVolumeSource `json:"flocker,omitempty" protobuf:"bytes,15,opt,name=flocker"`
DownwardAPI *DownwardAPIVolumeSource `json:"downwardAPI,omitempty" protobuf:"bytes,16,opt,name=downwardAPI"`
FC *FCVolumeSource `json:"fc,omitempty" protobuf:"bytes,17,opt,name=fc"`
AzureFile *AzureFileVolumeSource `json:"azureFile,omitempty" protobuf:"bytes,18,opt,name=azureFile"`
ConfigMap *ConfigMapVolumeSource `json:"configMap,omitempty" protobuf:"bytes,19,opt,name=configMap"`
VsphereVolume *VsphereVirtualDiskVolumeSource `json:"vsphereVolume,omitempty" protobuf:"bytes,20,opt,name=vsphereVolume"`
Quobyte *QuobyteVolumeSource `json:"quobyte,omitempty" protobuf:"bytes,21,opt,name=quobyte"`
AzureDisk *AzureDiskVolumeSource `json:"azureDisk,omitempty" protobuf:"bytes,22,opt,name=azureDisk"`
PhotonPersistentDisk *PhotonPersistentDiskVolumeSource `json:"photonPersistentDisk,omitempty" protobuf:"bytes,23,opt,name=photonPersistentDisk"`
Projected *ProjectedVolumeSource `json:"projected,omitempty" protobuf:"bytes,26,opt,name=projected"`
PortworxVolume *PortworxVolumeSource `json:"portworxVolume,omitempty" protobuf:"bytes,24,opt,name=portworxVolume"`
ScaleIO *ScaleIOVolumeSource `json:"scaleIO,omitempty" protobuf:"bytes,25,opt,name=scaleIO"`
StorageOS *StorageOSVolumeSource `json:"storageos,omitempty" protobuf:"bytes,27,opt,name=storageos"`
}
type PersistentVolumeClaimVolumeSource struct {
ClaimName string `json:"claimName" protobuf:"bytes,1,opt,name=claimName"`
ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,2,opt,name=readOnly"`
}
type PersistentVolumeSource struct {
GCEPersistentDisk *GCEPersistentDiskVolumeSource `json:"gcePersistentDisk,omitempty" protobuf:"bytes,1,opt,name=gcePersistentDisk"`
AWSElasticBlockStore *AWSElasticBlockStoreVolumeSource `json:"awsElasticBlockStore,omitempty" protobuf:"bytes,2,opt,name=awsElasticBlockStore"`
HostPath *HostPathVolumeSource `json:"hostPath,omitempty" protobuf:"bytes,3,opt,name=hostPath"`
Glusterfs *GlusterfsPersistentVolumeSource `json:"glusterfs,omitempty" protobuf:"bytes,4,opt,name=glusterfs"`
NFS *NFSVolumeSource `json:"nfs,omitempty" protobuf:"bytes,5,opt,name=nfs"`
RBD *RBDPersistentVolumeSource `json:"rbd,omitempty" protobuf:"bytes,6,opt,name=rbd"`
ISCSI *ISCSIPersistentVolumeSource `json:"iscsi,omitempty" protobuf:"bytes,7,opt,name=iscsi"`
Cinder *CinderPersistentVolumeSource `json:"cinder,omitempty" protobuf:"bytes,8,opt,name=cinder"`
CephFS *CephFSPersistentVolumeSource `json:"cephfs,omitempty" protobuf:"bytes,9,opt,name=cephfs"`
FC *FCVolumeSource `json:"fc,omitempty" protobuf:"bytes,10,opt,name=fc"`
Flocker *FlockerVolumeSource `json:"flocker,omitempty" protobuf:"bytes,11,opt,name=flocker"`
FlexVolume *FlexPersistentVolumeSource `json:"flexVolume,omitempty" protobuf:"bytes,12,opt,name=flexVolume"`
AzureFile *AzureFilePersistentVolumeSource `json:"azureFile,omitempty" protobuf:"bytes,13,opt,name=azureFile"`
VsphereVolume *VsphereVirtualDiskVolumeSource `json:"vsphereVolume,omitempty" protobuf:"bytes,14,opt,name=vsphereVolume"`
Quobyte *QuobyteVolumeSource `json:"quobyte,omitempty" protobuf:"bytes,15,opt,name=quobyte"`
AzureDisk *AzureDiskVolumeSource `json:"azureDisk,omitempty" protobuf:"bytes,16,opt,name=azureDisk"`
PhotonPersistentDisk *PhotonPersistentDiskVolumeSource `json:"photonPersistentDisk,omitempty" protobuf:"bytes,17,opt,name=photonPersistentDisk"`
PortworxVolume *PortworxVolumeSource `json:"portworxVolume,omitempty" protobuf:"bytes,18,opt,name=portworxVolume"`
ScaleIO *ScaleIOPersistentVolumeSource `json:"scaleIO,omitempty" protobuf:"bytes,19,opt,name=scaleIO"`
Local *LocalVolumeSource `json:"local,omitempty" protobuf:"bytes,20,opt,name=local"`
StorageOS *StorageOSPersistentVolumeSource `json:"storageos,omitempty" protobuf:"bytes,21,opt,name=storageos"`
CSI *CSIPersistentVolumeSource `json:"csi,omitempty" protobuf:"bytes,22,opt,name=csi"`
}
const (
BetaStorageClassAnnotation = "volume.beta.kubernetes.io/storage-class"
MountOptionAnnotation = "volume.beta.kubernetes.io/mount-options"
)
type PersistentVolume struct {
TypeMeta `json:",inline"`
ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
Spec PersistentVolumeSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
Status PersistentVolumeStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
}
type PersistentVolumeSpec struct {
Capacity ResourceList `json:"capacity,omitempty" protobuf:"bytes,1,rep,name=capacity,casttype=ResourceList,castkey=ResourceName"`
PersistentVolumeSource `json:",inline" protobuf:"bytes,2,opt,name=persistentVolumeSource"`
AccessModes []PersistentVolumeAccessMode `json:"accessModes,omitempty" protobuf:"bytes,3,rep,name=accessModes,casttype=PersistentVolumeAccessMode"`
ClaimRef *ObjectReference `json:"claimRef,omitempty" protobuf:"bytes,4,opt,name=claimRef"`
PersistentVolumeReclaimPolicy PersistentVolumeReclaimPolicy `json:"persistentVolumeReclaimPolicy,omitempty" protobuf:"bytes,5,opt,name=persistentVolumeReclaimPolicy,casttype=PersistentVolumeReclaimPolicy"`
StorageClassName string `json:"storageClassName,omitempty" protobuf:"bytes,6,opt,name=storageClassName"`
MountOptions []string `json:"mountOptions,omitempty" protobuf:"bytes,7,opt,name=mountOptions"`
VolumeMode *PersistentVolumeMode `json:"volumeMode,omitempty" protobuf:"bytes,8,opt,name=volumeMode,casttype=PersistentVolumeMode"`
NodeAffinity *VolumeNodeAffinity `json:"nodeAffinity,omitempty" protobuf:"bytes,9,opt,name=nodeAffinity"`
}
type VolumeNodeAffinity struct {
Required *NodeSelector `json:"required,omitempty" protobuf:"bytes,1,opt,name=required"`
}
type PersistentVolumeReclaimPolicy string
const (
PersistentVolumeReclaimRecycle PersistentVolumeReclaimPolicy = "Recycle"
PersistentVolumeReclaimDelete PersistentVolumeReclaimPolicy = "Delete"
PersistentVolumeReclaimRetain PersistentVolumeReclaimPolicy = "Retain"
)
type PersistentVolumeMode string
const (
PersistentVolumeBlock PersistentVolumeMode = "Block"
PersistentVolumeFilesystem PersistentVolumeMode = "Filesystem"
)
type PersistentVolumeStatus struct {
Phase PersistentVolumePhase `json:"phase,omitempty" protobuf:"bytes,1,opt,name=phase,casttype=PersistentVolumePhase"`
Message string `json:"message,omitempty" protobuf:"bytes,2,opt,name=message"`
Reason string `json:"reason,omitempty" protobuf:"bytes,3,opt,name=reason"`
}
type PersistentVolumeList struct {
TypeMeta `json:",inline"`
ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
Items []PersistentVolume `json:"items" protobuf:"bytes,2,rep,name=items"`
}
type PersistentVolumeClaim struct {
TypeMeta `json:",inline"`
ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
Spec PersistentVolumeClaimSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
Status PersistentVolumeClaimStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
}
type PersistentVolumeClaimList struct {
TypeMeta `json:",inline"`
ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
Items []PersistentVolumeClaim `json:"items" protobuf:"bytes,2,rep,name=items"`
}
type PersistentVolumeClaimSpec struct {
AccessModes []PersistentVolumeAccessMode `json:"accessModes,omitempty" protobuf:"bytes,1,rep,name=accessModes,casttype=PersistentVolumeAccessMode"`
Selector *LabelSelector `json:"selector,omitempty" protobuf:"bytes,4,opt,name=selector"`
Resources ResourceRequirements `json:"resources,omitempty" protobuf:"bytes,2,opt,name=resources"`
VolumeName string `json:"volumeName,omitempty" protobuf:"bytes,3,opt,name=volumeName"`
StorageClassName *string `json:"storageClassName,omitempty" protobuf:"bytes,5,opt,name=storageClassName"`
VolumeMode *PersistentVolumeMode `json:"volumeMode,omitempty" protobuf:"bytes,6,opt,name=volumeMode,casttype=PersistentVolumeMode"`
DataSource *TypedLocalObjectReference `json:"dataSource" protobuf:"bytes,7,opt,name=dataSource"`
}
type PersistentVolumeClaimConditionType string
const (
PersistentVolumeClaimResizing PersistentVolumeClaimConditionType = "Resizing"
PersistentVolumeClaimFileSystemResizePending PersistentVolumeClaimConditionType = "FileSystemResizePending"
)
type PersistentVolumeClaimCondition struct {
Type PersistentVolumeClaimConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=PersistentVolumeClaimConditionType"`
Status ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=ConditionStatus"`
LastProbeTime Time `json:"lastProbeTime,omitempty" protobuf:"bytes,3,opt,name=lastProbeTime"`
LastTransitionTime Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"`
Reason string `json:"reason,omitempty" protobuf:"bytes,5,opt,name=reason"`
Message string `json:"message,omitempty" protobuf:"bytes,6,opt,name=message"`
}
type PersistentVolumeClaimStatus struct {
Phase PersistentVolumeClaimPhase `json:"phase,omitempty" protobuf:"bytes,1,opt,name=phase,casttype=PersistentVolumeClaimPhase"`
AccessModes []PersistentVolumeAccessMode `json:"accessModes,omitempty" protobuf:"bytes,2,rep,name=accessModes,casttype=PersistentVolumeAccessMode"`
Capacity ResourceList `json:"capacity,omitempty" protobuf:"bytes,3,rep,name=capacity,casttype=ResourceList,castkey=ResourceName"`
Conditions []PersistentVolumeClaimCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,4,rep,name=conditions"`
}
type PersistentVolumeAccessMode string
const (
ReadWriteOnce PersistentVolumeAccessMode = "ReadWriteOnce"
ReadOnlyMany PersistentVolumeAccessMode = "ReadOnlyMany"
ReadWriteMany PersistentVolumeAccessMode = "ReadWriteMany"
)
type PersistentVolumePhase string
const (
VolumePending PersistentVolumePhase = "Pending"
VolumeAvailable PersistentVolumePhase = "Available"
VolumeBound PersistentVolumePhase = "Bound"
VolumeReleased PersistentVolumePhase = "Released"
VolumeFailed PersistentVolumePhase = "Failed"
)
type PersistentVolumeClaimPhase string
const (
ClaimPending PersistentVolumeClaimPhase = "Pending"
ClaimBound PersistentVolumeClaimPhase = "Bound"
ClaimLost PersistentVolumeClaimPhase = "Lost"
)
type HostPathType string
const (
HostPathUnset HostPathType = ""
HostPathDirectoryOrCreate HostPathType = "DirectoryOrCreate"
HostPathDirectory HostPathType = "Directory"
HostPathFileOrCreate HostPathType = "FileOrCreate"
HostPathFile HostPathType = "File"
HostPathSocket HostPathType = "Socket"
HostPathCharDev HostPathType = "CharDevice"
HostPathBlockDev HostPathType = "BlockDevice"
)
type HostPathVolumeSource struct {
Path string `json:"path" protobuf:"bytes,1,opt,name=path"`
Type *HostPathType `json:"type,omitempty" protobuf:"bytes,2,opt,name=type"`
}
type EmptyDirVolumeSource struct {
Medium StorageMedium `json:"medium,omitempty" protobuf:"bytes,1,opt,name=medium,casttype=StorageMedium"`
SizeLimit string `json:"sizeLimit,omitempty" protobuf:"bytes,2,opt,name=sizeLimit"`
}
type GlusterfsVolumeSource struct {
EndpointsName string `json:"endpoints" protobuf:"bytes,1,opt,name=endpoints"`
Path string `json:"path" protobuf:"bytes,2,opt,name=path"`
ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,3,opt,name=readOnly"`
}
type GlusterfsPersistentVolumeSource struct {
EndpointsName string `json:"endpoints" protobuf:"bytes,1,opt,name=endpoints"`
Path string `json:"path" protobuf:"bytes,2,opt,name=path"`
ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,3,opt,name=readOnly"`
EndpointsNamespace *string `json:"endpointsNamespace,omitempty" protobuf:"bytes,4,opt,name=endpointsNamespace"`
}
type RBDVolumeSource struct {
CephMonitors []string `json:"monitors" protobuf:"bytes,1,rep,name=monitors"`
RBDImage string `json:"image" protobuf:"bytes,2,opt,name=image"`
FSType string `json:"fsType,omitempty" protobuf:"bytes,3,opt,name=fsType"`
RBDPool string `json:"pool,omitempty" protobuf:"bytes,4,opt,name=pool"`
RadosUser string `json:"user,omitempty" protobuf:"bytes,5,opt,name=user"`
Keyring string `json:"keyring,omitempty" protobuf:"bytes,6,opt,name=keyring"`
SecretRef *LocalObjectReference `json:"secretRef,omitempty" protobuf:"bytes,7,opt,name=secretRef"`
ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,8,opt,name=readOnly"`
}
type RBDPersistentVolumeSource struct {
CephMonitors []string `json:"monitors" protobuf:"bytes,1,rep,name=monitors"`
RBDImage string `json:"image" protobuf:"bytes,2,opt,name=image"`
FSType string `json:"fsType,omitempty" protobuf:"bytes,3,opt,name=fsType"`
RBDPool string `json:"pool,omitempty" protobuf:"bytes,4,opt,name=pool"`
RadosUser string `json:"user,omitempty" protobuf:"bytes,5,opt,name=user"`
Keyring string `json:"keyring,omitempty" protobuf:"bytes,6,opt,name=keyring"`
SecretRef *SecretReference `json:"secretRef,omitempty" protobuf:"bytes,7,opt,name=secretRef"`
ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,8,opt,name=readOnly"`
}
type CinderVolumeSource struct {
VolumeID string `json:"volumeID" protobuf:"bytes,1,opt,name=volumeID"`
FSType string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"`
ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,3,opt,name=readOnly"`
SecretRef *LocalObjectReference `json:"secretRef,omitempty" protobuf:"bytes,4,opt,name=secretRef"`
}
type CinderPersistentVolumeSource struct {
VolumeID string `json:"volumeID" protobuf:"bytes,1,opt,name=volumeID"`
FSType string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"`
ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,3,opt,name=readOnly"`
SecretRef *SecretReference `json:"secretRef,omitempty" protobuf:"bytes,4,opt,name=secretRef"`
}
type CephFSVolumeSource struct {
Monitors []string `json:"monitors" protobuf:"bytes,1,rep,name=monitors"`
Path string `json:"path,omitempty" protobuf:"bytes,2,opt,name=path"`
User string `json:"user,omitempty" protobuf:"bytes,3,opt,name=user"`
SecretFile string `json:"secretFile,omitempty" protobuf:"bytes,4,opt,name=secretFile"`
SecretRef *LocalObjectReference `json:"secretRef,omitempty" protobuf:"bytes,5,opt,name=secretRef"`
ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,6,opt,name=readOnly"`
}
type SecretReference struct {
Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"`
Namespace string `json:"namespace,omitempty" protobuf:"bytes,2,opt,name=namespace"`
}
type CephFSPersistentVolumeSource struct {
Monitors []string `json:"monitors" protobuf:"bytes,1,rep,name=monitors"`
Path string `json:"path,omitempty" protobuf:"bytes,2,opt,name=path"`
User string `json:"user,omitempty" protobuf:"bytes,3,opt,name=user"`
SecretFile string `json:"secretFile,omitempty" protobuf:"bytes,4,opt,name=secretFile"`
SecretRef *SecretReference `json:"secretRef,omitempty" protobuf:"bytes,5,opt,name=secretRef"`
ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,6,opt,name=readOnly"`
}
type FlockerVolumeSource struct {
DatasetName string `json:"datasetName,omitempty" protobuf:"bytes,1,opt,name=datasetName"`
DatasetUUID string `json:"datasetUUID,omitempty" protobuf:"bytes,2,opt,name=datasetUUID"`
}
type StorageMedium string
const (
StorageMediumDefault StorageMedium = ""
StorageMediumMemory StorageMedium = "Memory"
StorageMediumHugePages StorageMedium = "HugePages"
)
type Protocol string
const (
ProtocolTCP Protocol = "TCP"
ProtocolUDP Protocol = "UDP"
ProtocolSCTP Protocol = "SCTP"
)
type GCEPersistentDiskVolumeSource struct {
PDName string `json:"pdName" protobuf:"bytes,1,opt,name=pdName"`
FSType string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"`
Partition int32 `json:"partition,omitempty" protobuf:"varint,3,opt,name=partition"`
ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,4,opt,name=readOnly"`
}
type QuobyteVolumeSource struct {
Registry string `json:"registry" protobuf:"bytes,1,opt,name=registry"`
Volume string `json:"volume" protobuf:"bytes,2,opt,name=volume"`
ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,3,opt,name=readOnly"`
User string `json:"user,omitempty" protobuf:"bytes,4,opt,name=user"`
Group string `json:"group,omitempty" protobuf:"bytes,5,opt,name=group"`
}
type FlexPersistentVolumeSource struct {
Driver string `json:"driver" protobuf:"bytes,1,opt,name=driver"`
FSType string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"`
SecretRef *SecretReference `json:"secretRef,omitempty" protobuf:"bytes,3,opt,name=secretRef"`
ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,4,opt,name=readOnly"`
Options map[string]string `json:"options,omitempty" protobuf:"bytes,5,rep,name=options"`
}
type FlexVolumeSource struct {
Driver string `json:"driver" protobuf:"bytes,1,opt,name=driver"`
FSType string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"`
SecretRef *LocalObjectReference `json:"secretRef,omitempty" protobuf:"bytes,3,opt,name=secretRef"`
ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,4,opt,name=readOnly"`
Options map[string]string `json:"options,omitempty" protobuf:"bytes,5,rep,name=options"`
}
type AWSElasticBlockStoreVolumeSource struct {
VolumeID string `json:"volumeID" protobuf:"bytes,1,opt,name=volumeID"`
FSType string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"`
Partition int32 `json:"partition,omitempty" protobuf:"varint,3,opt,name=partition"`
ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,4,opt,name=readOnly"`
}
type GitRepoVolumeSource struct {
Repository string `json:"repository" protobuf:"bytes,1,opt,name=repository"`
Revision string `json:"revision,omitempty" protobuf:"bytes,2,opt,name=revision"`
Directory string `json:"directory,omitempty" protobuf:"bytes,3,opt,name=directory"`
}
type SecretVolumeSource struct {
SecretName string `json:"secretName,omitempty" protobuf:"bytes,1,opt,name=secretName"`
Items []KeyToPath `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"`
DefaultMode *int32 `json:"defaultMode,omitempty" protobuf:"bytes,3,opt,name=defaultMode"`
Optional *bool `json:"optional,omitempty" protobuf:"varint,4,opt,name=optional"`
}
const (
SecretVolumeSourceDefaultMode int32 = 0644
)
type SecretProjection struct {
LocalObjectReference `json:",inline" protobuf:"bytes,1,opt,name=localObjectReference"`
Items []KeyToPath `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"`
Optional *bool `json:"optional,omitempty" protobuf:"varint,4,opt,name=optional"`
}
type NFSVolumeSource struct {
Server string `json:"server" protobuf:"bytes,1,opt,name=server"`
Path string `json:"path" protobuf:"bytes,2,opt,name=path"`
ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,3,opt,name=readOnly"`
}
type ISCSIVolumeSource struct {
TargetPortal string `json:"targetPortal" protobuf:"bytes,1,opt,name=targetPortal"`
IQN string `json:"iqn" protobuf:"bytes,2,opt,name=iqn"`
Lun int32 `json:"lun" protobuf:"varint,3,opt,name=lun"`
ISCSIInterface string `json:"iscsiInterface,omitempty" protobuf:"bytes,4,opt,name=iscsiInterface"`
FSType string `json:"fsType,omitempty" protobuf:"bytes,5,opt,name=fsType"`
ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,6,opt,name=readOnly"`
Portals []string `json:"portals,omitempty" protobuf:"bytes,7,opt,name=portals"`
DiscoveryCHAPAuth bool `json:"chapAuthDiscovery,omitempty" protobuf:"varint,8,opt,name=chapAuthDiscovery"`
SessionCHAPAuth bool `json:"chapAuthSession,omitempty" protobuf:"varint,11,opt,name=chapAuthSession"`
SecretRef *LocalObjectReference `json:"secretRef,omitempty" protobuf:"bytes,10,opt,name=secretRef"`
InitiatorName *string `json:"initiatorName,omitempty" protobuf:"bytes,12,opt,name=initiatorName"`
}
type ISCSIPersistentVolumeSource struct {
TargetPortal string `json:"targetPortal" protobuf:"bytes,1,opt,name=targetPortal"`
IQN string `json:"iqn" protobuf:"bytes,2,opt,name=iqn"`
Lun int32 `json:"lun" protobuf:"varint,3,opt,name=lun"`
ISCSIInterface string `json:"iscsiInterface,omitempty" protobuf:"bytes,4,opt,name=iscsiInterface"`
FSType string `json:"fsType,omitempty" protobuf:"bytes,5,opt,name=fsType"`
ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,6,opt,name=readOnly"`
Portals []string `json:"portals,omitempty" protobuf:"bytes,7,opt,name=portals"`
DiscoveryCHAPAuth bool `json:"chapAuthDiscovery,omitempty" protobuf:"varint,8,opt,name=chapAuthDiscovery"`
SessionCHAPAuth bool `json:"chapAuthSession,omitempty" protobuf:"varint,11,opt,name=chapAuthSession"`
SecretRef *SecretReference `json:"secretRef,omitempty" protobuf:"bytes,10,opt,name=secretRef"`
InitiatorName *string `json:"initiatorName,omitempty" protobuf:"bytes,12,opt,name=initiatorName"`
}
type FCVolumeSource struct {
TargetWWNs []string `json:"targetWWNs,omitempty" protobuf:"bytes,1,rep,name=targetWWNs"`
Lun *int32 `json:"lun,omitempty" protobuf:"varint,2,opt,name=lun"`
FSType string `json:"fsType,omitempty" protobuf:"bytes,3,opt,name=fsType"`
ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,4,opt,name=readOnly"`
WWIDs []string `json:"wwids,omitempty" protobuf:"bytes,5,rep,name=wwids"`
}
type AzureFileVolumeSource struct {
SecretName string `json:"secretName" protobuf:"bytes,1,opt,name=secretName"`
ShareName string `json:"shareName" protobuf:"bytes,2,opt,name=shareName"`
ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,3,opt,name=readOnly"`
}
type AzureFilePersistentVolumeSource struct {
SecretName string `json:"secretName" protobuf:"bytes,1,opt,name=secretName"`
ShareName string `json:"shareName" protobuf:"bytes,2,opt,name=shareName"`
ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,3,opt,name=readOnly"`
SecretNamespace *string `json:"secretNamespace" protobuf:"bytes,4,opt,name=secretNamespace"`
}
type VsphereVirtualDiskVolumeSource struct {
VolumePath string `json:"volumePath" protobuf:"bytes,1,opt,name=volumePath"`
FSType string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"`
StoragePolicyName string `json:"storagePolicyName,omitempty" protobuf:"bytes,3,opt,name=storagePolicyName"`
StoragePolicyID string `json:"storagePolicyID,omitempty" protobuf:"bytes,4,opt,name=storagePolicyID"`
}
type PhotonPersistentDiskVolumeSource struct {
PdID string `json:"pdID" protobuf:"bytes,1,opt,name=pdID"`
FSType string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"`
}
type AzureDataDiskCachingMode string
type AzureDataDiskKind string
const (
AzureDataDiskCachingNone AzureDataDiskCachingMode = "None"
AzureDataDiskCachingReadOnly AzureDataDiskCachingMode = "ReadOnly"
AzureDataDiskCachingReadWrite AzureDataDiskCachingMode = "ReadWrite"
AzureSharedBlobDisk AzureDataDiskKind = "Shared"
AzureDedicatedBlobDisk AzureDataDiskKind = "Dedicated"
AzureManagedDisk AzureDataDiskKind = "Managed"
)
type AzureDiskVolumeSource struct {
DiskName string `json:"diskName" protobuf:"bytes,1,opt,name=diskName"`
DataDiskURI string `json:"diskURI" protobuf:"bytes,2,opt,name=diskURI"`
CachingMode *AzureDataDiskCachingMode `json:"cachingMode,omitempty" protobuf:"bytes,3,opt,name=cachingMode,casttype=AzureDataDiskCachingMode"`
FSType *string `json:"fsType,omitempty" protobuf:"bytes,4,opt,name=fsType"`
ReadOnly *bool `json:"readOnly,omitempty" protobuf:"varint,5,opt,name=readOnly"`
Kind *AzureDataDiskKind `json:"kind,omitempty" protobuf:"bytes,6,opt,name=kind,casttype=AzureDataDiskKind"`
}
type PortworxVolumeSource struct {
VolumeID string `json:"volumeID" protobuf:"bytes,1,opt,name=volumeID"`
FSType string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"`
ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,3,opt,name=readOnly"`
}
type ScaleIOVolumeSource struct {
Gateway string `json:"gateway" protobuf:"bytes,1,opt,name=gateway"`
System string `json:"system" protobuf:"bytes,2,opt,name=system"`
SecretRef *LocalObjectReference `json:"secretRef" protobuf:"bytes,3,opt,name=secretRef"`
SSLEnabled bool `json:"sslEnabled,omitempty" protobuf:"varint,4,opt,name=sslEnabled"`
ProtectionDomain string `json:"protectionDomain,omitempty" protobuf:"bytes,5,opt,name=protectionDomain"`
StoragePool string `json:"storagePool,omitempty" protobuf:"bytes,6,opt,name=storagePool"`
StorageMode string `json:"storageMode,omitempty" protobuf:"bytes,7,opt,name=storageMode"`
VolumeName string `json:"volumeName,omitempty" protobuf:"bytes,8,opt,name=volumeName"`
FSType string `json:"fsType,omitempty" protobuf:"bytes,9,opt,name=fsType"`
ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,10,opt,name=readOnly"`
}
type ScaleIOPersistentVolumeSource struct {
Gateway string `json:"gateway" protobuf:"bytes,1,opt,name=gateway"`
System string `json:"system" protobuf:"bytes,2,opt,name=system"`
SecretRef *SecretReference `json:"secretRef" protobuf:"bytes,3,opt,name=secretRef"`
SSLEnabled bool `json:"sslEnabled,omitempty" protobuf:"varint,4,opt,name=sslEnabled"`
ProtectionDomain string `json:"protectionDomain,omitempty" protobuf:"bytes,5,opt,name=protectionDomain"`
StoragePool string `json:"storagePool,omitempty" protobuf:"bytes,6,opt,name=storagePool"`
StorageMode string `json:"storageMode,omitempty" protobuf:"bytes,7,opt,name=storageMode"`
VolumeName string `json:"volumeName,omitempty" protobuf:"bytes,8,opt,name=volumeName"`
FSType string `json:"fsType,omitempty" protobuf:"bytes,9,opt,name=fsType"`
ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,10,opt,name=readOnly"`
}
type StorageOSVolumeSource struct {
VolumeName string `json:"volumeName,omitempty" protobuf:"bytes,1,opt,name=volumeName"`
VolumeNamespace string `json:"volumeNamespace,omitempty" protobuf:"bytes,2,opt,name=volumeNamespace"`
FSType string `json:"fsType,omitempty" protobuf:"bytes,3,opt,name=fsType"`
ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,4,opt,name=readOnly"`
SecretRef *LocalObjectReference `json:"secretRef,omitempty" protobuf:"bytes,5,opt,name=secretRef"`
}
type StorageOSPersistentVolumeSource struct {
VolumeName string `json:"volumeName,omitempty" protobuf:"bytes,1,opt,name=volumeName"`
VolumeNamespace string `json:"volumeNamespace,omitempty" protobuf:"bytes,2,opt,name=volumeNamespace"`
FSType string `json:"fsType,omitempty" protobuf:"bytes,3,opt,name=fsType"`
ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,4,opt,name=readOnly"`
SecretRef *ObjectReference `json:"secretRef,omitempty" protobuf:"bytes,5,opt,name=secretRef"`
}
type ConfigMapVolumeSource struct {
LocalObjectReference `json:",inline" protobuf:"bytes,1,opt,name=localObjectReference"`
Items []KeyToPath `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"`
DefaultMode *int32 `json:"defaultMode,omitempty" protobuf:"varint,3,opt,name=defaultMode"`
Optional *bool `json:"optional,omitempty" protobuf:"varint,4,opt,name=optional"`
}
const (
ConfigMapVolumeSourceDefaultMode int32 = 0644
)
type ConfigMapProjection struct {
LocalObjectReference `json:",inline" protobuf:"bytes,1,opt,name=localObjectReference"`
Items []KeyToPath `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"`
Optional *bool `json:"optional,omitempty" protobuf:"varint,4,opt,name=optional"`
}
type ServiceAccountTokenProjection struct {
Audience string `json:"audience,omitempty" protobuf:"bytes,1,rep,name=audience"`
ExpirationSeconds *int64 `json:"expirationSeconds,omitempty" protobuf:"varint,2,opt,name=expirationSeconds"`
Path string `json:"path" protobuf:"bytes,3,opt,name=path"`
}
type ProjectedVolumeSource struct {
Sources []VolumeProjection `json:"sources" protobuf:"bytes,1,rep,name=sources"`
DefaultMode *int32 `json:"defaultMode,omitempty" protobuf:"varint,2,opt,name=defaultMode"`
}
type VolumeProjection struct {
Secret *SecretProjection `json:"secret,omitempty" protobuf:"bytes,1,opt,name=secret"`
DownwardAPI *DownwardAPIProjection `json:"downwardAPI,omitempty" protobuf:"bytes,2,opt,name=downwardAPI"`
ConfigMap *ConfigMapProjection `json:"configMap,omitempty" protobuf:"bytes,3,opt,name=configMap"`
ServiceAccountToken *ServiceAccountTokenProjection `json:"serviceAccountToken,omitempty" protobuf:"bytes,4,opt,name=serviceAccountToken"`
}
const (
ProjectedVolumeSourceDefaultMode int32 = 0644
)
type KeyToPath struct {
Key string `json:"key" protobuf:"bytes,1,opt,name=key"`
Path string `json:"path" protobuf:"bytes,2,opt,name=path"`
Mode *int32 `json:"mode,omitempty" protobuf:"varint,3,opt,name=mode"`
}
type LocalVolumeSource struct {
Path string `json:"path" protobuf:"bytes,1,opt,name=path"`
FSType *string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"`
}
type CSIPersistentVolumeSource struct {
Driver string `json:"driver" protobuf:"bytes,1,opt,name=driver"`
VolumeHandle string `json:"volumeHandle" protobuf:"bytes,2,opt,name=volumeHandle"`
ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,3,opt,name=readOnly"`
FSType string `json:"fsType,omitempty" protobuf:"bytes,4,opt,name=fsType"`
VolumeAttributes map[string]string `json:"volumeAttributes,omitempty" protobuf:"bytes,5,rep,name=volumeAttributes"`
ControllerPublishSecretRef *SecretReference `json:"controllerPublishSecretRef,omitempty" protobuf:"bytes,6,opt,name=controllerPublishSecretRef"`
NodeStageSecretRef *SecretReference `json:"nodeStageSecretRef,omitempty" protobuf:"bytes,7,opt,name=nodeStageSecretRef"`
NodePublishSecretRef *SecretReference `json:"nodePublishSecretRef,omitempty" protobuf:"bytes,8,opt,name=nodePublishSecretRef"`
}
type ContainerPort struct {
Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"`
HostPort int32 `json:"hostPort,omitempty" protobuf:"varint,2,opt,name=hostPort"`
ContainerPort int32 `json:"containerPort" protobuf:"varint,3,opt,name=containerPort"`
Protocol Protocol `json:"protocol,omitempty" protobuf:"bytes,4,opt,name=protocol,casttype=Protocol"`
HostIP string `json:"hostIP,omitempty" protobuf:"bytes,5,opt,name=hostIP"`
}
type VolumeMount struct {
Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,2,opt,name=readOnly"`
MountPath string `json:"mountPath" protobuf:"bytes,3,opt,name=mountPath"`
SubPath string `json:"subPath,omitempty" protobuf:"bytes,4,opt,name=subPath"`
MountPropagation *MountPropagationMode `json:"mountPropagation,omitempty" protobuf:"bytes,5,opt,name=mountPropagation,casttype=MountPropagationMode"`
}
type MountPropagationMode string
const (
MountPropagationNone MountPropagationMode = "None"
MountPropagationHostToContainer MountPropagationMode = "HostToContainer"
MountPropagationBidirectional MountPropagationMode = "Bidirectional"
)
type VolumeDevice struct {
Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
DevicePath string `json:"devicePath" protobuf:"bytes,2,opt,name=devicePath"`
}
type EnvVar struct {
Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
Value string `json:"value,omitempty" protobuf:"bytes,2,opt,name=value"`
ValueFrom *EnvVarSource `json:"valueFrom,omitempty" protobuf:"bytes,3,opt,name=valueFrom"`
}
type EnvVarSource struct {
FieldRef *ObjectFieldSelector `json:"fieldRef,omitempty" protobuf:"bytes,1,opt,name=fieldRef"`
ResourceFieldRef *ResourceFieldSelector `json:"resourceFieldRef,omitempty" protobuf:"bytes,2,opt,name=resourceFieldRef"`
ConfigMapKeyRef *ConfigMapKeySelector `json:"configMapKeyRef,omitempty" protobuf:"bytes,3,opt,name=configMapKeyRef"`
SecretKeyRef *SecretKeySelector `json:"secretKeyRef,omitempty" protobuf:"bytes,4,opt,name=secretKeyRef"`
}
type ObjectFieldSelector struct {
APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,1,opt,name=apiVersion"`
FieldPath string `json:"fieldPath" protobuf:"bytes,2,opt,name=fieldPath"`
}
type ResourceFieldSelector struct {
ContainerName string `json:"containerName,omitempty" protobuf:"bytes,1,opt,name=containerName"`
Resource string `json:"resource" protobuf:"bytes,2,opt,name=resource"`
Divisor string `json:"divisor,omitempty" protobuf:"bytes,3,opt,name=divisor"`
}
type ConfigMapKeySelector struct {
LocalObjectReference `json:",inline" protobuf:"bytes,1,opt,name=localObjectReference"`
Key string `json:"key" protobuf:"bytes,2,opt,name=key"`
Optional *bool `json:"optional,omitempty" protobuf:"varint,3,opt,name=optional"`
}
type SecretKeySelector struct {
LocalObjectReference `json:",inline" protobuf:"bytes,1,opt,name=localObjectReference"`
Key string `json:"key" protobuf:"bytes,2,opt,name=key"`
Optional *bool `json:"optional,omitempty" protobuf:"varint,3,opt,name=optional"`
}
type EnvFromSource struct {
Prefix string `json:"prefix,omitempty" protobuf:"bytes,1,opt,name=prefix"`
ConfigMapRef *ConfigMapEnvSource `json:"configMapRef,omitempty" protobuf:"bytes,2,opt,name=configMapRef"`
SecretRef *SecretEnvSource `json:"secretRef,omitempty" protobuf:"bytes,3,opt,name=secretRef"`
}
type ConfigMapEnvSource struct {
LocalObjectReference `json:",inline" protobuf:"bytes,1,opt,name=localObjectReference"`
Optional *bool `json:"optional,omitempty" protobuf:"varint,2,opt,name=optional"`
}
type SecretEnvSource struct {
LocalObjectReference `json:",inline" protobuf:"bytes,1,opt,name=localObjectReference"`
Optional *bool `json:"optional,omitempty" protobuf:"varint,2,opt,name=optional"`
}
type HTTPHeader struct {
Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
Value string `json:"value" protobuf:"bytes,2,opt,name=value"`
}
type HTTPGetAction struct {
Path string `json:"path,omitempty" protobuf:"bytes,1,opt,name=path"`
Port json.Number `json:"port,Number" protobuf:"bytes,2,opt,name=port"`
Host string `json:"host,omitempty" protobuf:"bytes,3,opt,name=host"`
Scheme URIScheme `json:"scheme,omitempty" protobuf:"bytes,4,opt,name=scheme,casttype=URIScheme"`
HTTPHeaders []HTTPHeader `json:"httpHeaders,omitempty" protobuf:"bytes,5,rep,name=httpHeaders"`
}
type URIScheme string
const (
URISchemeHTTP URIScheme = "HTTP"
URISchemeHTTPS URIScheme = "HTTPS"
)
type TCPSocketAction struct {
Port json.Number `json:"port,Number" protobuf:"bytes,1,opt,name=port"`
Host string `json:"host,omitempty" protobuf:"bytes,2,opt,name=host"`
}
type ExecAction struct {
Command []string `json:"command,omitempty" protobuf:"bytes,1,rep,name=command"`
}
type Probe struct {
Handler `json:",inline" protobuf:"bytes,1,opt,name=handler"`
InitialDelaySeconds int32 `json:"initialDelaySeconds,omitempty" protobuf:"varint,2,opt,name=initialDelaySeconds"`
TimeoutSeconds int32 `json:"timeoutSeconds,omitempty" protobuf:"varint,3,opt,name=timeoutSeconds"`
PeriodSeconds int32 `json:"periodSeconds,omitempty" protobuf:"varint,4,opt,name=periodSeconds"`
SuccessThreshold int32 `json:"successThreshold,omitempty" protobuf:"varint,5,opt,name=successThreshold"`
FailureThreshold int32 `json:"failureThreshold,omitempty" protobuf:"varint,6,opt,name=failureThreshold"`
}
type PullPolicy string
const (
PullAlways PullPolicy = "Always"
PullNever PullPolicy = "Never"
PullIfNotPresent PullPolicy = "IfNotPresent"
)
type TerminationMessagePolicy string
const (
TerminationMessageReadFile TerminationMessagePolicy = "File"
TerminationMessageFallbackToLogsOnError TerminationMessagePolicy = "FallbackToLogsOnError"
)
type Capability string
type Capabilities struct {
Add []Capability `json:"add,omitempty" protobuf:"bytes,1,rep,name=add,casttype=Capability"`
Drop []Capability `json:"drop,omitempty" protobuf:"bytes,2,rep,name=drop,casttype=Capability"`
}
type ResourceRequirements struct {
Limits ResourceList `json:"limits,omitempty" protobuf:"bytes,1,rep,name=limits,casttype=ResourceList,castkey=ResourceName"`
Requests ResourceList `json:"requests,omitempty" protobuf:"bytes,2,rep,name=requests,casttype=ResourceList,castkey=ResourceName"`
}
const (
TerminationMessagePathDefault string = "/dev/termination-log"
)
type Container struct {
Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
Image string `json:"image,omitempty" protobuf:"bytes,2,opt,name=image"`
Command []string `json:"command,omitempty" protobuf:"bytes,3,rep,name=command"`
Args []string `json:"args,omitempty" protobuf:"bytes,4,rep,name=args"`
WorkingDir string `json:"workingDir,omitempty" protobuf:"bytes,5,opt,name=workingDir"`
Ports []ContainerPort `json:"ports,omitempty" patchStrategy:"merge" patchMergeKey:"containerPort" protobuf:"bytes,6,rep,name=ports"`
EnvFrom []EnvFromSource `json:"envFrom,omitempty" protobuf:"bytes,19,rep,name=envFrom"`
Env []EnvVar `json:"env,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,7,rep,name=env"`
Resources ResourceRequirements `json:"resources,omitempty" protobuf:"bytes,8,opt,name=resources"`
VolumeMounts []VolumeMount `json:"volumeMounts,omitempty" patchStrategy:"merge" patchMergeKey:"mountPath" protobuf:"bytes,9,rep,name=volumeMounts"`
VolumeDevices []VolumeDevice `json:"volumeDevices,omitempty" patchStrategy:"merge" patchMergeKey:"devicePath" protobuf:"bytes,21,rep,name=volumeDevices"`
LivenessProbe *Probe `json:"livenessProbe,omitempty" protobuf:"bytes,10,opt,name=livenessProbe"`
ReadinessProbe *Probe `json:"readinessProbe,omitempty" protobuf:"bytes,11,opt,name=readinessProbe"`
Lifecycle *Lifecycle `json:"lifecycle,omitempty" protobuf:"bytes,12,opt,name=lifecycle"`
TerminationMessagePath string `json:"terminationMessagePath,omitempty" protobuf:"bytes,13,opt,name=terminationMessagePath"`
TerminationMessagePolicy TerminationMessagePolicy `json:"terminationMessagePolicy,omitempty" protobuf:"bytes,20,opt,name=terminationMessagePolicy,casttype=TerminationMessagePolicy"`
ImagePullPolicy PullPolicy `json:"imagePullPolicy,omitempty" protobuf:"bytes,14,opt,name=imagePullPolicy,casttype=PullPolicy"`
SecurityContext *SecurityContext `json:"securityContext,omitempty" protobuf:"bytes,15,opt,name=securityContext"`
Stdin bool `json:"stdin,omitempty" protobuf:"varint,16,opt,name=stdin"`
StdinOnce bool `json:"stdinOnce,omitempty" protobuf:"varint,17,opt,name=stdinOnce"`
TTY bool `json:"tty,omitempty" protobuf:"varint,18,opt,name=tty"`
}
type Handler struct {
Exec *ExecAction `json:"exec,omitempty" protobuf:"bytes,1,opt,name=exec"`
HTTPGet *HTTPGetAction `json:"httpGet,omitempty" protobuf:"bytes,2,opt,name=httpGet"`
TCPSocket *TCPSocketAction `json:"tcpSocket,omitempty" protobuf:"bytes,3,opt,name=tcpSocket"`
}
type Lifecycle struct {
PostStart *Handler `json:"postStart,omitempty" protobuf:"bytes,1,opt,name=postStart"`
PreStop *Handler `json:"preStop,omitempty" protobuf:"bytes,2,opt,name=preStop"`
}
type ConditionStatus string
const (
ConditionTrue ConditionStatus = "True"
ConditionFalse ConditionStatus = "False"
ConditionUnknown ConditionStatus = "Unknown"
)
type ContainerStateWaiting struct {
Reason string `json:"reason,omitempty" protobuf:"bytes,1,opt,name=reason"`
Message string `json:"message,omitempty" protobuf:"bytes,2,opt,name=message"`
}
type ContainerStateRunning struct {
StartedAt Time `json:"startedAt,omitempty" protobuf:"bytes,1,opt,name=startedAt"`
}
type ContainerStateTerminated struct {
ExitCode int32 `json:"exitCode" protobuf:"varint,1,opt,name=exitCode"`
Signal int32 `json:"signal,omitempty" protobuf:"varint,2,opt,name=signal"`
Reason string `json:"reason,omitempty" protobuf:"bytes,3,opt,name=reason"`
Message string `json:"message,omitempty" protobuf:"bytes,4,opt,name=message"`
StartedAt Time `json:"startedAt,omitempty" protobuf:"bytes,5,opt,name=startedAt"`
FinishedAt Time `json:"finishedAt,omitempty" protobuf:"bytes,6,opt,name=finishedAt"`
ContainerID string `json:"containerID,omitempty" protobuf:"bytes,7,opt,name=containerID"`
}
type ContainerState struct {
Waiting *ContainerStateWaiting `json:"waiting,omitempty" protobuf:"bytes,1,opt,name=waiting"`
Running *ContainerStateRunning `json:"running,omitempty" protobuf:"bytes,2,opt,name=running"`
Terminated *ContainerStateTerminated `json:"terminated,omitempty" protobuf:"bytes,3,opt,name=terminated"`
}
type ContainerStatus struct {
Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
State ContainerState `json:"state,omitempty" protobuf:"bytes,2,opt,name=state"`
LastTerminationState ContainerState `json:"lastState,omitempty" protobuf:"bytes,3,opt,name=lastState"`
Ready bool `json:"ready" protobuf:"varint,4,opt,name=ready"`
RestartCount int32 `json:"restartCount" protobuf:"varint,5,opt,name=restartCount"`
Image string `json:"image" protobuf:"bytes,6,opt,name=image"`
ImageID string `json:"imageID" protobuf:"bytes,7,opt,name=imageID"`
ContainerID string `json:"containerID,omitempty" protobuf:"bytes,8,opt,name=containerID"`
}
type PodPhase string
const (
PodPending PodPhase = "Pending"
PodRunning PodPhase = "Running"
PodSucceeded PodPhase = "Succeeded"
PodFailed PodPhase = "Failed"
PodUnknown PodPhase = "Unknown"
)
type PodConditionType string
const (
PodScheduled PodConditionType = "PodScheduled"
PodReady PodConditionType = "Ready"
PodInitialized PodConditionType = "Initialized"
PodReasonUnschedulable = "Unschedulable"
ContainersReady PodConditionType = "ContainersReady"
)
type PodCondition struct {
Type PodConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=PodConditionType"`
Status ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=ConditionStatus"`
LastProbeTime Time `json:"lastProbeTime,omitempty" protobuf:"bytes,3,opt,name=lastProbeTime"`
LastTransitionTime Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"`
Reason string `json:"reason,omitempty" protobuf:"bytes,5,opt,name=reason"`
Message string `json:"message,omitempty" protobuf:"bytes,6,opt,name=message"`
}
type RestartPolicy string
const (
RestartPolicyAlways RestartPolicy = "Always"
RestartPolicyOnFailure RestartPolicy = "OnFailure"
RestartPolicyNever RestartPolicy = "Never"
)
type DNSPolicy string
const (
DNSClusterFirstWithHostNet DNSPolicy = "ClusterFirstWithHostNet"
DNSClusterFirst DNSPolicy = "ClusterFirst"
DNSDefault DNSPolicy = "Default"
DNSNone DNSPolicy = "None"
)
const (
DefaultTerminationGracePeriodSeconds = 30
)
type NodeSelector struct {
NodeSelectorTerms []NodeSelectorTerm `json:"nodeSelectorTerms" protobuf:"bytes,1,rep,name=nodeSelectorTerms"`
}
type NodeSelectorTerm struct {
MatchExpressions []NodeSelectorRequirement `json:"matchExpressions,omitempty" protobuf:"bytes,1,rep,name=matchExpressions"`
MatchFields []NodeSelectorRequirement `json:"matchFields,omitempty" protobuf:"bytes,2,rep,name=matchFields"`
}
type NodeSelectorRequirement struct {
Key string `json:"key" protobuf:"bytes,1,opt,name=key"`
Operator NodeSelectorOperator `json:"operator" protobuf:"bytes,2,opt,name=operator,casttype=NodeSelectorOperator"`
Values []string `json:"values,omitempty" protobuf:"bytes,3,rep,name=values"`
}
type NodeSelectorOperator string
const (
NodeSelectorOpIn NodeSelectorOperator = "In"
NodeSelectorOpNotIn NodeSelectorOperator = "NotIn"
NodeSelectorOpExists NodeSelectorOperator = "Exists"
NodeSelectorOpDoesNotExist NodeSelectorOperator = "DoesNotExist"
NodeSelectorOpGt NodeSelectorOperator = "Gt"
NodeSelectorOpLt NodeSelectorOperator = "Lt"
)
type TopologySelectorTerm struct {
MatchLabelExpressions []TopologySelectorLabelRequirement `json:"matchLabelExpressions,omitempty" protobuf:"bytes,1,rep,name=matchLabelExpressions"`
}
type TopologySelectorLabelRequirement struct {
Key string `json:"key" protobuf:"bytes,1,opt,name=key"`
Values []string `json:"values" protobuf:"bytes,2,rep,name=values"`
}
type Affinity struct {
NodeAffinity *NodeAffinity `json:"nodeAffinity,omitempty" protobuf:"bytes,1,opt,name=nodeAffinity"`
PodAffinity *PodAffinity `json:"podAffinity,omitempty" protobuf:"bytes,2,opt,name=podAffinity"`
PodAntiAffinity *PodAntiAffinity `json:"podAntiAffinity,omitempty" protobuf:"bytes,3,opt,name=podAntiAffinity"`
}
type PodAffinity struct {
RequiredDuringSchedulingIgnoredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingIgnoredDuringExecution,omitempty" protobuf:"bytes,1,rep,name=requiredDuringSchedulingIgnoredDuringExecution"`
PreferredDuringSchedulingIgnoredDuringExecution []WeightedPodAffinityTerm `json:"preferredDuringSchedulingIgnoredDuringExecution,omitempty" protobuf:"bytes,2,rep,name=preferredDuringSchedulingIgnoredDuringExecution"`
}
type PodAntiAffinity struct {
RequiredDuringSchedulingIgnoredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingIgnoredDuringExecution,omitempty" protobuf:"bytes,1,rep,name=requiredDuringSchedulingIgnoredDuringExecution"`
PreferredDuringSchedulingIgnoredDuringExecution []WeightedPodAffinityTerm `json:"preferredDuringSchedulingIgnoredDuringExecution,omitempty" protobuf:"bytes,2,rep,name=preferredDuringSchedulingIgnoredDuringExecution"`
}
type WeightedPodAffinityTerm struct {
Weight int32 `json:"weight" protobuf:"varint,1,opt,name=weight"`
PodAffinityTerm PodAffinityTerm `json:"podAffinityTerm" protobuf:"bytes,2,opt,name=podAffinityTerm"`
}
type PodAffinityTerm struct {
LabelSelector *LabelSelector `json:"labelSelector,omitempty" protobuf:"bytes,1,opt,name=labelSelector"`
Namespaces []string `json:"namespaces,omitempty" protobuf:"bytes,2,rep,name=namespaces"`
TopologyKey string `json:"topologyKey" protobuf:"bytes,3,opt,name=topologyKey"`
}
type NodeAffinity struct {
RequiredDuringSchedulingIgnoredDuringExecution *NodeSelector `json:"requiredDuringSchedulingIgnoredDuringExecution,omitempty" protobuf:"bytes,1,opt,name=requiredDuringSchedulingIgnoredDuringExecution"`
PreferredDuringSchedulingIgnoredDuringExecution []PreferredSchedulingTerm `json:"preferredDuringSchedulingIgnoredDuringExecution,omitempty" protobuf:"bytes,2,rep,name=preferredDuringSchedulingIgnoredDuringExecution"`
}
type PreferredSchedulingTerm struct {
Weight int32 `json:"weight" protobuf:"varint,1,opt,name=weight"`
Preference NodeSelectorTerm `json:"preference" protobuf:"bytes,2,opt,name=preference"`
}
type Taint struct {
Key string `json:"key" protobuf:"bytes,1,opt,name=key"`
Value string `json:"value,omitempty" protobuf:"bytes,2,opt,name=value"`
Effect TaintEffect `json:"effect" protobuf:"bytes,3,opt,name=effect,casttype=TaintEffect"`
TimeAdded *Time `json:"timeAdded,omitempty" protobuf:"bytes,4,opt,name=timeAdded"`
}
type TaintEffect string
const (
TaintEffectNoSchedule TaintEffect = "NoSchedule"
TaintEffectPreferNoSchedule TaintEffect = "PreferNoSchedule"
TaintEffectNoExecute TaintEffect = "NoExecute"
)
type Toleration struct {
Key string `json:"key,omitempty" protobuf:"bytes,1,opt,name=key"`
Operator TolerationOperator `json:"operator,omitempty" protobuf:"bytes,2,opt,name=operator,casttype=TolerationOperator"`
Value string `json:"value,omitempty" protobuf:"bytes,3,opt,name=value"`
Effect TaintEffect `json:"effect,omitempty" protobuf:"bytes,4,opt,name=effect,casttype=TaintEffect"`
TolerationSeconds *int64 `json:"tolerationSeconds,omitempty" protobuf:"varint,5,opt,name=tolerationSeconds"`
}
type TolerationOperator string
const (
TolerationOpExists TolerationOperator = "Exists"
TolerationOpEqual TolerationOperator = "Equal"
)
type PodReadinessGate struct {
ConditionType PodConditionType `json:"conditionType" protobuf:"bytes,1,opt,name=conditionType,casttype=PodConditionType"`
}
type PodSpec struct {
Volumes []Volume `json:"volumes,omitempty" patchStrategy:"merge,retainKeys" patchMergeKey:"name" protobuf:"bytes,1,rep,name=volumes"`
InitContainers []Container `json:"initContainers,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,20,rep,name=initContainers"`
Containers []Container `json:"containers" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,2,rep,name=containers"`
RestartPolicy RestartPolicy `json:"restartPolicy,omitempty" protobuf:"bytes,3,opt,name=restartPolicy,casttype=RestartPolicy"`
TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty" protobuf:"varint,4,opt,name=terminationGracePeriodSeconds"`
ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty" protobuf:"varint,5,opt,name=activeDeadlineSeconds"`
DNSPolicy DNSPolicy `json:"dnsPolicy,omitempty" protobuf:"bytes,6,opt,name=dnsPolicy,casttype=DNSPolicy"`
NodeSelector map[string]string `json:"nodeSelector,omitempty" protobuf:"bytes,7,rep,name=nodeSelector"`
ServiceAccountName string `json:"serviceAccountName,omitempty" protobuf:"bytes,8,opt,name=serviceAccountName"`
DeprecatedServiceAccount string `json:"serviceAccount,omitempty" protobuf:"bytes,9,opt,name=serviceAccount"`
AutomountServiceAccountToken *bool `json:"automountServiceAccountToken,omitempty" protobuf:"varint,21,opt,name=automountServiceAccountToken"`
NodeName string `json:"nodeName,omitempty" protobuf:"bytes,10,opt,name=nodeName"`
HostNetwork bool `json:"hostNetwork,omitempty" protobuf:"varint,11,opt,name=hostNetwork"`
HostPID bool `json:"hostPID,omitempty" protobuf:"varint,12,opt,name=hostPID"`
HostIPC bool `json:"hostIPC,omitempty" protobuf:"varint,13,opt,name=hostIPC"`
ShareProcessNamespace *bool `json:"shareProcessNamespace,omitempty" protobuf:"varint,27,opt,name=shareProcessNamespace"`
SecurityContext *PodSecurityContext `json:"securityContext,omitempty" protobuf:"bytes,14,opt,name=securityContext"`
ImagePullSecrets []LocalObjectReference `json:"imagePullSecrets,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,15,rep,name=imagePullSecrets"`
Hostname string `json:"hostname,omitempty" protobuf:"bytes,16,opt,name=hostname"`
Subdomain string `json:"subdomain,omitempty" protobuf:"bytes,17,opt,name=subdomain"`
Affinity *Affinity `json:"affinity,omitempty" protobuf:"bytes,18,opt,name=affinity"`
SchedulerName string `json:"schedulerName,omitempty" protobuf:"bytes,19,opt,name=schedulerName"`
Tolerations []Toleration `json:"tolerations,omitempty" protobuf:"bytes,22,opt,name=tolerations"`
HostAliases []HostAlias `json:"hostAliases,omitempty" patchStrategy:"merge" patchMergeKey:"ip" protobuf:"bytes,23,rep,name=hostAliases"`
PriorityClassName string `json:"priorityClassName,omitempty" protobuf:"bytes,24,opt,name=priorityClassName"`
Priority *int32 `json:"priority,omitempty" protobuf:"bytes,25,opt,name=priority"`
DNSConfig *PodDNSConfig `json:"dnsConfig,omitempty" protobuf:"bytes,26,opt,name=dnsConfig"`
ReadinessGates []PodReadinessGate `json:"readinessGates,omitempty" protobuf:"bytes,28,opt,name=readinessGates"`
RuntimeClassName *string `json:"runtimeClassName,omitempty" protobuf:"bytes,29,opt,name=runtimeClassName"`
EnableServiceLinks *bool `json:"enableServiceLinks,omitempty" protobuf:"varint,30,opt,name=enableServiceLinks"`
}