forked from kubernetes/kubernetes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
api.pb.go
19709 lines (19062 loc) · 488 KB
/
api.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
/*
Copyright 2017 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by protoc-gen-gogo.
// source: api.proto
// DO NOT EDIT!
/*
Package runtime is a generated protocol buffer package.
It is generated from these files:
api.proto
It has these top-level messages:
VersionRequest
VersionResponse
DNSConfig
PortMapping
Mount
NamespaceOption
Int64Value
LinuxSandboxSecurityContext
LinuxPodSandboxConfig
PodSandboxMetadata
PodSandboxConfig
RunPodSandboxRequest
RunPodSandboxResponse
StopPodSandboxRequest
StopPodSandboxResponse
RemovePodSandboxRequest
RemovePodSandboxResponse
PodSandboxStatusRequest
PodSandboxNetworkStatus
Namespace
LinuxPodSandboxStatus
PodSandboxStatus
PodSandboxStatusResponse
PodSandboxStateValue
PodSandboxFilter
ListPodSandboxRequest
PodSandbox
ListPodSandboxResponse
ImageSpec
KeyValue
LinuxContainerResources
SELinuxOption
Capability
LinuxContainerSecurityContext
LinuxContainerConfig
ContainerMetadata
Device
ContainerConfig
CreateContainerRequest
CreateContainerResponse
StartContainerRequest
StartContainerResponse
StopContainerRequest
StopContainerResponse
RemoveContainerRequest
RemoveContainerResponse
ContainerStateValue
ContainerFilter
ListContainersRequest
Container
ListContainersResponse
ContainerStatusRequest
ContainerStatus
ContainerStatusResponse
ExecSyncRequest
ExecSyncResponse
ExecRequest
ExecResponse
AttachRequest
AttachResponse
PortForwardRequest
PortForwardResponse
ImageFilter
ListImagesRequest
Image
ListImagesResponse
ImageStatusRequest
ImageStatusResponse
AuthConfig
PullImageRequest
PullImageResponse
RemoveImageRequest
RemoveImageResponse
NetworkConfig
RuntimeConfig
UpdateRuntimeConfigRequest
UpdateRuntimeConfigResponse
RuntimeCondition
RuntimeStatus
StatusRequest
StatusResponse
*/
package runtime
import proto "github.com/gogo/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "github.com/gogo/protobuf/gogoproto"
import (
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
)
import strings "strings"
import reflect "reflect"
import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
import io "io"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
const _ = proto.GoGoProtoPackageIsVersion1
type Protocol int32
const (
Protocol_TCP Protocol = 0
Protocol_UDP Protocol = 1
)
var Protocol_name = map[int32]string{
0: "TCP",
1: "UDP",
}
var Protocol_value = map[string]int32{
"TCP": 0,
"UDP": 1,
}
func (x Protocol) String() string {
return proto.EnumName(Protocol_name, int32(x))
}
func (Protocol) EnumDescriptor() ([]byte, []int) { return fileDescriptorApi, []int{0} }
type PodSandboxState int32
const (
PodSandboxState_SANDBOX_READY PodSandboxState = 0
PodSandboxState_SANDBOX_NOTREADY PodSandboxState = 1
)
var PodSandboxState_name = map[int32]string{
0: "SANDBOX_READY",
1: "SANDBOX_NOTREADY",
}
var PodSandboxState_value = map[string]int32{
"SANDBOX_READY": 0,
"SANDBOX_NOTREADY": 1,
}
func (x PodSandboxState) String() string {
return proto.EnumName(PodSandboxState_name, int32(x))
}
func (PodSandboxState) EnumDescriptor() ([]byte, []int) { return fileDescriptorApi, []int{1} }
type ContainerState int32
const (
ContainerState_CONTAINER_CREATED ContainerState = 0
ContainerState_CONTAINER_RUNNING ContainerState = 1
ContainerState_CONTAINER_EXITED ContainerState = 2
ContainerState_CONTAINER_UNKNOWN ContainerState = 3
)
var ContainerState_name = map[int32]string{
0: "CONTAINER_CREATED",
1: "CONTAINER_RUNNING",
2: "CONTAINER_EXITED",
3: "CONTAINER_UNKNOWN",
}
var ContainerState_value = map[string]int32{
"CONTAINER_CREATED": 0,
"CONTAINER_RUNNING": 1,
"CONTAINER_EXITED": 2,
"CONTAINER_UNKNOWN": 3,
}
func (x ContainerState) String() string {
return proto.EnumName(ContainerState_name, int32(x))
}
func (ContainerState) EnumDescriptor() ([]byte, []int) { return fileDescriptorApi, []int{2} }
type VersionRequest struct {
// Version of the kubelet runtime API.
Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
}
func (m *VersionRequest) Reset() { *m = VersionRequest{} }
func (*VersionRequest) ProtoMessage() {}
func (*VersionRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{0} }
type VersionResponse struct {
// Version of the kubelet runtime API.
Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
// Name of the container runtime.
RuntimeName string `protobuf:"bytes,2,opt,name=runtime_name,json=runtimeName,proto3" json:"runtime_name,omitempty"`
// Version of the container runtime. The string must be
// semver-compatible.
RuntimeVersion string `protobuf:"bytes,3,opt,name=runtime_version,json=runtimeVersion,proto3" json:"runtime_version,omitempty"`
// API version of the container runtime. The string must be
// semver-compatible.
RuntimeApiVersion string `protobuf:"bytes,4,opt,name=runtime_api_version,json=runtimeApiVersion,proto3" json:"runtime_api_version,omitempty"`
}
func (m *VersionResponse) Reset() { *m = VersionResponse{} }
func (*VersionResponse) ProtoMessage() {}
func (*VersionResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{1} }
// DNSConfig specifies the DNS servers and search domains of a sandbox.
type DNSConfig struct {
// List of DNS servers of the cluster.
Servers []string `protobuf:"bytes,1,rep,name=servers" json:"servers,omitempty"`
// List of DNS search domains of the cluster.
Searches []string `protobuf:"bytes,2,rep,name=searches" json:"searches,omitempty"`
// List of DNS options. See https://linux.die.net/man/5/resolv.conf
// for all available options.
Options []string `protobuf:"bytes,3,rep,name=options" json:"options,omitempty"`
}
func (m *DNSConfig) Reset() { *m = DNSConfig{} }
func (*DNSConfig) ProtoMessage() {}
func (*DNSConfig) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{2} }
// PortMapping specifies the port mapping configurations of a sandbox.
type PortMapping struct {
// Protocol of the port mapping.
Protocol Protocol `protobuf:"varint,1,opt,name=protocol,proto3,enum=runtime.Protocol" json:"protocol,omitempty"`
// Port number within the container. Default: 0 (not specified).
ContainerPort int32 `protobuf:"varint,2,opt,name=container_port,json=containerPort,proto3" json:"container_port,omitempty"`
// Port number on the host. Default: 0 (not specified).
HostPort int32 `protobuf:"varint,3,opt,name=host_port,json=hostPort,proto3" json:"host_port,omitempty"`
// Host IP.
HostIp string `protobuf:"bytes,4,opt,name=host_ip,json=hostIp,proto3" json:"host_ip,omitempty"`
}
func (m *PortMapping) Reset() { *m = PortMapping{} }
func (*PortMapping) ProtoMessage() {}
func (*PortMapping) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{3} }
// Mount specifies a host volume to mount into a container.
type Mount struct {
// Path of the mount within the container.
ContainerPath string `protobuf:"bytes,1,opt,name=container_path,json=containerPath,proto3" json:"container_path,omitempty"`
// Path of the mount on the host.
HostPath string `protobuf:"bytes,2,opt,name=host_path,json=hostPath,proto3" json:"host_path,omitempty"`
// If set, the mount is read-only.
Readonly bool `protobuf:"varint,3,opt,name=readonly,proto3" json:"readonly,omitempty"`
// If set, the mount needs SELinux relabeling.
SelinuxRelabel bool `protobuf:"varint,4,opt,name=selinux_relabel,json=selinuxRelabel,proto3" json:"selinux_relabel,omitempty"`
}
func (m *Mount) Reset() { *m = Mount{} }
func (*Mount) ProtoMessage() {}
func (*Mount) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{4} }
// NamespaceOption provides options for Linux namespaces.
type NamespaceOption struct {
// If set, use the host's network namespace.
HostNetwork bool `protobuf:"varint,1,opt,name=host_network,json=hostNetwork,proto3" json:"host_network,omitempty"`
// If set, use the host's PID namespace.
HostPid bool `protobuf:"varint,2,opt,name=host_pid,json=hostPid,proto3" json:"host_pid,omitempty"`
// If set, use the host's IPC namespace.
HostIpc bool `protobuf:"varint,3,opt,name=host_ipc,json=hostIpc,proto3" json:"host_ipc,omitempty"`
}
func (m *NamespaceOption) Reset() { *m = NamespaceOption{} }
func (*NamespaceOption) ProtoMessage() {}
func (*NamespaceOption) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{5} }
// Int64Value is the wrapper of int64.
type Int64Value struct {
// The value.
Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
}
func (m *Int64Value) Reset() { *m = Int64Value{} }
func (*Int64Value) ProtoMessage() {}
func (*Int64Value) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{6} }
// LinuxSandboxSecurityContext holds linux security configuration that will be
// applied to a sandbox. Note that:
// 1) It does not apply to containers in the pods.
// 2) It may not be applicable to a PodSandbox which does not contain any running
// process.
type LinuxSandboxSecurityContext struct {
// Configurations for the sandbox's namespaces.
// This will be used only if the PodSandbox uses namespace for isolation.
NamespaceOptions *NamespaceOption `protobuf:"bytes,1,opt,name=namespace_options,json=namespaceOptions" json:"namespace_options,omitempty"`
// Optional SELinux context to be applied.
SelinuxOptions *SELinuxOption `protobuf:"bytes,2,opt,name=selinux_options,json=selinuxOptions" json:"selinux_options,omitempty"`
// UID to run sandbox processes as, when applicable.
RunAsUser *Int64Value `protobuf:"bytes,3,opt,name=run_as_user,json=runAsUser" json:"run_as_user,omitempty"`
// If set, the root filesystem of the sandbox is read-only.
ReadonlyRootfs bool `protobuf:"varint,4,opt,name=readonly_rootfs,json=readonlyRootfs,proto3" json:"readonly_rootfs,omitempty"`
// List of groups applied to the first process run in the sandbox, in
// addition to the sandbox's primary GID.
SupplementalGroups []int64 `protobuf:"varint,5,rep,name=supplemental_groups,json=supplementalGroups" json:"supplemental_groups,omitempty"`
// Indicates whether the sandbox will be asked to run a privileged
// container. If a privileged container is to be executed within it, this
// MUST be true.
// This allows a sandbox to take additional security precautions if no
// privileged containers are expected to be run.
Privileged bool `protobuf:"varint,6,opt,name=privileged,proto3" json:"privileged,omitempty"`
}
func (m *LinuxSandboxSecurityContext) Reset() { *m = LinuxSandboxSecurityContext{} }
func (*LinuxSandboxSecurityContext) ProtoMessage() {}
func (*LinuxSandboxSecurityContext) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{7} }
func (m *LinuxSandboxSecurityContext) GetNamespaceOptions() *NamespaceOption {
if m != nil {
return m.NamespaceOptions
}
return nil
}
func (m *LinuxSandboxSecurityContext) GetSelinuxOptions() *SELinuxOption {
if m != nil {
return m.SelinuxOptions
}
return nil
}
func (m *LinuxSandboxSecurityContext) GetRunAsUser() *Int64Value {
if m != nil {
return m.RunAsUser
}
return nil
}
// LinuxPodSandboxConfig holds platform-specific configurations for Linux
// host platforms and Linux-based containers.
type LinuxPodSandboxConfig struct {
// Parent cgroup of the PodSandbox.
// The cgroupfs style syntax will be used, but the container runtime can
// convert it to systemd semantics if needed.
CgroupParent string `protobuf:"bytes,1,opt,name=cgroup_parent,json=cgroupParent,proto3" json:"cgroup_parent,omitempty"`
// LinuxSandboxSecurityContext holds sandbox security attributes.
SecurityContext *LinuxSandboxSecurityContext `protobuf:"bytes,2,opt,name=security_context,json=securityContext" json:"security_context,omitempty"`
}
func (m *LinuxPodSandboxConfig) Reset() { *m = LinuxPodSandboxConfig{} }
func (*LinuxPodSandboxConfig) ProtoMessage() {}
func (*LinuxPodSandboxConfig) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{8} }
func (m *LinuxPodSandboxConfig) GetSecurityContext() *LinuxSandboxSecurityContext {
if m != nil {
return m.SecurityContext
}
return nil
}
// PodSandboxMetadata holds all necessary information for building the sandbox name.
// The container runtime is encouraged to expose the metadata associated with the
// PodSandbox in its user interface for better user experience. For example,
// the runtime can construct a unique PodSandboxName based on the metadata.
type PodSandboxMetadata struct {
// Pod name of the sandbox. Same as the pod name in the PodSpec.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Pod UID of the sandbox. Same as the pod UID in the PodSpec.
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"`
// Pod namespace of the sandbox. Same as the pod namespace in the PodSpec.
Namespace string `protobuf:"bytes,3,opt,name=namespace,proto3" json:"namespace,omitempty"`
// Attempt number of creating the sandbox. Default: 0.
Attempt uint32 `protobuf:"varint,4,opt,name=attempt,proto3" json:"attempt,omitempty"`
}
func (m *PodSandboxMetadata) Reset() { *m = PodSandboxMetadata{} }
func (*PodSandboxMetadata) ProtoMessage() {}
func (*PodSandboxMetadata) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{9} }
// PodSandboxConfig holds all the required and optional fields for creating a
// sandbox.
type PodSandboxConfig struct {
// Metadata of the sandbox. This information will uniquely identify the
// sandbox, and the runtime should leverage this to ensure correct
// operation. The runtime may also use this information to improve UX, such
// as by constructing a readable name.
Metadata *PodSandboxMetadata `protobuf:"bytes,1,opt,name=metadata" json:"metadata,omitempty"`
// Hostname of the sandbox.
Hostname string `protobuf:"bytes,2,opt,name=hostname,proto3" json:"hostname,omitempty"`
// Path to the directory on the host in which container log files are
// stored.
// By default the log of a container going into the LogDirectory will be
// hooked up to STDOUT and STDERR. However, the LogDirectory may contain
// binary log files with structured logging data from the individual
// containers. For example, the files might be newline separated JSON
// structured logs, systemd-journald journal files, gRPC trace files, etc.
// E.g.,
// PodSandboxConfig.LogDirectory = `/var/log/pods/<podUID>/`
// ContainerConfig.LogPath = `containerName_Instance#.log`
//
// WARNING: Log management and how kubelet should interface with the
// container logs are under active discussion in
// https://issues.k8s.io/24677. There *may* be future change of direction
// for logging as the discussion carries on.
LogDirectory string `protobuf:"bytes,3,opt,name=log_directory,json=logDirectory,proto3" json:"log_directory,omitempty"`
// DNS config for the sandbox.
DnsConfig *DNSConfig `protobuf:"bytes,4,opt,name=dns_config,json=dnsConfig" json:"dns_config,omitempty"`
// Port mappings for the sandbox.
PortMappings []*PortMapping `protobuf:"bytes,5,rep,name=port_mappings,json=portMappings" json:"port_mappings,omitempty"`
// Key-value pairs that may be used to scope and select individual resources.
Labels map[string]string `protobuf:"bytes,6,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// Unstructured key-value map that may be set by the kubelet to store and
// retrieve arbitrary metadata. This will include any annotations set on a
// pod through the Kubernetes API.
//
// Annotations MUST NOT be altered by the runtime; the annotations stored
// here MUST be returned in the PodSandboxStatus associated with the pod
// this PodSandboxConfig creates.
//
// In general, in order to preserve a well-defined interface between the
// kubelet and the container runtime, annotations SHOULD NOT influence
// runtime behaviour. For legacy reasons, there are some annotations which
// currently explicitly break this rule, listed below; in future versions
// of the interface these will be promoted to typed features.
//
// Annotations can also be useful for runtime authors to experiment with
// new features that are opaque to the Kubernetes APIs (both user-facing
// and the CRI). Whenever possible, however, runtime authors SHOULD
// consider proposing new typed fields for any new features instead.
//
// 1. AppArmor
//
// key: container.apparmor.security.beta.kubernetes.io/<container_name>
// description: apparmor profile for a container in this pod.
// value:
// * runtime/default: equivalent to not specifying a profile.
// * localhost/<profile_name>: profile loaded on the node
// (localhost) by name. The possible profile names are detailed at
// http://wiki.apparmor.net/index.php/AppArmor_Core_Policy_Reference
//
// 2. Seccomp
//
// key: security.alpha.kubernetes.io/seccomp/pod
// description: the seccomp profile for the containers of an entire pod.
// value: see below.
//
// key: security.alpha.kubernetes.io/seccomp/container/<container name>
// description: the seccomp profile for the container (overrides pod).
// value: see below
//
// The value of seccomp is runtime agnostic:
// * runtime/default: the default profile for the container runtime
// * unconfined: unconfined profile, ie, no seccomp sandboxing
// * localhost/<profile-name>: the profile installed to the node's
// local seccomp profile root. Note that profile root is set in
// kubelet, and it is not passed in CRI yet, see https://issues.k8s.io/36997.
//
// 3. Sysctls
//
// key: security.alpha.kubernetes.io/sysctls
// description: list of safe sysctls which are set for the sandbox.
// value: comma separated list of sysctl_name=value key-value pairs.
//
// key: security.alpha.kubernetes.io/unsafe-sysctls
// description: list of unsafe sysctls which are set for the sandbox.
// value: comma separated list of sysctl_name=value key-value pairs.
//
Annotations map[string]string `protobuf:"bytes,7,rep,name=annotations" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// Optional configurations specific to Linux hosts.
Linux *LinuxPodSandboxConfig `protobuf:"bytes,8,opt,name=linux" json:"linux,omitempty"`
}
func (m *PodSandboxConfig) Reset() { *m = PodSandboxConfig{} }
func (*PodSandboxConfig) ProtoMessage() {}
func (*PodSandboxConfig) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{10} }
func (m *PodSandboxConfig) GetMetadata() *PodSandboxMetadata {
if m != nil {
return m.Metadata
}
return nil
}
func (m *PodSandboxConfig) GetDnsConfig() *DNSConfig {
if m != nil {
return m.DnsConfig
}
return nil
}
func (m *PodSandboxConfig) GetPortMappings() []*PortMapping {
if m != nil {
return m.PortMappings
}
return nil
}
func (m *PodSandboxConfig) GetLabels() map[string]string {
if m != nil {
return m.Labels
}
return nil
}
func (m *PodSandboxConfig) GetAnnotations() map[string]string {
if m != nil {
return m.Annotations
}
return nil
}
func (m *PodSandboxConfig) GetLinux() *LinuxPodSandboxConfig {
if m != nil {
return m.Linux
}
return nil
}
type RunPodSandboxRequest struct {
// Configuration for creating a PodSandbox.
Config *PodSandboxConfig `protobuf:"bytes,1,opt,name=config" json:"config,omitempty"`
}
func (m *RunPodSandboxRequest) Reset() { *m = RunPodSandboxRequest{} }
func (*RunPodSandboxRequest) ProtoMessage() {}
func (*RunPodSandboxRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{11} }
func (m *RunPodSandboxRequest) GetConfig() *PodSandboxConfig {
if m != nil {
return m.Config
}
return nil
}
type RunPodSandboxResponse struct {
// ID of the PodSandbox to run.
PodSandboxId string `protobuf:"bytes,1,opt,name=pod_sandbox_id,json=podSandboxId,proto3" json:"pod_sandbox_id,omitempty"`
}
func (m *RunPodSandboxResponse) Reset() { *m = RunPodSandboxResponse{} }
func (*RunPodSandboxResponse) ProtoMessage() {}
func (*RunPodSandboxResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{12} }
type StopPodSandboxRequest struct {
// ID of the PodSandbox to stop.
PodSandboxId string `protobuf:"bytes,1,opt,name=pod_sandbox_id,json=podSandboxId,proto3" json:"pod_sandbox_id,omitempty"`
}
func (m *StopPodSandboxRequest) Reset() { *m = StopPodSandboxRequest{} }
func (*StopPodSandboxRequest) ProtoMessage() {}
func (*StopPodSandboxRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{13} }
type StopPodSandboxResponse struct {
}
func (m *StopPodSandboxResponse) Reset() { *m = StopPodSandboxResponse{} }
func (*StopPodSandboxResponse) ProtoMessage() {}
func (*StopPodSandboxResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{14} }
type RemovePodSandboxRequest struct {
// ID of the PodSandbox to remove.
PodSandboxId string `protobuf:"bytes,1,opt,name=pod_sandbox_id,json=podSandboxId,proto3" json:"pod_sandbox_id,omitempty"`
}
func (m *RemovePodSandboxRequest) Reset() { *m = RemovePodSandboxRequest{} }
func (*RemovePodSandboxRequest) ProtoMessage() {}
func (*RemovePodSandboxRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{15} }
type RemovePodSandboxResponse struct {
}
func (m *RemovePodSandboxResponse) Reset() { *m = RemovePodSandboxResponse{} }
func (*RemovePodSandboxResponse) ProtoMessage() {}
func (*RemovePodSandboxResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{16} }
type PodSandboxStatusRequest struct {
// ID of the PodSandbox for which to retrieve status.
PodSandboxId string `protobuf:"bytes,1,opt,name=pod_sandbox_id,json=podSandboxId,proto3" json:"pod_sandbox_id,omitempty"`
}
func (m *PodSandboxStatusRequest) Reset() { *m = PodSandboxStatusRequest{} }
func (*PodSandboxStatusRequest) ProtoMessage() {}
func (*PodSandboxStatusRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{17} }
// PodSandboxNetworkStatus is the status of the network for a PodSandbox.
type PodSandboxNetworkStatus struct {
// IP address of the PodSandbox.
Ip string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"`
}
func (m *PodSandboxNetworkStatus) Reset() { *m = PodSandboxNetworkStatus{} }
func (*PodSandboxNetworkStatus) ProtoMessage() {}
func (*PodSandboxNetworkStatus) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{18} }
// Namespace contains paths to the namespaces.
type Namespace struct {
// Path to the network namespace.
Network string `protobuf:"bytes,1,opt,name=network,proto3" json:"network,omitempty"`
// Namespace options for Linux namespaces.
Options *NamespaceOption `protobuf:"bytes,2,opt,name=options" json:"options,omitempty"`
}
func (m *Namespace) Reset() { *m = Namespace{} }
func (*Namespace) ProtoMessage() {}
func (*Namespace) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{19} }
func (m *Namespace) GetOptions() *NamespaceOption {
if m != nil {
return m.Options
}
return nil
}
// LinuxSandboxStatus contains status specific to Linux sandboxes.
type LinuxPodSandboxStatus struct {
// Paths to the sandbox's namespaces.
Namespaces *Namespace `protobuf:"bytes,1,opt,name=namespaces" json:"namespaces,omitempty"`
}
func (m *LinuxPodSandboxStatus) Reset() { *m = LinuxPodSandboxStatus{} }
func (*LinuxPodSandboxStatus) ProtoMessage() {}
func (*LinuxPodSandboxStatus) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{20} }
func (m *LinuxPodSandboxStatus) GetNamespaces() *Namespace {
if m != nil {
return m.Namespaces
}
return nil
}
// PodSandboxStatus contains the status of the PodSandbox.
type PodSandboxStatus struct {
// ID of the sandbox.
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// Metadata of the sandbox.
Metadata *PodSandboxMetadata `protobuf:"bytes,2,opt,name=metadata" json:"metadata,omitempty"`
// State of the sandbox.
State PodSandboxState `protobuf:"varint,3,opt,name=state,proto3,enum=runtime.PodSandboxState" json:"state,omitempty"`
// Creation timestamp of the sandbox in nanoseconds. Must be > 0.
CreatedAt int64 `protobuf:"varint,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
// Network contains network status if network is handled by the runtime.
Network *PodSandboxNetworkStatus `protobuf:"bytes,5,opt,name=network" json:"network,omitempty"`
// Linux-specific status to a pod sandbox.
Linux *LinuxPodSandboxStatus `protobuf:"bytes,6,opt,name=linux" json:"linux,omitempty"`
// Labels are key-value pairs that may be used to scope and select individual resources.
Labels map[string]string `protobuf:"bytes,7,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// Unstructured key-value map holding arbitrary metadata.
// Annotations MUST NOT be altered by the runtime; the value of this field
// MUST be identical to that of the corresponding PodSandboxConfig used to
// instantiate the pod sandbox this status represents.
Annotations map[string]string `protobuf:"bytes,8,rep,name=annotations" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (m *PodSandboxStatus) Reset() { *m = PodSandboxStatus{} }
func (*PodSandboxStatus) ProtoMessage() {}
func (*PodSandboxStatus) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{21} }
func (m *PodSandboxStatus) GetMetadata() *PodSandboxMetadata {
if m != nil {
return m.Metadata
}
return nil
}
func (m *PodSandboxStatus) GetNetwork() *PodSandboxNetworkStatus {
if m != nil {
return m.Network
}
return nil
}
func (m *PodSandboxStatus) GetLinux() *LinuxPodSandboxStatus {
if m != nil {
return m.Linux
}
return nil
}
func (m *PodSandboxStatus) GetLabels() map[string]string {
if m != nil {
return m.Labels
}
return nil
}
func (m *PodSandboxStatus) GetAnnotations() map[string]string {
if m != nil {
return m.Annotations
}
return nil
}
type PodSandboxStatusResponse struct {
// Status of the PodSandbox.
Status *PodSandboxStatus `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"`
}
func (m *PodSandboxStatusResponse) Reset() { *m = PodSandboxStatusResponse{} }
func (*PodSandboxStatusResponse) ProtoMessage() {}
func (*PodSandboxStatusResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{22} }
func (m *PodSandboxStatusResponse) GetStatus() *PodSandboxStatus {
if m != nil {
return m.Status
}
return nil
}
// PodSandboxStateValue is the wrapper of PodSandboxState.
type PodSandboxStateValue struct {
// State of the sandbox.
State PodSandboxState `protobuf:"varint,1,opt,name=state,proto3,enum=runtime.PodSandboxState" json:"state,omitempty"`
}
func (m *PodSandboxStateValue) Reset() { *m = PodSandboxStateValue{} }
func (*PodSandboxStateValue) ProtoMessage() {}
func (*PodSandboxStateValue) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{23} }
// PodSandboxFilter is used to filter a list of PodSandboxes.
// All those fields are combined with 'AND'
type PodSandboxFilter struct {
// ID of the sandbox.
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// State of the sandbox.
State *PodSandboxStateValue `protobuf:"bytes,2,opt,name=state" json:"state,omitempty"`
// LabelSelector to select matches.
// Only api.MatchLabels is supported for now and the requirements
// are ANDed. MatchExpressions is not supported yet.
LabelSelector map[string]string `protobuf:"bytes,3,rep,name=label_selector,json=labelSelector" json:"label_selector,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (m *PodSandboxFilter) Reset() { *m = PodSandboxFilter{} }
func (*PodSandboxFilter) ProtoMessage() {}
func (*PodSandboxFilter) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{24} }
func (m *PodSandboxFilter) GetState() *PodSandboxStateValue {
if m != nil {
return m.State
}
return nil
}
func (m *PodSandboxFilter) GetLabelSelector() map[string]string {
if m != nil {
return m.LabelSelector
}
return nil
}
type ListPodSandboxRequest struct {
// PodSandboxFilter to filter a list of PodSandboxes.
Filter *PodSandboxFilter `protobuf:"bytes,1,opt,name=filter" json:"filter,omitempty"`
}
func (m *ListPodSandboxRequest) Reset() { *m = ListPodSandboxRequest{} }
func (*ListPodSandboxRequest) ProtoMessage() {}
func (*ListPodSandboxRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{25} }
func (m *ListPodSandboxRequest) GetFilter() *PodSandboxFilter {
if m != nil {
return m.Filter
}
return nil
}
// PodSandbox contains minimal information about a sandbox.
type PodSandbox struct {
// ID of the PodSandbox.
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// Metadata of the PodSandbox.
Metadata *PodSandboxMetadata `protobuf:"bytes,2,opt,name=metadata" json:"metadata,omitempty"`
// State of the PodSandbox.
State PodSandboxState `protobuf:"varint,3,opt,name=state,proto3,enum=runtime.PodSandboxState" json:"state,omitempty"`
// Creation timestamps of the PodSandbox in nanoseconds. Must be > 0.
CreatedAt int64 `protobuf:"varint,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
// Labels of the PodSandbox.
Labels map[string]string `protobuf:"bytes,5,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// Unstructured key-value map holding arbitrary metadata.
// Annotations MUST NOT be altered by the runtime; the value of this field
// MUST be identical to that of the corresponding PodSandboxConfig used to
// instantiate this PodSandbox.
Annotations map[string]string `protobuf:"bytes,6,rep,name=annotations" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (m *PodSandbox) Reset() { *m = PodSandbox{} }
func (*PodSandbox) ProtoMessage() {}
func (*PodSandbox) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{26} }
func (m *PodSandbox) GetMetadata() *PodSandboxMetadata {
if m != nil {
return m.Metadata
}
return nil
}
func (m *PodSandbox) GetLabels() map[string]string {
if m != nil {
return m.Labels
}
return nil
}
func (m *PodSandbox) GetAnnotations() map[string]string {
if m != nil {
return m.Annotations
}
return nil
}
type ListPodSandboxResponse struct {
// List of PodSandboxes.
Items []*PodSandbox `protobuf:"bytes,1,rep,name=items" json:"items,omitempty"`
}
func (m *ListPodSandboxResponse) Reset() { *m = ListPodSandboxResponse{} }
func (*ListPodSandboxResponse) ProtoMessage() {}
func (*ListPodSandboxResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{27} }
func (m *ListPodSandboxResponse) GetItems() []*PodSandbox {
if m != nil {
return m.Items
}
return nil
}
// ImageSpec is an internal representation of an image. Currently, it wraps the
// value of a Container's Image field (e.g. imageID or imageDigest), but in the
// future it will include more detailed information about the different image types.
type ImageSpec struct {
Image string `protobuf:"bytes,1,opt,name=image,proto3" json:"image,omitempty"`
}
func (m *ImageSpec) Reset() { *m = ImageSpec{} }
func (*ImageSpec) ProtoMessage() {}
func (*ImageSpec) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{28} }
type KeyValue struct {
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (m *KeyValue) Reset() { *m = KeyValue{} }
func (*KeyValue) ProtoMessage() {}
func (*KeyValue) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{29} }
// LinuxContainerResources specifies Linux specific configuration for
// resources.
// TODO: Consider using Resources from opencontainers/runtime-spec/specs-go
// directly.
type LinuxContainerResources struct {
// CPU CFS (Completely Fair Scheduler) period. Default: 0 (not specified).
CpuPeriod int64 `protobuf:"varint,1,opt,name=cpu_period,json=cpuPeriod,proto3" json:"cpu_period,omitempty"`
// CPU CFS (Completely Fair Scheduler) quota. Default: 0 (not specified).
CpuQuota int64 `protobuf:"varint,2,opt,name=cpu_quota,json=cpuQuota,proto3" json:"cpu_quota,omitempty"`
// CPU shares (relative weight vs. other containers). Default: 0 (not specified).
CpuShares int64 `protobuf:"varint,3,opt,name=cpu_shares,json=cpuShares,proto3" json:"cpu_shares,omitempty"`
// Memory limit in bytes. Default: 0 (not specified).
MemoryLimitInBytes int64 `protobuf:"varint,4,opt,name=memory_limit_in_bytes,json=memoryLimitInBytes,proto3" json:"memory_limit_in_bytes,omitempty"`
// OOMScoreAdj adjusts the oom-killer score. Default: 0 (not specified).
OomScoreAdj int64 `protobuf:"varint,5,opt,name=oom_score_adj,json=oomScoreAdj,proto3" json:"oom_score_adj,omitempty"`
}
func (m *LinuxContainerResources) Reset() { *m = LinuxContainerResources{} }
func (*LinuxContainerResources) ProtoMessage() {}
func (*LinuxContainerResources) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{30} }
// SELinuxOption are the labels to be applied to the container.
type SELinuxOption struct {
User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
Role string `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"`
Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
Level string `protobuf:"bytes,4,opt,name=level,proto3" json:"level,omitempty"`
}
func (m *SELinuxOption) Reset() { *m = SELinuxOption{} }
func (*SELinuxOption) ProtoMessage() {}
func (*SELinuxOption) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{31} }
// Capability contains the container capabilities to add or drop
type Capability struct {
// List of capabilities to add.
AddCapabilities []string `protobuf:"bytes,1,rep,name=add_capabilities,json=addCapabilities" json:"add_capabilities,omitempty"`
// List of capabilities to drop.
DropCapabilities []string `protobuf:"bytes,2,rep,name=drop_capabilities,json=dropCapabilities" json:"drop_capabilities,omitempty"`
}
func (m *Capability) Reset() { *m = Capability{} }
func (*Capability) ProtoMessage() {}
func (*Capability) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{32} }
// LinuxContainerSecurityContext holds linux security configuration that will be applied to a container.
type LinuxContainerSecurityContext struct {
// Capabilities to add or drop.
Capabilities *Capability `protobuf:"bytes,1,opt,name=capabilities" json:"capabilities,omitempty"`
// If set, run container in privileged mode.
// Privileged mode is incompatible with the following options. If
// privileged is set, the following features MAY have no effect:
// 1. capabilities
// 2. selinux_options
// 4. seccomp
// 5. apparmor
//
// Privileged mode implies the following specific options are applied:
// 1. All capabilities are added.
// 2. Sensitive paths, such as kernel module paths within sysfs, are not masked.
// 3. Any sysfs and procfs mounts are mounted RW.
// 4. Apparmor confinement is not applied.
// 5. Seccomp restrictions are not applied.
// 6. The device cgroup does not restrict access to any devices.
// 7. All devices from the host's /dev are available within the container.
// 8. SELinux restrictions are not applied (e.g. label=disabled).
Privileged bool `protobuf:"varint,2,opt,name=privileged,proto3" json:"privileged,omitempty"`
// Configurations for the container's namespaces.
// Only used if the container uses namespace for isolation.
NamespaceOptions *NamespaceOption `protobuf:"bytes,3,opt,name=namespace_options,json=namespaceOptions" json:"namespace_options,omitempty"`
// SELinux context to be optionally applied.
SelinuxOptions *SELinuxOption `protobuf:"bytes,4,opt,name=selinux_options,json=selinuxOptions" json:"selinux_options,omitempty"`
// UID to run the container process as. Only one of run_as_user and
// run_as_username can be specified at a time.
RunAsUser *Int64Value `protobuf:"bytes,5,opt,name=run_as_user,json=runAsUser" json:"run_as_user,omitempty"`
// User name to run the container process as. If specified, the user MUST
// exist in the container image (i.e. in the /etc/passwd inside the image),
// and be resolved there by the runtime; otherwise, the runtime MUST error.
RunAsUsername string `protobuf:"bytes,6,opt,name=run_as_username,json=runAsUsername,proto3" json:"run_as_username,omitempty"`
// If set, the root filesystem of the container is read-only.
ReadonlyRootfs bool `protobuf:"varint,7,opt,name=readonly_rootfs,json=readonlyRootfs,proto3" json:"readonly_rootfs,omitempty"`
// List of groups applied to the first process run in the container, in
// addition to the container's primary GID.
SupplementalGroups []int64 `protobuf:"varint,8,rep,name=supplemental_groups,json=supplementalGroups" json:"supplemental_groups,omitempty"`
}
func (m *LinuxContainerSecurityContext) Reset() { *m = LinuxContainerSecurityContext{} }
func (*LinuxContainerSecurityContext) ProtoMessage() {}
func (*LinuxContainerSecurityContext) Descriptor() ([]byte, []int) {
return fileDescriptorApi, []int{33}
}
func (m *LinuxContainerSecurityContext) GetCapabilities() *Capability {
if m != nil {
return m.Capabilities
}
return nil
}
func (m *LinuxContainerSecurityContext) GetNamespaceOptions() *NamespaceOption {
if m != nil {
return m.NamespaceOptions
}
return nil
}
func (m *LinuxContainerSecurityContext) GetSelinuxOptions() *SELinuxOption {
if m != nil {
return m.SelinuxOptions
}
return nil
}
func (m *LinuxContainerSecurityContext) GetRunAsUser() *Int64Value {
if m != nil {
return m.RunAsUser
}
return nil
}
// LinuxContainerConfig contains platform-specific configuration for
// Linux-based containers.
type LinuxContainerConfig struct {
// Resources specification for the container.
Resources *LinuxContainerResources `protobuf:"bytes,1,opt,name=resources" json:"resources,omitempty"`
// LinuxContainerSecurityContext configuration for the container.
SecurityContext *LinuxContainerSecurityContext `protobuf:"bytes,2,opt,name=security_context,json=securityContext" json:"security_context,omitempty"`
}
func (m *LinuxContainerConfig) Reset() { *m = LinuxContainerConfig{} }
func (*LinuxContainerConfig) ProtoMessage() {}
func (*LinuxContainerConfig) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{34} }
func (m *LinuxContainerConfig) GetResources() *LinuxContainerResources {
if m != nil {
return m.Resources
}
return nil
}