blob: c1e99229ece199602e3f713e107b12acf5e7a7b5 [file] [log] [blame]
Matthias Andreas Benkard832a54e2019-01-29 09:27:38 +01001/*
2Copyright The Kubernetes Authors.
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15*/
16
17
18// This file was autogenerated by go-to-protobuf. Do not edit it manually!
19
20syntax = 'proto2';
21
22package k8s.io.api.core.v1;
23
24import "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.proto";
25import "k8s.io/apimachinery/pkg/api/resource/generated.proto";
26import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
27import "k8s.io/apimachinery/pkg/runtime/generated.proto";
28import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
29import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
30
31// Package-wide variables from generator "generated".
32option go_package = "v1";
33
34// Represents a Persistent Disk resource in AWS.
35//
36// An AWS EBS disk must exist before mounting to a container. The disk
37// must also be in the same AWS zone as the kubelet. An AWS EBS disk
38// can only be mounted as read/write once. AWS EBS volumes support
39// ownership management and SELinux relabeling.
40message AWSElasticBlockStoreVolumeSource {
41 // Unique ID of the persistent disk resource in AWS (Amazon EBS volume).
42 // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
43 optional string volumeID = 1;
44
45 // Filesystem type of the volume that you want to mount.
46 // Tip: Ensure that the filesystem type is supported by the host operating system.
47 // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
48 // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
49 // TODO: how do we prevent errors in the filesystem from compromising the machine
50 // +optional
51 optional string fsType = 2;
52
53 // The partition in the volume that you want to mount.
54 // If omitted, the default is to mount by volume name.
55 // Examples: For volume /dev/sda1, you specify the partition as "1".
56 // Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty).
57 // +optional
58 optional int32 partition = 3;
59
60 // Specify "true" to force and set the ReadOnly property in VolumeMounts to "true".
61 // If omitted, the default is "false".
62 // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
63 // +optional
64 optional bool readOnly = 4;
65}
66
67// Affinity is a group of affinity scheduling rules.
68message Affinity {
69 // Describes node affinity scheduling rules for the pod.
70 // +optional
71 optional NodeAffinity nodeAffinity = 1;
72
73 // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).
74 // +optional
75 optional PodAffinity podAffinity = 2;
76
77 // Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).
78 // +optional
79 optional PodAntiAffinity podAntiAffinity = 3;
80}
81
82// AttachedVolume describes a volume attached to a node
83message AttachedVolume {
84 // Name of the attached volume
85 optional string name = 1;
86
87 // DevicePath represents the device path where the volume should be available
88 optional string devicePath = 2;
89}
90
91// AvoidPods describes pods that should avoid this node. This is the value for a
92// Node annotation with key scheduler.alpha.kubernetes.io/preferAvoidPods and
93// will eventually become a field of NodeStatus.
94message AvoidPods {
95 // Bounded-sized list of signatures of pods that should avoid this node, sorted
96 // in timestamp order from oldest to newest. Size of the slice is unspecified.
97 // +optional
98 repeated PreferAvoidPodsEntry preferAvoidPods = 1;
99}
100
101// AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
102message AzureDiskVolumeSource {
103 // The Name of the data disk in the blob storage
104 optional string diskName = 1;
105
106 // The URI the data disk in the blob storage
107 optional string diskURI = 2;
108
109 // Host Caching mode: None, Read Only, Read Write.
110 // +optional
111 optional string cachingMode = 3;
112
113 // Filesystem type to mount.
114 // Must be a filesystem type supported by the host operating system.
115 // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
116 // +optional
117 optional string fsType = 4;
118
119 // Defaults to false (read/write). ReadOnly here will force
120 // the ReadOnly setting in VolumeMounts.
121 // +optional
122 optional bool readOnly = 5;
123
124 // Expected values Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared
125 optional string kind = 6;
126}
127
128// AzureFile represents an Azure File Service mount on the host and bind mount to the pod.
129message AzureFilePersistentVolumeSource {
130 // the name of secret that contains Azure Storage Account Name and Key
131 optional string secretName = 1;
132
133 // Share Name
134 optional string shareName = 2;
135
136 // Defaults to false (read/write). ReadOnly here will force
137 // the ReadOnly setting in VolumeMounts.
138 // +optional
139 optional bool readOnly = 3;
140
141 // the namespace of the secret that contains Azure Storage Account Name and Key
142 // default is the same as the Pod
143 // +optional
144 optional string secretNamespace = 4;
145}
146
147// AzureFile represents an Azure File Service mount on the host and bind mount to the pod.
148message AzureFileVolumeSource {
149 // the name of secret that contains Azure Storage Account Name and Key
150 optional string secretName = 1;
151
152 // Share Name
153 optional string shareName = 2;
154
155 // Defaults to false (read/write). ReadOnly here will force
156 // the ReadOnly setting in VolumeMounts.
157 // +optional
158 optional bool readOnly = 3;
159}
160
161// Binding ties one object to another; for example, a pod is bound to a node by a scheduler.
162// Deprecated in 1.7, please use the bindings subresource of pods instead.
163message Binding {
164 // Standard object's metadata.
165 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
166 // +optional
167 optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
168
169 // The target object that you want to bind to the standard object.
170 optional ObjectReference target = 2;
171}
172
173// Represents storage that is managed by an external CSI volume driver (Beta feature)
174message CSIPersistentVolumeSource {
175 // Driver is the name of the driver to use for this volume.
176 // Required.
177 optional string driver = 1;
178
179 // VolumeHandle is the unique volume name returned by the CSI volume
180 // plugin’s CreateVolume to refer to the volume on all subsequent calls.
181 // Required.
182 optional string volumeHandle = 2;
183
184 // Optional: The value to pass to ControllerPublishVolumeRequest.
185 // Defaults to false (read/write).
186 // +optional
187 optional bool readOnly = 3;
188
189 // Filesystem type to mount.
190 // Must be a filesystem type supported by the host operating system.
191 // Ex. "ext4", "xfs", "ntfs".
192 // +optional
193 optional string fsType = 4;
194
195 // Attributes of the volume to publish.
196 // +optional
197 map<string, string> volumeAttributes = 5;
198
199 // ControllerPublishSecretRef is a reference to the secret object containing
200 // sensitive information to pass to the CSI driver to complete the CSI
201 // ControllerPublishVolume and ControllerUnpublishVolume calls.
202 // This field is optional, and may be empty if no secret is required. If the
203 // secret object contains more than one secret, all secrets are passed.
204 // +optional
205 optional SecretReference controllerPublishSecretRef = 6;
206
207 // NodeStageSecretRef is a reference to the secret object containing sensitive
208 // information to pass to the CSI driver to complete the CSI NodeStageVolume
209 // and NodeStageVolume and NodeUnstageVolume calls.
210 // This field is optional, and may be empty if no secret is required. If the
211 // secret object contains more than one secret, all secrets are passed.
212 // +optional
213 optional SecretReference nodeStageSecretRef = 7;
214
215 // NodePublishSecretRef is a reference to the secret object containing
216 // sensitive information to pass to the CSI driver to complete the CSI
217 // NodePublishVolume and NodeUnpublishVolume calls.
218 // This field is optional, and may be empty if no secret is required. If the
219 // secret object contains more than one secret, all secrets are passed.
220 // +optional
221 optional SecretReference nodePublishSecretRef = 8;
222}
223
224// Adds and removes POSIX capabilities from running containers.
225message Capabilities {
226 // Added capabilities
227 // +optional
228 repeated string add = 1;
229
230 // Removed capabilities
231 // +optional
232 repeated string drop = 2;
233}
234
235// Represents a Ceph Filesystem mount that lasts the lifetime of a pod
236// Cephfs volumes do not support ownership management or SELinux relabeling.
237message CephFSPersistentVolumeSource {
238 // Required: Monitors is a collection of Ceph monitors
239 // More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
240 repeated string monitors = 1;
241
242 // Optional: Used as the mounted root, rather than the full Ceph tree, default is /
243 // +optional
244 optional string path = 2;
245
246 // Optional: User is the rados user name, default is admin
247 // More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
248 // +optional
249 optional string user = 3;
250
251 // Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret
252 // More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
253 // +optional
254 optional string secretFile = 4;
255
256 // Optional: SecretRef is reference to the authentication secret for User, default is empty.
257 // More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
258 // +optional
259 optional SecretReference secretRef = 5;
260
261 // Optional: Defaults to false (read/write). ReadOnly here will force
262 // the ReadOnly setting in VolumeMounts.
263 // More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
264 // +optional
265 optional bool readOnly = 6;
266}
267
268// Represents a Ceph Filesystem mount that lasts the lifetime of a pod
269// Cephfs volumes do not support ownership management or SELinux relabeling.
270message CephFSVolumeSource {
271 // Required: Monitors is a collection of Ceph monitors
272 // More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
273 repeated string monitors = 1;
274
275 // Optional: Used as the mounted root, rather than the full Ceph tree, default is /
276 // +optional
277 optional string path = 2;
278
279 // Optional: User is the rados user name, default is admin
280 // More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
281 // +optional
282 optional string user = 3;
283
284 // Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret
285 // More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
286 // +optional
287 optional string secretFile = 4;
288
289 // Optional: SecretRef is reference to the authentication secret for User, default is empty.
290 // More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
291 // +optional
292 optional LocalObjectReference secretRef = 5;
293
294 // Optional: Defaults to false (read/write). ReadOnly here will force
295 // the ReadOnly setting in VolumeMounts.
296 // More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
297 // +optional
298 optional bool readOnly = 6;
299}
300
301// Represents a cinder volume resource in Openstack.
302// A Cinder volume must exist before mounting to a container.
303// The volume must also be in the same region as the kubelet.
304// Cinder volumes support ownership management and SELinux relabeling.
305message CinderPersistentVolumeSource {
306 // volume id used to identify the volume in cinder
307 // More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
308 optional string volumeID = 1;
309
310 // Filesystem type to mount.
311 // Must be a filesystem type supported by the host operating system.
312 // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
313 // More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
314 // +optional
315 optional string fsType = 2;
316
317 // Optional: Defaults to false (read/write). ReadOnly here will force
318 // the ReadOnly setting in VolumeMounts.
319 // More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
320 // +optional
321 optional bool readOnly = 3;
322
323 // Optional: points to a secret object containing parameters used to connect
324 // to OpenStack.
325 // +optional
326 optional SecretReference secretRef = 4;
327}
328
329// Represents a cinder volume resource in Openstack.
330// A Cinder volume must exist before mounting to a container.
331// The volume must also be in the same region as the kubelet.
332// Cinder volumes support ownership management and SELinux relabeling.
333message CinderVolumeSource {
334 // volume id used to identify the volume in cinder
335 // More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
336 optional string volumeID = 1;
337
338 // Filesystem type to mount.
339 // Must be a filesystem type supported by the host operating system.
340 // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
341 // More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
342 // +optional
343 optional string fsType = 2;
344
345 // Optional: Defaults to false (read/write). ReadOnly here will force
346 // the ReadOnly setting in VolumeMounts.
347 // More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
348 // +optional
349 optional bool readOnly = 3;
350
351 // Optional: points to a secret object containing parameters used to connect
352 // to OpenStack.
353 // +optional
354 optional LocalObjectReference secretRef = 4;
355}
356
357// ClientIPConfig represents the configurations of Client IP based session affinity.
358message ClientIPConfig {
359 // timeoutSeconds specifies the seconds of ClientIP type session sticky time.
360 // The value must be >0 && <=86400(for 1 day) if ServiceAffinity == "ClientIP".
361 // Default value is 10800(for 3 hours).
362 // +optional
363 optional int32 timeoutSeconds = 1;
364}
365
366// Information about the condition of a component.
367message ComponentCondition {
368 // Type of condition for a component.
369 // Valid value: "Healthy"
370 optional string type = 1;
371
372 // Status of the condition for a component.
373 // Valid values for "Healthy": "True", "False", or "Unknown".
374 optional string status = 2;
375
376 // Message about the condition for a component.
377 // For example, information about a health check.
378 // +optional
379 optional string message = 3;
380
381 // Condition error code for a component.
382 // For example, a health check error code.
383 // +optional
384 optional string error = 4;
385}
386
387// ComponentStatus (and ComponentStatusList) holds the cluster validation info.
388message ComponentStatus {
389 // Standard object's metadata.
390 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
391 // +optional
392 optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
393
394 // List of component conditions observed
395 // +optional
396 // +patchMergeKey=type
397 // +patchStrategy=merge
398 repeated ComponentCondition conditions = 2;
399}
400
401// Status of all the conditions for the component as a list of ComponentStatus objects.
402message ComponentStatusList {
403 // Standard list metadata.
404 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
405 // +optional
406 optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
407
408 // List of ComponentStatus objects.
409 repeated ComponentStatus items = 2;
410}
411
412// ConfigMap holds configuration data for pods to consume.
413message ConfigMap {
414 // Standard object's metadata.
415 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
416 // +optional
417 optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
418
419 // Data contains the configuration data.
420 // Each key must consist of alphanumeric characters, '-', '_' or '.'.
421 // Values with non-UTF-8 byte sequences must use the BinaryData field.
422 // The keys stored in Data must not overlap with the keys in
423 // the BinaryData field, this is enforced during validation process.
424 // +optional
425 map<string, string> data = 2;
426
427 // BinaryData contains the binary data.
428 // Each key must consist of alphanumeric characters, '-', '_' or '.'.
429 // BinaryData can contain byte sequences that are not in the UTF-8 range.
430 // The keys stored in BinaryData must not overlap with the ones in
431 // the Data field, this is enforced during validation process.
432 // Using this field will require 1.10+ apiserver and
433 // kubelet.
434 // +optional
435 map<string, bytes> binaryData = 3;
436}
437
438// ConfigMapEnvSource selects a ConfigMap to populate the environment
439// variables with.
440//
441// The contents of the target ConfigMap's Data field will represent the
442// key-value pairs as environment variables.
443message ConfigMapEnvSource {
444 // The ConfigMap to select from.
445 optional LocalObjectReference localObjectReference = 1;
446
447 // Specify whether the ConfigMap must be defined
448 // +optional
449 optional bool optional = 2;
450}
451
452// Selects a key from a ConfigMap.
453message ConfigMapKeySelector {
454 // The ConfigMap to select from.
455 optional LocalObjectReference localObjectReference = 1;
456
457 // The key to select.
458 optional string key = 2;
459
460 // Specify whether the ConfigMap or it's key must be defined
461 // +optional
462 optional bool optional = 3;
463}
464
465// ConfigMapList is a resource containing a list of ConfigMap objects.
466message ConfigMapList {
467 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
468 // +optional
469 optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
470
471 // Items is the list of ConfigMaps.
472 repeated ConfigMap items = 2;
473}
474
475// ConfigMapNodeConfigSource contains the information to reference a ConfigMap as a config source for the Node.
476message ConfigMapNodeConfigSource {
477 // Namespace is the metadata.namespace of the referenced ConfigMap.
478 // This field is required in all cases.
479 optional string namespace = 1;
480
481 // Name is the metadata.name of the referenced ConfigMap.
482 // This field is required in all cases.
483 optional string name = 2;
484
485 // UID is the metadata.UID of the referenced ConfigMap.
486 // This field is forbidden in Node.Spec, and required in Node.Status.
487 // +optional
488 optional string uid = 3;
489
490 // ResourceVersion is the metadata.ResourceVersion of the referenced ConfigMap.
491 // This field is forbidden in Node.Spec, and required in Node.Status.
492 // +optional
493 optional string resourceVersion = 4;
494
495 // KubeletConfigKey declares which key of the referenced ConfigMap corresponds to the KubeletConfiguration structure
496 // This field is required in all cases.
497 optional string kubeletConfigKey = 5;
498}
499
500// Adapts a ConfigMap into a projected volume.
501//
502// The contents of the target ConfigMap's Data field will be presented in a
503// projected volume as files using the keys in the Data field as the file names,
504// unless the items element is populated with specific mappings of keys to paths.
505// Note that this is identical to a configmap volume source without the default
506// mode.
507message ConfigMapProjection {
508 optional LocalObjectReference localObjectReference = 1;
509
510 // If unspecified, each key-value pair in the Data field of the referenced
511 // ConfigMap will be projected into the volume as a file whose name is the
512 // key and content is the value. If specified, the listed keys will be
513 // projected into the specified paths, and unlisted keys will not be
514 // present. If a key is specified which is not present in the ConfigMap,
515 // the volume setup will error unless it is marked optional. Paths must be
516 // relative and may not contain the '..' path or start with '..'.
517 // +optional
518 repeated KeyToPath items = 2;
519
520 // Specify whether the ConfigMap or it's keys must be defined
521 // +optional
522 optional bool optional = 4;
523}
524
525// Adapts a ConfigMap into a volume.
526//
527// The contents of the target ConfigMap's Data field will be presented in a
528// volume as files using the keys in the Data field as the file names, unless
529// the items element is populated with specific mappings of keys to paths.
530// ConfigMap volumes support ownership management and SELinux relabeling.
531message ConfigMapVolumeSource {
532 optional LocalObjectReference localObjectReference = 1;
533
534 // If unspecified, each key-value pair in the Data field of the referenced
535 // ConfigMap will be projected into the volume as a file whose name is the
536 // key and content is the value. If specified, the listed keys will be
537 // projected into the specified paths, and unlisted keys will not be
538 // present. If a key is specified which is not present in the ConfigMap,
539 // the volume setup will error unless it is marked optional. Paths must be
540 // relative and may not contain the '..' path or start with '..'.
541 // +optional
542 repeated KeyToPath items = 2;
543
544 // Optional: mode bits to use on created files by default. Must be a
545 // value between 0 and 0777. Defaults to 0644.
546 // Directories within the path are not affected by this setting.
547 // This might be in conflict with other options that affect the file
548 // mode, like fsGroup, and the result can be other mode bits set.
549 // +optional
550 optional int32 defaultMode = 3;
551
552 // Specify whether the ConfigMap or it's keys must be defined
553 // +optional
554 optional bool optional = 4;
555}
556
557// A single application container that you want to run within a pod.
558message Container {
559 // Name of the container specified as a DNS_LABEL.
560 // Each container in a pod must have a unique name (DNS_LABEL).
561 // Cannot be updated.
562 optional string name = 1;
563
564 // Docker image name.
565 // More info: https://kubernetes.io/docs/concepts/containers/images
566 // This field is optional to allow higher level config management to default or override
567 // container images in workload controllers like Deployments and StatefulSets.
568 // +optional
569 optional string image = 2;
570
571 // Entrypoint array. Not executed within a shell.
572 // The docker image's ENTRYPOINT is used if this is not provided.
573 // Variable references $(VAR_NAME) are expanded using the container's environment. If a variable
574 // cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax
575 // can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded,
576 // regardless of whether the variable exists or not.
577 // Cannot be updated.
578 // More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
579 // +optional
580 repeated string command = 3;
581
582 // Arguments to the entrypoint.
583 // The docker image's CMD is used if this is not provided.
584 // Variable references $(VAR_NAME) are expanded using the container's environment. If a variable
585 // cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax
586 // can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded,
587 // regardless of whether the variable exists or not.
588 // Cannot be updated.
589 // More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
590 // +optional
591 repeated string args = 4;
592
593 // Container's working directory.
594 // If not specified, the container runtime's default will be used, which
595 // might be configured in the container image.
596 // Cannot be updated.
597 // +optional
598 optional string workingDir = 5;
599
600 // List of ports to expose from the container. Exposing a port here gives
601 // the system additional information about the network connections a
602 // container uses, but is primarily informational. Not specifying a port here
603 // DOES NOT prevent that port from being exposed. Any port which is
604 // listening on the default "0.0.0.0" address inside a container will be
605 // accessible from the network.
606 // Cannot be updated.
607 // +optional
608 // +patchMergeKey=containerPort
609 // +patchStrategy=merge
610 repeated ContainerPort ports = 6;
611
612 // List of sources to populate environment variables in the container.
613 // The keys defined within a source must be a C_IDENTIFIER. All invalid keys
614 // will be reported as an event when the container is starting. When a key exists in multiple
615 // sources, the value associated with the last source will take precedence.
616 // Values defined by an Env with a duplicate key will take precedence.
617 // Cannot be updated.
618 // +optional
619 repeated EnvFromSource envFrom = 19;
620
621 // List of environment variables to set in the container.
622 // Cannot be updated.
623 // +optional
624 // +patchMergeKey=name
625 // +patchStrategy=merge
626 repeated EnvVar env = 7;
627
628 // Compute Resources required by this container.
629 // Cannot be updated.
630 // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
631 // +optional
632 optional ResourceRequirements resources = 8;
633
634 // Pod volumes to mount into the container's filesystem.
635 // Cannot be updated.
636 // +optional
637 // +patchMergeKey=mountPath
638 // +patchStrategy=merge
639 repeated VolumeMount volumeMounts = 9;
640
641 // volumeDevices is the list of block devices to be used by the container.
642 // This is an alpha feature and may change in the future.
643 // +patchMergeKey=devicePath
644 // +patchStrategy=merge
645 // +optional
646 repeated VolumeDevice volumeDevices = 21;
647
648 // Periodic probe of container liveness.
649 // Container will be restarted if the probe fails.
650 // Cannot be updated.
651 // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
652 // +optional
653 optional Probe livenessProbe = 10;
654
655 // Periodic probe of container service readiness.
656 // Container will be removed from service endpoints if the probe fails.
657 // Cannot be updated.
658 // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
659 // +optional
660 optional Probe readinessProbe = 11;
661
662 // Actions that the management system should take in response to container lifecycle events.
663 // Cannot be updated.
664 // +optional
665 optional Lifecycle lifecycle = 12;
666
667 // Optional: Path at which the file to which the container's termination message
668 // will be written is mounted into the container's filesystem.
669 // Message written is intended to be brief final status, such as an assertion failure message.
670 // Will be truncated by the node if greater than 4096 bytes. The total message length across
671 // all containers will be limited to 12kb.
672 // Defaults to /dev/termination-log.
673 // Cannot be updated.
674 // +optional
675 optional string terminationMessagePath = 13;
676
677 // Indicate how the termination message should be populated. File will use the contents of
678 // terminationMessagePath to populate the container status message on both success and failure.
679 // FallbackToLogsOnError will use the last chunk of container log output if the termination
680 // message file is empty and the container exited with an error.
681 // The log output is limited to 2048 bytes or 80 lines, whichever is smaller.
682 // Defaults to File.
683 // Cannot be updated.
684 // +optional
685 optional string terminationMessagePolicy = 20;
686
687 // Image pull policy.
688 // One of Always, Never, IfNotPresent.
689 // Defaults to Always if :latest tag is specified, or IfNotPresent otherwise.
690 // Cannot be updated.
691 // More info: https://kubernetes.io/docs/concepts/containers/images#updating-images
692 // +optional
693 optional string imagePullPolicy = 14;
694
695 // Security options the pod should run with.
696 // More info: https://kubernetes.io/docs/concepts/policy/security-context/
697 // More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
698 // +optional
699 optional SecurityContext securityContext = 15;
700
701 // Whether this container should allocate a buffer for stdin in the container runtime. If this
702 // is not set, reads from stdin in the container will always result in EOF.
703 // Default is false.
704 // +optional
705 optional bool stdin = 16;
706
707 // Whether the container runtime should close the stdin channel after it has been opened by
708 // a single attach. When stdin is true the stdin stream will remain open across multiple attach
709 // sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the
710 // first client attaches to stdin, and then remains open and accepts data until the client disconnects,
711 // at which time stdin is closed and remains closed until the container is restarted. If this
712 // flag is false, a container processes that reads from stdin will never receive an EOF.
713 // Default is false
714 // +optional
715 optional bool stdinOnce = 17;
716
717 // Whether this container should allocate a TTY for itself, also requires 'stdin' to be true.
718 // Default is false.
719 // +optional
720 optional bool tty = 18;
721}
722
723// Describe a container image
724message ContainerImage {
725 // Names by which this image is known.
726 // e.g. ["k8s.gcr.io/hyperkube:v1.0.7", "dockerhub.io/google_containers/hyperkube:v1.0.7"]
727 repeated string names = 1;
728
729 // The size of the image in bytes.
730 // +optional
731 optional int64 sizeBytes = 2;
732}
733
734// ContainerPort represents a network port in a single container.
735message ContainerPort {
736 // If specified, this must be an IANA_SVC_NAME and unique within the pod. Each
737 // named port in a pod must have a unique name. Name for the port that can be
738 // referred to by services.
739 // +optional
740 optional string name = 1;
741
742 // Number of port to expose on the host.
743 // If specified, this must be a valid port number, 0 < x < 65536.
744 // If HostNetwork is specified, this must match ContainerPort.
745 // Most containers do not need this.
746 // +optional
747 optional int32 hostPort = 2;
748
749 // Number of port to expose on the pod's IP address.
750 // This must be a valid port number, 0 < x < 65536.
751 optional int32 containerPort = 3;
752
753 // Protocol for port. Must be UDP or TCP.
754 // Defaults to "TCP".
755 // +optional
756 optional string protocol = 4;
757
758 // What host IP to bind the external port to.
759 // +optional
760 optional string hostIP = 5;
761}
762
763// ContainerState holds a possible state of container.
764// Only one of its members may be specified.
765// If none of them is specified, the default one is ContainerStateWaiting.
766message ContainerState {
767 // Details about a waiting container
768 // +optional
769 optional ContainerStateWaiting waiting = 1;
770
771 // Details about a running container
772 // +optional
773 optional ContainerStateRunning running = 2;
774
775 // Details about a terminated container
776 // +optional
777 optional ContainerStateTerminated terminated = 3;
778}
779
780// ContainerStateRunning is a running state of a container.
781message ContainerStateRunning {
782 // Time at which the container was last (re-)started
783 // +optional
784 optional k8s.io.apimachinery.pkg.apis.meta.v1.Time startedAt = 1;
785}
786
787// ContainerStateTerminated is a terminated state of a container.
788message ContainerStateTerminated {
789 // Exit status from the last termination of the container
790 optional int32 exitCode = 1;
791
792 // Signal from the last termination of the container
793 // +optional
794 optional int32 signal = 2;
795
796 // (brief) reason from the last termination of the container
797 // +optional
798 optional string reason = 3;
799
800 // Message regarding the last termination of the container
801 // +optional
802 optional string message = 4;
803
804 // Time at which previous execution of the container started
805 // +optional
806 optional k8s.io.apimachinery.pkg.apis.meta.v1.Time startedAt = 5;
807
808 // Time at which the container last terminated
809 // +optional
810 optional k8s.io.apimachinery.pkg.apis.meta.v1.Time finishedAt = 6;
811
812 // Container's ID in the format 'docker://<container_id>'
813 // +optional
814 optional string containerID = 7;
815}
816
817// ContainerStateWaiting is a waiting state of a container.
818message ContainerStateWaiting {
819 // (brief) reason the container is not yet running.
820 // +optional
821 optional string reason = 1;
822
823 // Message regarding why the container is not yet running.
824 // +optional
825 optional string message = 2;
826}
827
828// ContainerStatus contains details for the current status of this container.
829message ContainerStatus {
830 // This must be a DNS_LABEL. Each container in a pod must have a unique name.
831 // Cannot be updated.
832 optional string name = 1;
833
834 // Details about the container's current condition.
835 // +optional
836 optional ContainerState state = 2;
837
838 // Details about the container's last termination condition.
839 // +optional
840 optional ContainerState lastState = 3;
841
842 // Specifies whether the container has passed its readiness probe.
843 optional bool ready = 4;
844
845 // The number of times the container has been restarted, currently based on
846 // the number of dead containers that have not yet been removed.
847 // Note that this is calculated from dead containers. But those containers are subject to
848 // garbage collection. This value will get capped at 5 by GC.
849 optional int32 restartCount = 5;
850
851 // The image the container is running.
852 // More info: https://kubernetes.io/docs/concepts/containers/images
853 // TODO(dchen1107): Which image the container is running with?
854 optional string image = 6;
855
856 // ImageID of the container's image.
857 optional string imageID = 7;
858
859 // Container's ID in the format 'docker://<container_id>'.
860 // +optional
861 optional string containerID = 8;
862}
863
864// DaemonEndpoint contains information about a single Daemon endpoint.
865message DaemonEndpoint {
866 // Port number of the given endpoint.
867 optional int32 Port = 1;
868}
869
870// Represents downward API info for projecting into a projected volume.
871// Note that this is identical to a downwardAPI volume source without the default
872// mode.
873message DownwardAPIProjection {
874 // Items is a list of DownwardAPIVolume file
875 // +optional
876 repeated DownwardAPIVolumeFile items = 1;
877}
878
879// DownwardAPIVolumeFile represents information to create the file containing the pod field
880message DownwardAPIVolumeFile {
881 // Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..'
882 optional string path = 1;
883
884 // Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.
885 // +optional
886 optional ObjectFieldSelector fieldRef = 2;
887
888 // Selects a resource of the container: only resources limits and requests
889 // (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.
890 // +optional
891 optional ResourceFieldSelector resourceFieldRef = 3;
892
893 // Optional: mode bits to use on this file, must be a value between 0
894 // and 0777. If not specified, the volume defaultMode will be used.
895 // This might be in conflict with other options that affect the file
896 // mode, like fsGroup, and the result can be other mode bits set.
897 // +optional
898 optional int32 mode = 4;
899}
900
901// DownwardAPIVolumeSource represents a volume containing downward API info.
902// Downward API volumes support ownership management and SELinux relabeling.
903message DownwardAPIVolumeSource {
904 // Items is a list of downward API volume file
905 // +optional
906 repeated DownwardAPIVolumeFile items = 1;
907
908 // Optional: mode bits to use on created files by default. Must be a
909 // value between 0 and 0777. Defaults to 0644.
910 // Directories within the path are not affected by this setting.
911 // This might be in conflict with other options that affect the file
912 // mode, like fsGroup, and the result can be other mode bits set.
913 // +optional
914 optional int32 defaultMode = 2;
915}
916
917// Represents an empty directory for a pod.
918// Empty directory volumes support ownership management and SELinux relabeling.
919message EmptyDirVolumeSource {
920 // What type of storage medium should back this directory.
921 // The default is "" which means to use the node's default medium.
922 // Must be an empty string (default) or Memory.
923 // More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir
924 // +optional
925 optional string medium = 1;
926
927 // Total amount of local storage required for this EmptyDir volume.
928 // The size limit is also applicable for memory medium.
929 // The maximum usage on memory medium EmptyDir would be the minimum value between
930 // the SizeLimit specified here and the sum of memory limits of all containers in a pod.
931 // The default is nil which means that the limit is undefined.
932 // More info: http://kubernetes.io/docs/user-guide/volumes#emptydir
933 // +optional
934 optional k8s.io.apimachinery.pkg.api.resource.Quantity sizeLimit = 2;
935}
936
937// EndpointAddress is a tuple that describes single IP address.
938message EndpointAddress {
939 // The IP of this endpoint.
940 // May not be loopback (127.0.0.0/8), link-local (169.254.0.0/16),
941 // or link-local multicast ((224.0.0.0/24).
942 // IPv6 is also accepted but not fully supported on all platforms. Also, certain
943 // kubernetes components, like kube-proxy, are not IPv6 ready.
944 // TODO: This should allow hostname or IP, See #4447.
945 optional string ip = 1;
946
947 // The Hostname of this endpoint
948 // +optional
949 optional string hostname = 3;
950
951 // Optional: Node hosting this endpoint. This can be used to determine endpoints local to a node.
952 // +optional
953 optional string nodeName = 4;
954
955 // Reference to object providing the endpoint.
956 // +optional
957 optional ObjectReference targetRef = 2;
958}
959
960// EndpointPort is a tuple that describes a single port.
961message EndpointPort {
962 // The name of this port (corresponds to ServicePort.Name).
963 // Must be a DNS_LABEL.
964 // Optional only if one port is defined.
965 // +optional
966 optional string name = 1;
967
968 // The port number of the endpoint.
969 optional int32 port = 2;
970
971 // The IP protocol for this port.
972 // Must be UDP or TCP.
973 // Default is TCP.
974 // +optional
975 optional string protocol = 3;
976}
977
978// EndpointSubset is a group of addresses with a common set of ports. The
979// expanded set of endpoints is the Cartesian product of Addresses x Ports.
980// For example, given:
981// {
982// Addresses: [{"ip": "10.10.1.1"}, {"ip": "10.10.2.2"}],
983// Ports: [{"name": "a", "port": 8675}, {"name": "b", "port": 309}]
984// }
985// The resulting set of endpoints can be viewed as:
986// a: [ 10.10.1.1:8675, 10.10.2.2:8675 ],
987// b: [ 10.10.1.1:309, 10.10.2.2:309 ]
988message EndpointSubset {
989 // IP addresses which offer the related ports that are marked as ready. These endpoints
990 // should be considered safe for load balancers and clients to utilize.
991 // +optional
992 repeated EndpointAddress addresses = 1;
993
994 // IP addresses which offer the related ports but are not currently marked as ready
995 // because they have not yet finished starting, have recently failed a readiness check,
996 // or have recently failed a liveness check.
997 // +optional
998 repeated EndpointAddress notReadyAddresses = 2;
999
1000 // Port numbers available on the related IP addresses.
1001 // +optional
1002 repeated EndpointPort ports = 3;
1003}
1004
1005// Endpoints is a collection of endpoints that implement the actual service. Example:
1006// Name: "mysvc",
1007// Subsets: [
1008// {
1009// Addresses: [{"ip": "10.10.1.1"}, {"ip": "10.10.2.2"}],
1010// Ports: [{"name": "a", "port": 8675}, {"name": "b", "port": 309}]
1011// },
1012// {
1013// Addresses: [{"ip": "10.10.3.3"}],
1014// Ports: [{"name": "a", "port": 93}, {"name": "b", "port": 76}]
1015// },
1016// ]
1017message Endpoints {
1018 // Standard object's metadata.
1019 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
1020 // +optional
1021 optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
1022
1023 // The set of all endpoints is the union of all subsets. Addresses are placed into
1024 // subsets according to the IPs they share. A single address with multiple ports,
1025 // some of which are ready and some of which are not (because they come from
1026 // different containers) will result in the address being displayed in different
1027 // subsets for the different ports. No address will appear in both Addresses and
1028 // NotReadyAddresses in the same subset.
1029 // Sets of addresses and ports that comprise a service.
1030 // +optional
1031 repeated EndpointSubset subsets = 2;
1032}
1033
1034// EndpointsList is a list of endpoints.
1035message EndpointsList {
1036 // Standard list metadata.
1037 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
1038 // +optional
1039 optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
1040
1041 // List of endpoints.
1042 repeated Endpoints items = 2;
1043}
1044
1045// EnvFromSource represents the source of a set of ConfigMaps
1046message EnvFromSource {
1047 // An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.
1048 // +optional
1049 optional string prefix = 1;
1050
1051 // The ConfigMap to select from
1052 // +optional
1053 optional ConfigMapEnvSource configMapRef = 2;
1054
1055 // The Secret to select from
1056 // +optional
1057 optional SecretEnvSource secretRef = 3;
1058}
1059
1060// EnvVar represents an environment variable present in a Container.
1061message EnvVar {
1062 // Name of the environment variable. Must be a C_IDENTIFIER.
1063 optional string name = 1;
1064
1065 // Variable references $(VAR_NAME) are expanded
1066 // using the previous defined environment variables in the container and
1067 // any service environment variables. If a variable cannot be resolved,
1068 // the reference in the input string will be unchanged. The $(VAR_NAME)
1069 // syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped
1070 // references will never be expanded, regardless of whether the variable
1071 // exists or not.
1072 // Defaults to "".
1073 // +optional
1074 optional string value = 2;
1075
1076 // Source for the environment variable's value. Cannot be used if value is not empty.
1077 // +optional
1078 optional EnvVarSource valueFrom = 3;
1079}
1080
1081// EnvVarSource represents a source for the value of an EnvVar.
1082message EnvVarSource {
1083 // Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations,
1084 // spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP.
1085 // +optional
1086 optional ObjectFieldSelector fieldRef = 1;
1087
1088 // Selects a resource of the container: only resources limits and requests
1089 // (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
1090 // +optional
1091 optional ResourceFieldSelector resourceFieldRef = 2;
1092
1093 // Selects a key of a ConfigMap.
1094 // +optional
1095 optional ConfigMapKeySelector configMapKeyRef = 3;
1096
1097 // Selects a key of a secret in the pod's namespace
1098 // +optional
1099 optional SecretKeySelector secretKeyRef = 4;
1100}
1101
1102// Event is a report of an event somewhere in the cluster.
1103message Event {
1104 // Standard object's metadata.
1105 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
1106 optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
1107
1108 // The object that this event is about.
1109 optional ObjectReference involvedObject = 2;
1110
1111 // This should be a short, machine understandable string that gives the reason
1112 // for the transition into the object's current status.
1113 // TODO: provide exact specification for format.
1114 // +optional
1115 optional string reason = 3;
1116
1117 // A human-readable description of the status of this operation.
1118 // TODO: decide on maximum length.
1119 // +optional
1120 optional string message = 4;
1121
1122 // The component reporting this event. Should be a short machine understandable string.
1123 // +optional
1124 optional EventSource source = 5;
1125
1126 // The time at which the event was first recorded. (Time of server receipt is in TypeMeta.)
1127 // +optional
1128 optional k8s.io.apimachinery.pkg.apis.meta.v1.Time firstTimestamp = 6;
1129
1130 // The time at which the most recent occurrence of this event was recorded.
1131 // +optional
1132 optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTimestamp = 7;
1133
1134 // The number of times this event has occurred.
1135 // +optional
1136 optional int32 count = 8;
1137
1138 // Type of this event (Normal, Warning), new types could be added in the future
1139 // +optional
1140 optional string type = 9;
1141
1142 // Time when this Event was first observed.
1143 // +optional
1144 optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime eventTime = 10;
1145
1146 // Data about the Event series this event represents or nil if it's a singleton Event.
1147 // +optional
1148 optional EventSeries series = 11;
1149
1150 // What action was taken/failed regarding to the Regarding object.
1151 // +optional
1152 optional string action = 12;
1153
1154 // Optional secondary object for more complex actions.
1155 // +optional
1156 optional ObjectReference related = 13;
1157
1158 // Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`.
1159 // +optional
1160 optional string reportingComponent = 14;
1161
1162 // ID of the controller instance, e.g. `kubelet-xyzf`.
1163 // +optional
1164 optional string reportingInstance = 15;
1165}
1166
1167// EventList is a list of events.
1168message EventList {
1169 // Standard list metadata.
1170 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
1171 // +optional
1172 optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
1173
1174 // List of events
1175 repeated Event items = 2;
1176}
1177
1178// EventSeries contain information on series of events, i.e. thing that was/is happening
1179// continuously for some time.
1180message EventSeries {
1181 // Number of occurrences in this series up to the last heartbeat time
1182 optional int32 count = 1;
1183
1184 // Time of the last occurrence observed
1185 optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime lastObservedTime = 2;
1186
1187 // State of this Series: Ongoing or Finished
1188 optional string state = 3;
1189}
1190
1191// EventSource contains information for an event.
1192message EventSource {
1193 // Component from which the event is generated.
1194 // +optional
1195 optional string component = 1;
1196
1197 // Node name on which the event is generated.
1198 // +optional
1199 optional string host = 2;
1200}
1201
1202// ExecAction describes a "run in container" action.
1203message ExecAction {
1204 // Command is the command line to execute inside the container, the working directory for the
1205 // command is root ('/') in the container's filesystem. The command is simply exec'd, it is
1206 // not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use
1207 // a shell, you need to explicitly call out to that shell.
1208 // Exit status of 0 is treated as live/healthy and non-zero is unhealthy.
1209 // +optional
1210 repeated string command = 1;
1211}
1212
1213// Represents a Fibre Channel volume.
1214// Fibre Channel volumes can only be mounted as read/write once.
1215// Fibre Channel volumes support ownership management and SELinux relabeling.
1216message FCVolumeSource {
1217 // Optional: FC target worldwide names (WWNs)
1218 // +optional
1219 repeated string targetWWNs = 1;
1220
1221 // Optional: FC target lun number
1222 // +optional
1223 optional int32 lun = 2;
1224
1225 // Filesystem type to mount.
1226 // Must be a filesystem type supported by the host operating system.
1227 // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
1228 // TODO: how do we prevent errors in the filesystem from compromising the machine
1229 // +optional
1230 optional string fsType = 3;
1231
1232 // Optional: Defaults to false (read/write). ReadOnly here will force
1233 // the ReadOnly setting in VolumeMounts.
1234 // +optional
1235 optional bool readOnly = 4;
1236
1237 // Optional: FC volume world wide identifiers (wwids)
1238 // Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously.
1239 // +optional
1240 repeated string wwids = 5;
1241}
1242
1243// FlexPersistentVolumeSource represents a generic persistent volume resource that is
1244// provisioned/attached using an exec based plugin.
1245message FlexPersistentVolumeSource {
1246 // Driver is the name of the driver to use for this volume.
1247 optional string driver = 1;
1248
1249 // Filesystem type to mount.
1250 // Must be a filesystem type supported by the host operating system.
1251 // Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script.
1252 // +optional
1253 optional string fsType = 2;
1254
1255 // Optional: SecretRef is reference to the secret object containing
1256 // sensitive information to pass to the plugin scripts. This may be
1257 // empty if no secret object is specified. If the secret object
1258 // contains more than one secret, all secrets are passed to the plugin
1259 // scripts.
1260 // +optional
1261 optional SecretReference secretRef = 3;
1262
1263 // Optional: Defaults to false (read/write). ReadOnly here will force
1264 // the ReadOnly setting in VolumeMounts.
1265 // +optional
1266 optional bool readOnly = 4;
1267
1268 // Optional: Extra command options if any.
1269 // +optional
1270 map<string, string> options = 5;
1271}
1272
1273// FlexVolume represents a generic volume resource that is
1274// provisioned/attached using an exec based plugin.
1275message FlexVolumeSource {
1276 // Driver is the name of the driver to use for this volume.
1277 optional string driver = 1;
1278
1279 // Filesystem type to mount.
1280 // Must be a filesystem type supported by the host operating system.
1281 // Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script.
1282 // +optional
1283 optional string fsType = 2;
1284
1285 // Optional: SecretRef is reference to the secret object containing
1286 // sensitive information to pass to the plugin scripts. This may be
1287 // empty if no secret object is specified. If the secret object
1288 // contains more than one secret, all secrets are passed to the plugin
1289 // scripts.
1290 // +optional
1291 optional LocalObjectReference secretRef = 3;
1292
1293 // Optional: Defaults to false (read/write). ReadOnly here will force
1294 // the ReadOnly setting in VolumeMounts.
1295 // +optional
1296 optional bool readOnly = 4;
1297
1298 // Optional: Extra command options if any.
1299 // +optional
1300 map<string, string> options = 5;
1301}
1302
1303// Represents a Flocker volume mounted by the Flocker agent.
1304// One and only one of datasetName and datasetUUID should be set.
1305// Flocker volumes do not support ownership management or SELinux relabeling.
1306message FlockerVolumeSource {
1307 // Name of the dataset stored as metadata -> name on the dataset for Flocker
1308 // should be considered as deprecated
1309 // +optional
1310 optional string datasetName = 1;
1311
1312 // UUID of the dataset. This is unique identifier of a Flocker dataset
1313 // +optional
1314 optional string datasetUUID = 2;
1315}
1316
1317// Represents a Persistent Disk resource in Google Compute Engine.
1318//
1319// A GCE PD must exist before mounting to a container. The disk must
1320// also be in the same GCE project and zone as the kubelet. A GCE PD
1321// can only be mounted as read/write once or read-only many times. GCE
1322// PDs support ownership management and SELinux relabeling.
1323message GCEPersistentDiskVolumeSource {
1324 // Unique name of the PD resource in GCE. Used to identify the disk in GCE.
1325 // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
1326 optional string pdName = 1;
1327
1328 // Filesystem type of the volume that you want to mount.
1329 // Tip: Ensure that the filesystem type is supported by the host operating system.
1330 // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
1331 // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
1332 // TODO: how do we prevent errors in the filesystem from compromising the machine
1333 // +optional
1334 optional string fsType = 2;
1335
1336 // The partition in the volume that you want to mount.
1337 // If omitted, the default is to mount by volume name.
1338 // Examples: For volume /dev/sda1, you specify the partition as "1".
1339 // Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty).
1340 // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
1341 // +optional
1342 optional int32 partition = 3;
1343
1344 // ReadOnly here will force the ReadOnly setting in VolumeMounts.
1345 // Defaults to false.
1346 // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
1347 // +optional
1348 optional bool readOnly = 4;
1349}
1350
1351// Represents a volume that is populated with the contents of a git repository.
1352// Git repo volumes do not support ownership management.
1353// Git repo volumes support SELinux relabeling.
1354//
1355// DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an
1356// EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir
1357// into the Pod's container.
1358message GitRepoVolumeSource {
1359 // Repository URL
1360 optional string repository = 1;
1361
1362 // Commit hash for the specified revision.
1363 // +optional
1364 optional string revision = 2;
1365
1366 // Target directory name.
1367 // Must not contain or start with '..'. If '.' is supplied, the volume directory will be the
1368 // git repository. Otherwise, if specified, the volume will contain the git repository in
1369 // the subdirectory with the given name.
1370 // +optional
1371 optional string directory = 3;
1372}
1373
1374// Represents a Glusterfs mount that lasts the lifetime of a pod.
1375// Glusterfs volumes do not support ownership management or SELinux relabeling.
1376message GlusterfsVolumeSource {
1377 // EndpointsName is the endpoint name that details Glusterfs topology.
1378 // More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod
1379 optional string endpoints = 1;
1380
1381 // Path is the Glusterfs volume path.
1382 // More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod
1383 optional string path = 2;
1384
1385 // ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions.
1386 // Defaults to false.
1387 // More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod
1388 // +optional
1389 optional bool readOnly = 3;
1390}
1391
1392// HTTPGetAction describes an action based on HTTP Get requests.
1393message HTTPGetAction {
1394 // Path to access on the HTTP server.
1395 // +optional
1396 optional string path = 1;
1397
1398 // Name or number of the port to access on the container.
1399 // Number must be in the range 1 to 65535.
1400 // Name must be an IANA_SVC_NAME.
1401 optional k8s.io.apimachinery.pkg.util.intstr.IntOrString port = 2;
1402
1403 // Host name to connect to, defaults to the pod IP. You probably want to set
1404 // "Host" in httpHeaders instead.
1405 // +optional
1406 optional string host = 3;
1407
1408 // Scheme to use for connecting to the host.
1409 // Defaults to HTTP.
1410 // +optional
1411 optional string scheme = 4;
1412
1413 // Custom headers to set in the request. HTTP allows repeated headers.
1414 // +optional
1415 repeated HTTPHeader httpHeaders = 5;
1416}
1417
1418// HTTPHeader describes a custom header to be used in HTTP probes
1419message HTTPHeader {
1420 // The header field name
1421 optional string name = 1;
1422
1423 // The header field value
1424 optional string value = 2;
1425}
1426
1427// Handler defines a specific action that should be taken
1428// TODO: pass structured data to these actions, and document that data here.
1429message Handler {
1430 // One and only one of the following should be specified.
1431 // Exec specifies the action to take.
1432 // +optional
1433 optional ExecAction exec = 1;
1434
1435 // HTTPGet specifies the http request to perform.
1436 // +optional
1437 optional HTTPGetAction httpGet = 2;
1438
1439 // TCPSocket specifies an action involving a TCP port.
1440 // TCP hooks not yet supported
1441 // TODO: implement a realistic TCP lifecycle hook
1442 // +optional
1443 optional TCPSocketAction tcpSocket = 3;
1444}
1445
1446// HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the
1447// pod's hosts file.
1448message HostAlias {
1449 // IP address of the host file entry.
1450 optional string ip = 1;
1451
1452 // Hostnames for the above IP address.
1453 repeated string hostnames = 2;
1454}
1455
1456// Represents a host path mapped into a pod.
1457// Host path volumes do not support ownership management or SELinux relabeling.
1458message HostPathVolumeSource {
1459 // Path of the directory on the host.
1460 // If the path is a symlink, it will follow the link to the real path.
1461 // More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath
1462 optional string path = 1;
1463
1464 // Type for HostPath Volume
1465 // Defaults to ""
1466 // More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath
1467 // +optional
1468 optional string type = 2;
1469}
1470
1471// ISCSIPersistentVolumeSource represents an ISCSI disk.
1472// ISCSI volumes can only be mounted as read/write once.
1473// ISCSI volumes support ownership management and SELinux relabeling.
1474message ISCSIPersistentVolumeSource {
1475 // iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port
1476 // is other than default (typically TCP ports 860 and 3260).
1477 optional string targetPortal = 1;
1478
1479 // Target iSCSI Qualified Name.
1480 optional string iqn = 2;
1481
1482 // iSCSI Target Lun number.
1483 optional int32 lun = 3;
1484
1485 // iSCSI Interface Name that uses an iSCSI transport.
1486 // Defaults to 'default' (tcp).
1487 // +optional
1488 optional string iscsiInterface = 4;
1489
1490 // Filesystem type of the volume that you want to mount.
1491 // Tip: Ensure that the filesystem type is supported by the host operating system.
1492 // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
1493 // More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi
1494 // TODO: how do we prevent errors in the filesystem from compromising the machine
1495 // +optional
1496 optional string fsType = 5;
1497
1498 // ReadOnly here will force the ReadOnly setting in VolumeMounts.
1499 // Defaults to false.
1500 // +optional
1501 optional bool readOnly = 6;
1502
1503 // iSCSI Target Portal List. The Portal is either an IP or ip_addr:port if the port
1504 // is other than default (typically TCP ports 860 and 3260).
1505 // +optional
1506 repeated string portals = 7;
1507
1508 // whether support iSCSI Discovery CHAP authentication
1509 // +optional
1510 optional bool chapAuthDiscovery = 8;
1511
1512 // whether support iSCSI Session CHAP authentication
1513 // +optional
1514 optional bool chapAuthSession = 11;
1515
1516 // CHAP Secret for iSCSI target and initiator authentication
1517 // +optional
1518 optional SecretReference secretRef = 10;
1519
1520 // Custom iSCSI Initiator Name.
1521 // If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface
1522 // <target portal>:<volume name> will be created for the connection.
1523 // +optional
1524 optional string initiatorName = 12;
1525}
1526
1527// Represents an ISCSI disk.
1528// ISCSI volumes can only be mounted as read/write once.
1529// ISCSI volumes support ownership management and SELinux relabeling.
1530message ISCSIVolumeSource {
1531 // iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port
1532 // is other than default (typically TCP ports 860 and 3260).
1533 optional string targetPortal = 1;
1534
1535 // Target iSCSI Qualified Name.
1536 optional string iqn = 2;
1537
1538 // iSCSI Target Lun number.
1539 optional int32 lun = 3;
1540
1541 // iSCSI Interface Name that uses an iSCSI transport.
1542 // Defaults to 'default' (tcp).
1543 // +optional
1544 optional string iscsiInterface = 4;
1545
1546 // Filesystem type of the volume that you want to mount.
1547 // Tip: Ensure that the filesystem type is supported by the host operating system.
1548 // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
1549 // More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi
1550 // TODO: how do we prevent errors in the filesystem from compromising the machine
1551 // +optional
1552 optional string fsType = 5;
1553
1554 // ReadOnly here will force the ReadOnly setting in VolumeMounts.
1555 // Defaults to false.
1556 // +optional
1557 optional bool readOnly = 6;
1558
1559 // iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port
1560 // is other than default (typically TCP ports 860 and 3260).
1561 // +optional
1562 repeated string portals = 7;
1563
1564 // whether support iSCSI Discovery CHAP authentication
1565 // +optional
1566 optional bool chapAuthDiscovery = 8;
1567
1568 // whether support iSCSI Session CHAP authentication
1569 // +optional
1570 optional bool chapAuthSession = 11;
1571
1572 // CHAP Secret for iSCSI target and initiator authentication
1573 // +optional
1574 optional LocalObjectReference secretRef = 10;
1575
1576 // Custom iSCSI Initiator Name.
1577 // If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface
1578 // <target portal>:<volume name> will be created for the connection.
1579 // +optional
1580 optional string initiatorName = 12;
1581}
1582
1583// Maps a string key to a path within a volume.
1584message KeyToPath {
1585 // The key to project.
1586 optional string key = 1;
1587
1588 // The relative path of the file to map the key to.
1589 // May not be an absolute path.
1590 // May not contain the path element '..'.
1591 // May not start with the string '..'.
1592 optional string path = 2;
1593
1594 // Optional: mode bits to use on this file, must be a value between 0
1595 // and 0777. If not specified, the volume defaultMode will be used.
1596 // This might be in conflict with other options that affect the file
1597 // mode, like fsGroup, and the result can be other mode bits set.
1598 // +optional
1599 optional int32 mode = 3;
1600}
1601
1602// Lifecycle describes actions that the management system should take in response to container lifecycle
1603// events. For the PostStart and PreStop lifecycle handlers, management of the container blocks
1604// until the action is complete, unless the container process fails, in which case the handler is aborted.
1605message Lifecycle {
1606 // PostStart is called immediately after a container is created. If the handler fails,
1607 // the container is terminated and restarted according to its restart policy.
1608 // Other management of the container blocks until the hook completes.
1609 // More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks
1610 // +optional
1611 optional Handler postStart = 1;
1612
1613 // PreStop is called immediately before a container is terminated.
1614 // The container is terminated after the handler completes.
1615 // The reason for termination is passed to the handler.
1616 // Regardless of the outcome of the handler, the container is eventually terminated.
1617 // Other management of the container blocks until the hook completes.
1618 // More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks
1619 // +optional
1620 optional Handler preStop = 2;
1621}
1622
1623// LimitRange sets resource usage limits for each kind of resource in a Namespace.
1624message LimitRange {
1625 // Standard object's metadata.
1626 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
1627 // +optional
1628 optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
1629
1630 // Spec defines the limits enforced.
1631 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
1632 // +optional
1633 optional LimitRangeSpec spec = 2;
1634}
1635
1636// LimitRangeItem defines a min/max usage limit for any resource that matches on kind.
1637message LimitRangeItem {
1638 // Type of resource that this limit applies to.
1639 // +optional
1640 optional string type = 1;
1641
1642 // Max usage constraints on this kind by resource name.
1643 // +optional
1644 map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> max = 2;
1645
1646 // Min usage constraints on this kind by resource name.
1647 // +optional
1648 map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> min = 3;
1649
1650 // Default resource requirement limit value by resource name if resource limit is omitted.
1651 // +optional
1652 map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> default = 4;
1653
1654 // DefaultRequest is the default resource requirement request value by resource name if resource request is omitted.
1655 // +optional
1656 map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> defaultRequest = 5;
1657
1658 // MaxLimitRequestRatio if specified, the named resource must have a request and limit that are both non-zero where limit divided by request is less than or equal to the enumerated value; this represents the max burst for the named resource.
1659 // +optional
1660 map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> maxLimitRequestRatio = 6;
1661}
1662
1663// LimitRangeList is a list of LimitRange items.
1664message LimitRangeList {
1665 // Standard list metadata.
1666 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
1667 // +optional
1668 optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
1669
1670 // Items is a list of LimitRange objects.
1671 // More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
1672 repeated LimitRange items = 2;
1673}
1674
1675// LimitRangeSpec defines a min/max usage limit for resources that match on kind.
1676message LimitRangeSpec {
1677 // Limits is the list of LimitRangeItem objects that are enforced.
1678 repeated LimitRangeItem limits = 1;
1679}
1680
1681// List holds a list of objects, which may not be known by the server.
1682message List {
1683 // Standard list metadata.
1684 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
1685 // +optional
1686 optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
1687
1688 // List of objects
1689 repeated k8s.io.apimachinery.pkg.runtime.RawExtension items = 2;
1690}
1691
1692// LoadBalancerIngress represents the status of a load-balancer ingress point:
1693// traffic intended for the service should be sent to an ingress point.
1694message LoadBalancerIngress {
1695 // IP is set for load-balancer ingress points that are IP based
1696 // (typically GCE or OpenStack load-balancers)
1697 // +optional
1698 optional string ip = 1;
1699
1700 // Hostname is set for load-balancer ingress points that are DNS based
1701 // (typically AWS load-balancers)
1702 // +optional
1703 optional string hostname = 2;
1704}
1705
1706// LoadBalancerStatus represents the status of a load-balancer.
1707message LoadBalancerStatus {
1708 // Ingress is a list containing ingress points for the load-balancer.
1709 // Traffic intended for the service should be sent to these ingress points.
1710 // +optional
1711 repeated LoadBalancerIngress ingress = 1;
1712}
1713
1714// LocalObjectReference contains enough information to let you locate the
1715// referenced object inside the same namespace.
1716message LocalObjectReference {
1717 // Name of the referent.
1718 // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
1719 // TODO: Add other useful fields. apiVersion, kind, uid?
1720 // +optional
1721 optional string name = 1;
1722}
1723
1724// Local represents directly-attached storage with node affinity (Beta feature)
1725message LocalVolumeSource {
1726 // The full path to the volume on the node.
1727 // It can be either a directory or block device (disk, partition, ...).
1728 // Directories can be represented only by PersistentVolume with VolumeMode=Filesystem.
1729 // Block devices can be represented only by VolumeMode=Block, which also requires the
1730 // BlockVolume alpha feature gate to be enabled.
1731 optional string path = 1;
1732}
1733
1734// Represents an NFS mount that lasts the lifetime of a pod.
1735// NFS volumes do not support ownership management or SELinux relabeling.
1736message NFSVolumeSource {
1737 // Server is the hostname or IP address of the NFS server.
1738 // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
1739 optional string server = 1;
1740
1741 // Path that is exported by the NFS server.
1742 // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
1743 optional string path = 2;
1744
1745 // ReadOnly here will force
1746 // the NFS export to be mounted with read-only permissions.
1747 // Defaults to false.
1748 // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
1749 // +optional
1750 optional bool readOnly = 3;
1751}
1752
1753// Namespace provides a scope for Names.
1754// Use of multiple namespaces is optional.
1755message Namespace {
1756 // Standard object's metadata.
1757 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
1758 // +optional
1759 optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
1760
1761 // Spec defines the behavior of the Namespace.
1762 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
1763 // +optional
1764 optional NamespaceSpec spec = 2;
1765
1766 // Status describes the current status of a Namespace.
1767 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
1768 // +optional
1769 optional NamespaceStatus status = 3;
1770}
1771
1772// NamespaceList is a list of Namespaces.
1773message NamespaceList {
1774 // Standard list metadata.
1775 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
1776 // +optional
1777 optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
1778
1779 // Items is the list of Namespace objects in the list.
1780 // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
1781 repeated Namespace items = 2;
1782}
1783
1784// NamespaceSpec describes the attributes on a Namespace.
1785message NamespaceSpec {
1786 // Finalizers is an opaque list of values that must be empty to permanently remove object from storage.
1787 // More info: https://kubernetes.io/docs/tasks/administer-cluster/namespaces/
1788 // +optional
1789 repeated string finalizers = 1;
1790}
1791
1792// NamespaceStatus is information about the current status of a Namespace.
1793message NamespaceStatus {
1794 // Phase is the current lifecycle phase of the namespace.
1795 // More info: https://kubernetes.io/docs/tasks/administer-cluster/namespaces/
1796 // +optional
1797 optional string phase = 1;
1798}
1799
1800// Node is a worker node in Kubernetes.
1801// Each node will have a unique identifier in the cache (i.e. in etcd).
1802message Node {
1803 // Standard object's metadata.
1804 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
1805 // +optional
1806 optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
1807
1808 // Spec defines the behavior of a node.
1809 // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
1810 // +optional
1811 optional NodeSpec spec = 2;
1812
1813 // Most recently observed status of the node.
1814 // Populated by the system.
1815 // Read-only.
1816 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
1817 // +optional
1818 optional NodeStatus status = 3;
1819}
1820
1821// NodeAddress contains information for the node's address.
1822message NodeAddress {
1823 // Node address type, one of Hostname, ExternalIP or InternalIP.
1824 optional string type = 1;
1825
1826 // The node address.
1827 optional string address = 2;
1828}
1829
1830// Node affinity is a group of node affinity scheduling rules.
1831message NodeAffinity {
1832 // If the affinity requirements specified by this field are not met at
1833 // scheduling time, the pod will not be scheduled onto the node.
1834 // If the affinity requirements specified by this field cease to be met
1835 // at some point during pod execution (e.g. due to an update), the system
1836 // may or may not try to eventually evict the pod from its node.
1837 // +optional
1838 optional NodeSelector requiredDuringSchedulingIgnoredDuringExecution = 1;
1839
1840 // The scheduler will prefer to schedule pods to nodes that satisfy
1841 // the affinity expressions specified by this field, but it may choose
1842 // a node that violates one or more of the expressions. The node that is
1843 // most preferred is the one with the greatest sum of weights, i.e.
1844 // for each node that meets all of the scheduling requirements (resource
1845 // request, requiredDuringScheduling affinity expressions, etc.),
1846 // compute a sum by iterating through the elements of this field and adding
1847 // "weight" to the sum if the node matches the corresponding matchExpressions; the
1848 // node(s) with the highest sum are the most preferred.
1849 // +optional
1850 repeated PreferredSchedulingTerm preferredDuringSchedulingIgnoredDuringExecution = 2;
1851}
1852
1853// NodeCondition contains condition information for a node.
1854message NodeCondition {
1855 // Type of node condition.
1856 optional string type = 1;
1857
1858 // Status of the condition, one of True, False, Unknown.
1859 optional string status = 2;
1860
1861 // Last time we got an update on a given condition.
1862 // +optional
1863 optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastHeartbeatTime = 3;
1864
1865 // Last time the condition transit from one status to another.
1866 // +optional
1867 optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 4;
1868
1869 // (brief) reason for the condition's last transition.
1870 // +optional
1871 optional string reason = 5;
1872
1873 // Human readable message indicating details about last transition.
1874 // +optional
1875 optional string message = 6;
1876}
1877
1878// NodeConfigSource specifies a source of node configuration. Exactly one subfield (excluding metadata) must be non-nil.
1879message NodeConfigSource {
1880 // ConfigMap is a reference to a Node's ConfigMap
1881 optional ConfigMapNodeConfigSource configMap = 2;
1882}
1883
1884// NodeConfigStatus describes the status of the config assigned by Node.Spec.ConfigSource.
1885message NodeConfigStatus {
1886 // Assigned reports the checkpointed config the node will try to use.
1887 // When Node.Spec.ConfigSource is updated, the node checkpoints the associated
1888 // config payload to local disk, along with a record indicating intended
1889 // config. The node refers to this record to choose its config checkpoint, and
1890 // reports this record in Assigned. Assigned only updates in the status after
1891 // the record has been checkpointed to disk. When the Kubelet is restarted,
1892 // it tries to make the Assigned config the Active config by loading and
1893 // validating the checkpointed payload identified by Assigned.
1894 // +optional
1895 optional NodeConfigSource assigned = 1;
1896
1897 // Active reports the checkpointed config the node is actively using.
1898 // Active will represent either the current version of the Assigned config,
1899 // or the current LastKnownGood config, depending on whether attempting to use the
1900 // Assigned config results in an error.
1901 // +optional
1902 optional NodeConfigSource active = 2;
1903
1904 // LastKnownGood reports the checkpointed config the node will fall back to
1905 // when it encounters an error attempting to use the Assigned config.
1906 // The Assigned config becomes the LastKnownGood config when the node determines
1907 // that the Assigned config is stable and correct.
1908 // This is currently implemented as a 10-minute soak period starting when the local
1909 // record of Assigned config is updated. If the Assigned config is Active at the end
1910 // of this period, it becomes the LastKnownGood. Note that if Spec.ConfigSource is
1911 // reset to nil (use local defaults), the LastKnownGood is also immediately reset to nil,
1912 // because the local default config is always assumed good.
1913 // You should not make assumptions about the node's method of determining config stability
1914 // and correctness, as this may change or become configurable in the future.
1915 // +optional
1916 optional NodeConfigSource lastKnownGood = 3;
1917
1918 // Error describes any problems reconciling the Spec.ConfigSource to the Active config.
1919 // Errors may occur, for example, attempting to checkpoint Spec.ConfigSource to the local Assigned
1920 // record, attempting to checkpoint the payload associated with Spec.ConfigSource, attempting
1921 // to load or validate the Assigned config, etc.
1922 // Errors may occur at different points while syncing config. Earlier errors (e.g. download or
1923 // checkpointing errors) will not result in a rollback to LastKnownGood, and may resolve across
1924 // Kubelet retries. Later errors (e.g. loading or validating a checkpointed config) will result in
1925 // a rollback to LastKnownGood. In the latter case, it is usually possible to resolve the error
1926 // by fixing the config assigned in Spec.ConfigSource.
1927 // You can find additional information for debugging by searching the error message in the Kubelet log.
1928 // Error is a human-readable description of the error state; machines can check whether or not Error
1929 // is empty, but should not rely on the stability of the Error text across Kubelet versions.
1930 // +optional
1931 optional string error = 4;
1932}
1933
1934// NodeDaemonEndpoints lists ports opened by daemons running on the Node.
1935message NodeDaemonEndpoints {
1936 // Endpoint on which Kubelet is listening.
1937 // +optional
1938 optional DaemonEndpoint kubeletEndpoint = 1;
1939}
1940
1941// NodeList is the whole list of all Nodes which have been registered with master.
1942message NodeList {
1943 // Standard list metadata.
1944 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
1945 // +optional
1946 optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
1947
1948 // List of nodes
1949 repeated Node items = 2;
1950}
1951
1952// NodeProxyOptions is the query options to a Node's proxy call.
1953message NodeProxyOptions {
1954 // Path is the URL path to use for the current proxy request to node.
1955 // +optional
1956 optional string path = 1;
1957}
1958
1959// NodeResources is an object for conveying resource information about a node.
1960// see http://releases.k8s.io/HEAD/docs/design/resources.md for more details.
1961message NodeResources {
1962 // Capacity represents the available resources of a node
1963 map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> capacity = 1;
1964}
1965
1966// A node selector represents the union of the results of one or more label queries
1967// over a set of nodes; that is, it represents the OR of the selectors represented
1968// by the node selector terms.
1969message NodeSelector {
1970 // Required. A list of node selector terms. The terms are ORed.
1971 repeated NodeSelectorTerm nodeSelectorTerms = 1;
1972}
1973
1974// A node selector requirement is a selector that contains values, a key, and an operator
1975// that relates the key and values.
1976message NodeSelectorRequirement {
1977 // The label key that the selector applies to.
1978 optional string key = 1;
1979
1980 // Represents a key's relationship to a set of values.
1981 // Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
1982 optional string operator = 2;
1983
1984 // An array of string values. If the operator is In or NotIn,
1985 // the values array must be non-empty. If the operator is Exists or DoesNotExist,
1986 // the values array must be empty. If the operator is Gt or Lt, the values
1987 // array must have a single element, which will be interpreted as an integer.
1988 // This array is replaced during a strategic merge patch.
1989 // +optional
1990 repeated string values = 3;
1991}
1992
1993// A null or empty node selector term matches no objects. The requirements of
1994// them are ANDed.
1995// The TopologySelectorTerm type implements a subset of the NodeSelectorTerm.
1996message NodeSelectorTerm {
1997 // A list of node selector requirements by node's labels.
1998 // +optional
1999 repeated NodeSelectorRequirement matchExpressions = 1;
2000
2001 // A list of node selector requirements by node's fields.
2002 // +optional
2003 repeated NodeSelectorRequirement matchFields = 2;
2004}
2005
2006// NodeSpec describes the attributes that a node is created with.
2007message NodeSpec {
2008 // PodCIDR represents the pod IP range assigned to the node.
2009 // +optional
2010 optional string podCIDR = 1;
2011
2012 // ID of the node assigned by the cloud provider in the format: <ProviderName>://<ProviderSpecificNodeID>
2013 // +optional
2014 optional string providerID = 3;
2015
2016 // Unschedulable controls node schedulability of new pods. By default, node is schedulable.
2017 // More info: https://kubernetes.io/docs/concepts/nodes/node/#manual-node-administration
2018 // +optional
2019 optional bool unschedulable = 4;
2020
2021 // If specified, the node's taints.
2022 // +optional
2023 repeated Taint taints = 5;
2024
2025 // If specified, the source to get node configuration from
2026 // The DynamicKubeletConfig feature gate must be enabled for the Kubelet to use this field
2027 // +optional
2028 optional NodeConfigSource configSource = 6;
2029
2030 // Deprecated. Not all kubelets will set this field. Remove field after 1.13.
2031 // see: https://issues.k8s.io/61966
2032 // +optional
2033 optional string externalID = 2;
2034}
2035
2036// NodeStatus is information about the current status of a node.
2037message NodeStatus {
2038 // Capacity represents the total resources of a node.
2039 // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity
2040 // +optional
2041 map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> capacity = 1;
2042
2043 // Allocatable represents the resources of a node that are available for scheduling.
2044 // Defaults to Capacity.
2045 // +optional
2046 map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> allocatable = 2;
2047
2048 // NodePhase is the recently observed lifecycle phase of the node.
2049 // More info: https://kubernetes.io/docs/concepts/nodes/node/#phase
2050 // The field is never populated, and now is deprecated.
2051 // +optional
2052 optional string phase = 3;
2053
2054 // Conditions is an array of current observed node conditions.
2055 // More info: https://kubernetes.io/docs/concepts/nodes/node/#condition
2056 // +optional
2057 // +patchMergeKey=type
2058 // +patchStrategy=merge
2059 repeated NodeCondition conditions = 4;
2060
2061 // List of addresses reachable to the node.
2062 // Queried from cloud provider, if available.
2063 // More info: https://kubernetes.io/docs/concepts/nodes/node/#addresses
2064 // +optional
2065 // +patchMergeKey=type
2066 // +patchStrategy=merge
2067 repeated NodeAddress addresses = 5;
2068
2069 // Endpoints of daemons running on the Node.
2070 // +optional
2071 optional NodeDaemonEndpoints daemonEndpoints = 6;
2072
2073 // Set of ids/uuids to uniquely identify the node.
2074 // More info: https://kubernetes.io/docs/concepts/nodes/node/#info
2075 // +optional
2076 optional NodeSystemInfo nodeInfo = 7;
2077
2078 // List of container images on this node
2079 // +optional
2080 repeated ContainerImage images = 8;
2081
2082 // List of attachable volumes in use (mounted) by the node.
2083 // +optional
2084 repeated string volumesInUse = 9;
2085
2086 // List of volumes that are attached to the node.
2087 // +optional
2088 repeated AttachedVolume volumesAttached = 10;
2089
2090 // Status of the config assigned to the node via the dynamic Kubelet config feature.
2091 // +optional
2092 optional NodeConfigStatus config = 11;
2093}
2094
2095// NodeSystemInfo is a set of ids/uuids to uniquely identify the node.
2096message NodeSystemInfo {
2097 // MachineID reported by the node. For unique machine identification
2098 // in the cluster this field is preferred. Learn more from man(5)
2099 // machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html
2100 optional string machineID = 1;
2101
2102 // SystemUUID reported by the node. For unique machine identification
2103 // MachineID is preferred. This field is specific to Red Hat hosts
2104 // https://access.redhat.com/documentation/en-US/Red_Hat_Subscription_Management/1/html/RHSM/getting-system-uuid.html
2105 optional string systemUUID = 2;
2106
2107 // Boot ID reported by the node.
2108 optional string bootID = 3;
2109
2110 // Kernel Version reported by the node from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64).
2111 optional string kernelVersion = 4;
2112
2113 // OS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)).
2114 optional string osImage = 5;
2115
2116 // ContainerRuntime Version reported by the node through runtime remote API (e.g. docker://1.5.0).
2117 optional string containerRuntimeVersion = 6;
2118
2119 // Kubelet Version reported by the node.
2120 optional string kubeletVersion = 7;
2121
2122 // KubeProxy Version reported by the node.
2123 optional string kubeProxyVersion = 8;
2124
2125 // The Operating System reported by the node
2126 optional string operatingSystem = 9;
2127
2128 // The Architecture reported by the node
2129 optional string architecture = 10;
2130}
2131
2132// ObjectFieldSelector selects an APIVersioned field of an object.
2133message ObjectFieldSelector {
2134 // Version of the schema the FieldPath is written in terms of, defaults to "v1".
2135 // +optional
2136 optional string apiVersion = 1;
2137
2138 // Path of the field to select in the specified API version.
2139 optional string fieldPath = 2;
2140}
2141
2142// ObjectReference contains enough information to let you inspect or modify the referred object.
2143// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
2144message ObjectReference {
2145 // Kind of the referent.
2146 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
2147 // +optional
2148 optional string kind = 1;
2149
2150 // Namespace of the referent.
2151 // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
2152 // +optional
2153 optional string namespace = 2;
2154
2155 // Name of the referent.
2156 // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
2157 // +optional
2158 optional string name = 3;
2159
2160 // UID of the referent.
2161 // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
2162 // +optional
2163 optional string uid = 4;
2164
2165 // API version of the referent.
2166 // +optional
2167 optional string apiVersion = 5;
2168
2169 // Specific resourceVersion to which this reference is made, if any.
2170 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency
2171 // +optional
2172 optional string resourceVersion = 6;
2173
2174 // If referring to a piece of an object instead of an entire object, this string
2175 // should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2].
2176 // For example, if the object reference is to a container within a pod, this would take on a value like:
2177 // "spec.containers{name}" (where "name" refers to the name of the container that triggered
2178 // the event) or if no container name is specified "spec.containers[2]" (container with
2179 // index 2 in this pod). This syntax is chosen only to have some well-defined way of
2180 // referencing a part of an object.
2181 // TODO: this design is not final and this field is subject to change in the future.
2182 // +optional
2183 optional string fieldPath = 7;
2184}
2185
2186// PersistentVolume (PV) is a storage resource provisioned by an administrator.
2187// It is analogous to a node.
2188// More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes
2189message PersistentVolume {
2190 // Standard object's metadata.
2191 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
2192 // +optional
2193 optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
2194
2195 // Spec defines a specification of a persistent volume owned by the cluster.
2196 // Provisioned by an administrator.
2197 // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes
2198 // +optional
2199 optional PersistentVolumeSpec spec = 2;
2200
2201 // Status represents the current information/status for the persistent volume.
2202 // Populated by the system.
2203 // Read-only.
2204 // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes
2205 // +optional
2206 optional PersistentVolumeStatus status = 3;
2207}
2208
2209// PersistentVolumeClaim is a user's request for and claim to a persistent volume
2210message PersistentVolumeClaim {
2211 // Standard object's metadata.
2212 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
2213 // +optional
2214 optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
2215
2216 // Spec defines the desired characteristics of a volume requested by a pod author.
2217 // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
2218 // +optional
2219 optional PersistentVolumeClaimSpec spec = 2;
2220
2221 // Status represents the current information/status of a persistent volume claim.
2222 // Read-only.
2223 // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
2224 // +optional
2225 optional PersistentVolumeClaimStatus status = 3;
2226}
2227
2228// PersistentVolumeClaimCondition contails details about state of pvc
2229message PersistentVolumeClaimCondition {
2230 optional string type = 1;
2231
2232 optional string status = 2;
2233
2234 // Last time we probed the condition.
2235 // +optional
2236 optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastProbeTime = 3;
2237
2238 // Last time the condition transitioned from one status to another.
2239 // +optional
2240 optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 4;
2241
2242 // Unique, this should be a short, machine understandable string that gives the reason
2243 // for condition's last transition. If it reports "ResizeStarted" that means the underlying
2244 // persistent volume is being resized.
2245 // +optional
2246 optional string reason = 5;
2247
2248 // Human-readable message indicating details about last transition.
2249 // +optional
2250 optional string message = 6;
2251}
2252
2253// PersistentVolumeClaimList is a list of PersistentVolumeClaim items.
2254message PersistentVolumeClaimList {
2255 // Standard list metadata.
2256 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
2257 // +optional
2258 optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
2259
2260 // A list of persistent volume claims.
2261 // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
2262 repeated PersistentVolumeClaim items = 2;
2263}
2264
2265// PersistentVolumeClaimSpec describes the common attributes of storage devices
2266// and allows a Source for provider-specific attributes
2267message PersistentVolumeClaimSpec {
2268 // AccessModes contains the desired access modes the volume should have.
2269 // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1
2270 // +optional
2271 repeated string accessModes = 1;
2272
2273 // A label query over volumes to consider for binding.
2274 // +optional
2275 optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 4;
2276
2277 // Resources represents the minimum resources the volume should have.
2278 // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
2279 // +optional
2280 optional ResourceRequirements resources = 2;
2281
2282 // VolumeName is the binding reference to the PersistentVolume backing this claim.
2283 // +optional
2284 optional string volumeName = 3;
2285
2286 // Name of the StorageClass required by the claim.
2287 // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1
2288 // +optional
2289 optional string storageClassName = 5;
2290
2291 // volumeMode defines what type of volume is required by the claim.
2292 // Value of Filesystem is implied when not included in claim spec.
2293 // This is an alpha feature and may change in the future.
2294 // +optional
2295 optional string volumeMode = 6;
2296}
2297
2298// PersistentVolumeClaimStatus is the current status of a persistent volume claim.
2299message PersistentVolumeClaimStatus {
2300 // Phase represents the current phase of PersistentVolumeClaim.
2301 // +optional
2302 optional string phase = 1;
2303
2304 // AccessModes contains the actual access modes the volume backing the PVC has.
2305 // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1
2306 // +optional
2307 repeated string accessModes = 2;
2308
2309 // Represents the actual resources of the underlying volume.
2310 // +optional
2311 map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> capacity = 3;
2312
2313 // Current Condition of persistent volume claim. If underlying persistent volume is being
2314 // resized then the Condition will be set to 'ResizeStarted'.
2315 // +optional
2316 // +patchMergeKey=type
2317 // +patchStrategy=merge
2318 repeated PersistentVolumeClaimCondition conditions = 4;
2319}
2320
2321// PersistentVolumeClaimVolumeSource references the user's PVC in the same namespace.
2322// This volume finds the bound PV and mounts that volume for the pod. A
2323// PersistentVolumeClaimVolumeSource is, essentially, a wrapper around another
2324// type of volume that is owned by someone else (the system).
2325message PersistentVolumeClaimVolumeSource {
2326 // ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume.
2327 // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
2328 optional string claimName = 1;
2329
2330 // Will force the ReadOnly setting in VolumeMounts.
2331 // Default false.
2332 // +optional
2333 optional bool readOnly = 2;
2334}
2335
2336// PersistentVolumeList is a list of PersistentVolume items.
2337message PersistentVolumeList {
2338 // Standard list metadata.
2339 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
2340 // +optional
2341 optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
2342
2343 // List of persistent volumes.
2344 // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes
2345 repeated PersistentVolume items = 2;
2346}
2347
2348// PersistentVolumeSource is similar to VolumeSource but meant for the
2349// administrator who creates PVs. Exactly one of its members must be set.
2350message PersistentVolumeSource {
2351 // GCEPersistentDisk represents a GCE Disk resource that is attached to a
2352 // kubelet's host machine and then exposed to the pod. Provisioned by an admin.
2353 // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
2354 // +optional
2355 optional GCEPersistentDiskVolumeSource gcePersistentDisk = 1;
2356
2357 // AWSElasticBlockStore represents an AWS Disk resource that is attached to a
2358 // kubelet's host machine and then exposed to the pod.
2359 // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
2360 // +optional
2361 optional AWSElasticBlockStoreVolumeSource awsElasticBlockStore = 2;
2362
2363 // HostPath represents a directory on the host.
2364 // Provisioned by a developer or tester.
2365 // This is useful for single-node development and testing only!
2366 // On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster.
2367 // More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath
2368 // +optional
2369 optional HostPathVolumeSource hostPath = 3;
2370
2371 // Glusterfs represents a Glusterfs volume that is attached to a host and
2372 // exposed to the pod. Provisioned by an admin.
2373 // More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md
2374 // +optional
2375 optional GlusterfsVolumeSource glusterfs = 4;
2376
2377 // NFS represents an NFS mount on the host. Provisioned by an admin.
2378 // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
2379 // +optional
2380 optional NFSVolumeSource nfs = 5;
2381
2382 // RBD represents a Rados Block Device mount on the host that shares a pod's lifetime.
2383 // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md
2384 // +optional
2385 optional RBDPersistentVolumeSource rbd = 6;
2386
2387 // ISCSI represents an ISCSI Disk resource that is attached to a
2388 // kubelet's host machine and then exposed to the pod. Provisioned by an admin.
2389 // +optional
2390 optional ISCSIPersistentVolumeSource iscsi = 7;
2391
2392 // Cinder represents a cinder volume attached and mounted on kubelets host machine
2393 // More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
2394 // +optional
2395 optional CinderPersistentVolumeSource cinder = 8;
2396
2397 // CephFS represents a Ceph FS mount on the host that shares a pod's lifetime
2398 // +optional
2399 optional CephFSPersistentVolumeSource cephfs = 9;
2400
2401 // FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.
2402 // +optional
2403 optional FCVolumeSource fc = 10;
2404
2405 // Flocker represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running
2406 // +optional
2407 optional FlockerVolumeSource flocker = 11;
2408
2409 // FlexVolume represents a generic volume resource that is
2410 // provisioned/attached using an exec based plugin.
2411 // +optional
2412 optional FlexPersistentVolumeSource flexVolume = 12;
2413
2414 // AzureFile represents an Azure File Service mount on the host and bind mount to the pod.
2415 // +optional
2416 optional AzureFilePersistentVolumeSource azureFile = 13;
2417
2418 // VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine
2419 // +optional
2420 optional VsphereVirtualDiskVolumeSource vsphereVolume = 14;
2421
2422 // Quobyte represents a Quobyte mount on the host that shares a pod's lifetime
2423 // +optional
2424 optional QuobyteVolumeSource quobyte = 15;
2425
2426 // AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
2427 // +optional
2428 optional AzureDiskVolumeSource azureDisk = 16;
2429
2430 // PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine
2431 optional PhotonPersistentDiskVolumeSource photonPersistentDisk = 17;
2432
2433 // PortworxVolume represents a portworx volume attached and mounted on kubelets host machine
2434 // +optional
2435 optional PortworxVolumeSource portworxVolume = 18;
2436
2437 // ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.
2438 // +optional
2439 optional ScaleIOPersistentVolumeSource scaleIO = 19;
2440
2441 // Local represents directly-attached storage with node affinity
2442 // +optional
2443 optional LocalVolumeSource local = 20;
2444
2445 // StorageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod
2446 // More info: https://releases.k8s.io/HEAD/examples/volumes/storageos/README.md
2447 // +optional
2448 optional StorageOSPersistentVolumeSource storageos = 21;
2449
2450 // CSI represents storage that handled by an external CSI driver (Beta feature).
2451 // +optional
2452 optional CSIPersistentVolumeSource csi = 22;
2453}
2454
2455// PersistentVolumeSpec is the specification of a persistent volume.
2456message PersistentVolumeSpec {
2457 // A description of the persistent volume's resources and capacity.
2458 // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity
2459 // +optional
2460 map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> capacity = 1;
2461
2462 // The actual volume backing the persistent volume.
2463 optional PersistentVolumeSource persistentVolumeSource = 2;
2464
2465 // AccessModes contains all ways the volume can be mounted.
2466 // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes
2467 // +optional
2468 repeated string accessModes = 3;
2469
2470 // ClaimRef is part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim.
2471 // Expected to be non-nil when bound.
2472 // claim.VolumeName is the authoritative bind between PV and PVC.
2473 // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding
2474 // +optional
2475 optional ObjectReference claimRef = 4;
2476
2477 // What happens to a persistent volume when released from its claim.
2478 // Valid options are Retain (default for manually created PersistentVolumes), Delete (default
2479 // for dynamically provisioned PersistentVolumes), and Recycle (deprecated).
2480 // Recycle must be supported by the volume plugin underlying this PersistentVolume.
2481 // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming
2482 // +optional
2483 optional string persistentVolumeReclaimPolicy = 5;
2484
2485 // Name of StorageClass to which this persistent volume belongs. Empty value
2486 // means that this volume does not belong to any StorageClass.
2487 // +optional
2488 optional string storageClassName = 6;
2489
2490 // A list of mount options, e.g. ["ro", "soft"]. Not validated - mount will
2491 // simply fail if one is invalid.
2492 // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options
2493 // +optional
2494 repeated string mountOptions = 7;
2495
2496 // volumeMode defines if a volume is intended to be used with a formatted filesystem
2497 // or to remain in raw block state. Value of Filesystem is implied when not included in spec.
2498 // This is an alpha feature and may change in the future.
2499 // +optional
2500 optional string volumeMode = 8;
2501
2502 // NodeAffinity defines constraints that limit what nodes this volume can be accessed from.
2503 // This field influences the scheduling of pods that use this volume.
2504 // +optional
2505 optional VolumeNodeAffinity nodeAffinity = 9;
2506}
2507
2508// PersistentVolumeStatus is the current status of a persistent volume.
2509message PersistentVolumeStatus {
2510 // Phase indicates if a volume is available, bound to a claim, or released by a claim.
2511 // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#phase
2512 // +optional
2513 optional string phase = 1;
2514
2515 // A human-readable message indicating details about why the volume is in this state.
2516 // +optional
2517 optional string message = 2;
2518
2519 // Reason is a brief CamelCase string that describes any failure and is meant
2520 // for machine parsing and tidy display in the CLI.
2521 // +optional
2522 optional string reason = 3;
2523}
2524
2525// Represents a Photon Controller persistent disk resource.
2526message PhotonPersistentDiskVolumeSource {
2527 // ID that identifies Photon Controller persistent disk
2528 optional string pdID = 1;
2529
2530 // Filesystem type to mount.
2531 // Must be a filesystem type supported by the host operating system.
2532 // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
2533 optional string fsType = 2;
2534}
2535
2536// Pod is a collection of containers that can run on a host. This resource is created
2537// by clients and scheduled onto hosts.
2538message Pod {
2539 // Standard object's metadata.
2540 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
2541 // +optional
2542 optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
2543
2544 // Specification of the desired behavior of the pod.
2545 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
2546 // +optional
2547 optional PodSpec spec = 2;
2548
2549 // Most recently observed status of the pod.
2550 // This data may not be up to date.
2551 // Populated by the system.
2552 // Read-only.
2553 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
2554 // +optional
2555 optional PodStatus status = 3;
2556}
2557
2558// Pod affinity is a group of inter pod affinity scheduling rules.
2559message PodAffinity {
2560 // If the affinity requirements specified by this field are not met at
2561 // scheduling time, the pod will not be scheduled onto the node.
2562 // If the affinity requirements specified by this field cease to be met
2563 // at some point during pod execution (e.g. due to a pod label update), the
2564 // system may or may not try to eventually evict the pod from its node.
2565 // When there are multiple elements, the lists of nodes corresponding to each
2566 // podAffinityTerm are intersected, i.e. all terms must be satisfied.
2567 // +optional
2568 repeated PodAffinityTerm requiredDuringSchedulingIgnoredDuringExecution = 1;
2569
2570 // The scheduler will prefer to schedule pods to nodes that satisfy
2571 // the affinity expressions specified by this field, but it may choose
2572 // a node that violates one or more of the expressions. The node that is
2573 // most preferred is the one with the greatest sum of weights, i.e.
2574 // for each node that meets all of the scheduling requirements (resource
2575 // request, requiredDuringScheduling affinity expressions, etc.),
2576 // compute a sum by iterating through the elements of this field and adding
2577 // "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the
2578 // node(s) with the highest sum are the most preferred.
2579 // +optional
2580 repeated WeightedPodAffinityTerm preferredDuringSchedulingIgnoredDuringExecution = 2;
2581}
2582
2583// Defines a set of pods (namely those matching the labelSelector
2584// relative to the given namespace(s)) that this pod should be
2585// co-located (affinity) or not co-located (anti-affinity) with,
2586// where co-located is defined as running on a node whose value of
2587// the label with key <topologyKey> matches that of any node on which
2588// a pod of the set of pods is running
2589message PodAffinityTerm {
2590 // A label query over a set of resources, in this case pods.
2591 // +optional
2592 optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector labelSelector = 1;
2593
2594 // namespaces specifies which namespaces the labelSelector applies to (matches against);
2595 // null or empty list means "this pod's namespace"
2596 // +optional
2597 repeated string namespaces = 2;
2598
2599 // This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching
2600 // the labelSelector in the specified namespaces, where co-located is defined as running on a node
2601 // whose value of the label with key topologyKey matches that of any node on which any of the
2602 // selected pods is running.
2603 // Empty topologyKey is not allowed.
2604 optional string topologyKey = 3;
2605}
2606
2607// Pod anti affinity is a group of inter pod anti affinity scheduling rules.
2608message PodAntiAffinity {
2609 // If the anti-affinity requirements specified by this field are not met at
2610 // scheduling time, the pod will not be scheduled onto the node.
2611 // If the anti-affinity requirements specified by this field cease to be met
2612 // at some point during pod execution (e.g. due to a pod label update), the
2613 // system may or may not try to eventually evict the pod from its node.
2614 // When there are multiple elements, the lists of nodes corresponding to each
2615 // podAffinityTerm are intersected, i.e. all terms must be satisfied.
2616 // +optional
2617 repeated PodAffinityTerm requiredDuringSchedulingIgnoredDuringExecution = 1;
2618
2619 // The scheduler will prefer to schedule pods to nodes that satisfy
2620 // the anti-affinity expressions specified by this field, but it may choose
2621 // a node that violates one or more of the expressions. The node that is
2622 // most preferred is the one with the greatest sum of weights, i.e.
2623 // for each node that meets all of the scheduling requirements (resource
2624 // request, requiredDuringScheduling anti-affinity expressions, etc.),
2625 // compute a sum by iterating through the elements of this field and adding
2626 // "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the
2627 // node(s) with the highest sum are the most preferred.
2628 // +optional
2629 repeated WeightedPodAffinityTerm preferredDuringSchedulingIgnoredDuringExecution = 2;
2630}
2631
2632// PodAttachOptions is the query options to a Pod's remote attach call.
2633// ---
2634// TODO: merge w/ PodExecOptions below for stdin, stdout, etc
2635// and also when we cut V2, we should export a "StreamOptions" or somesuch that contains Stdin, Stdout, Stder and TTY
2636message PodAttachOptions {
2637 // Stdin if true, redirects the standard input stream of the pod for this call.
2638 // Defaults to false.
2639 // +optional
2640 optional bool stdin = 1;
2641
2642 // Stdout if true indicates that stdout is to be redirected for the attach call.
2643 // Defaults to true.
2644 // +optional
2645 optional bool stdout = 2;
2646
2647 // Stderr if true indicates that stderr is to be redirected for the attach call.
2648 // Defaults to true.
2649 // +optional
2650 optional bool stderr = 3;
2651
2652 // TTY if true indicates that a tty will be allocated for the attach call.
2653 // This is passed through the container runtime so the tty
2654 // is allocated on the worker node by the container runtime.
2655 // Defaults to false.
2656 // +optional
2657 optional bool tty = 4;
2658
2659 // The container in which to execute the command.
2660 // Defaults to only container if there is only one container in the pod.
2661 // +optional
2662 optional string container = 5;
2663}
2664
2665// PodCondition contains details for the current condition of this pod.
2666message PodCondition {
2667 // Type is the type of the condition.
2668 // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions
2669 optional string type = 1;
2670
2671 // Status is the status of the condition.
2672 // Can be True, False, Unknown.
2673 // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions
2674 optional string status = 2;
2675
2676 // Last time we probed the condition.
2677 // +optional
2678 optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastProbeTime = 3;
2679
2680 // Last time the condition transitioned from one status to another.
2681 // +optional
2682 optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 4;
2683
2684 // Unique, one-word, CamelCase reason for the condition's last transition.
2685 // +optional
2686 optional string reason = 5;
2687
2688 // Human-readable message indicating details about last transition.
2689 // +optional
2690 optional string message = 6;
2691}
2692
2693// PodDNSConfig defines the DNS parameters of a pod in addition to
2694// those generated from DNSPolicy.
2695message PodDNSConfig {
2696 // A list of DNS name server IP addresses.
2697 // This will be appended to the base nameservers generated from DNSPolicy.
2698 // Duplicated nameservers will be removed.
2699 // +optional
2700 repeated string nameservers = 1;
2701
2702 // A list of DNS search domains for host-name lookup.
2703 // This will be appended to the base search paths generated from DNSPolicy.
2704 // Duplicated search paths will be removed.
2705 // +optional
2706 repeated string searches = 2;
2707
2708 // A list of DNS resolver options.
2709 // This will be merged with the base options generated from DNSPolicy.
2710 // Duplicated entries will be removed. Resolution options given in Options
2711 // will override those that appear in the base DNSPolicy.
2712 // +optional
2713 repeated PodDNSConfigOption options = 3;
2714}
2715
2716// PodDNSConfigOption defines DNS resolver options of a pod.
2717message PodDNSConfigOption {
2718 // Required.
2719 optional string name = 1;
2720
2721 // +optional
2722 optional string value = 2;
2723}
2724
2725// PodExecOptions is the query options to a Pod's remote exec call.
2726// ---
2727// TODO: This is largely identical to PodAttachOptions above, make sure they stay in sync and see about merging
2728// and also when we cut V2, we should export a "StreamOptions" or somesuch that contains Stdin, Stdout, Stder and TTY
2729message PodExecOptions {
2730 // Redirect the standard input stream of the pod for this call.
2731 // Defaults to false.
2732 // +optional
2733 optional bool stdin = 1;
2734
2735 // Redirect the standard output stream of the pod for this call.
2736 // Defaults to true.
2737 // +optional
2738 optional bool stdout = 2;
2739
2740 // Redirect the standard error stream of the pod for this call.
2741 // Defaults to true.
2742 // +optional
2743 optional bool stderr = 3;
2744
2745 // TTY if true indicates that a tty will be allocated for the exec call.
2746 // Defaults to false.
2747 // +optional
2748 optional bool tty = 4;
2749
2750 // Container in which to execute the command.
2751 // Defaults to only container if there is only one container in the pod.
2752 // +optional
2753 optional string container = 5;
2754
2755 // Command is the remote command to execute. argv array. Not executed within a shell.
2756 repeated string command = 6;
2757}
2758
2759// PodList is a list of Pods.
2760message PodList {
2761 // Standard list metadata.
2762 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
2763 // +optional
2764 optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
2765
2766 // List of pods.
2767 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md
2768 repeated Pod items = 2;
2769}
2770
2771// PodLogOptions is the query options for a Pod's logs REST call.
2772message PodLogOptions {
2773 // The container for which to stream logs. Defaults to only container if there is one container in the pod.
2774 // +optional
2775 optional string container = 1;
2776
2777 // Follow the log stream of the pod. Defaults to false.
2778 // +optional
2779 optional bool follow = 2;
2780
2781 // Return previous terminated container logs. Defaults to false.
2782 // +optional
2783 optional bool previous = 3;
2784
2785 // A relative time in seconds before the current time from which to show logs. If this value
2786 // precedes the time a pod was started, only logs since the pod start will be returned.
2787 // If this value is in the future, no logs will be returned.
2788 // Only one of sinceSeconds or sinceTime may be specified.
2789 // +optional
2790 optional int64 sinceSeconds = 4;
2791
2792 // An RFC3339 timestamp from which to show logs. If this value
2793 // precedes the time a pod was started, only logs since the pod start will be returned.
2794 // If this value is in the future, no logs will be returned.
2795 // Only one of sinceSeconds or sinceTime may be specified.
2796 // +optional
2797 optional k8s.io.apimachinery.pkg.apis.meta.v1.Time sinceTime = 5;
2798
2799 // If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line
2800 // of log output. Defaults to false.
2801 // +optional
2802 optional bool timestamps = 6;
2803
2804 // If set, the number of lines from the end of the logs to show. If not specified,
2805 // logs are shown from the creation of the container or sinceSeconds or sinceTime
2806 // +optional
2807 optional int64 tailLines = 7;
2808
2809 // If set, the number of bytes to read from the server before terminating the
2810 // log output. This may not display a complete final line of logging, and may return
2811 // slightly more or slightly less than the specified limit.
2812 // +optional
2813 optional int64 limitBytes = 8;
2814}
2815
2816// PodPortForwardOptions is the query options to a Pod's port forward call
2817// when using WebSockets.
2818// The `port` query parameter must specify the port or
2819// ports (comma separated) to forward over.
2820// Port forwarding over SPDY does not use these options. It requires the port
2821// to be passed in the `port` header as part of request.
2822message PodPortForwardOptions {
2823 // List of ports to forward
2824 // Required when using WebSockets
2825 // +optional
2826 repeated int32 ports = 1;
2827}
2828
2829// PodProxyOptions is the query options to a Pod's proxy call.
2830message PodProxyOptions {
2831 // Path is the URL path to use for the current proxy request to pod.
2832 // +optional
2833 optional string path = 1;
2834}
2835
2836// PodReadinessGate contains the reference to a pod condition
2837message PodReadinessGate {
2838 // ConditionType refers to a condition in the pod's condition list with matching type.
2839 optional string conditionType = 1;
2840}
2841
2842// PodSecurityContext holds pod-level security attributes and common container settings.
2843// Some fields are also present in container.securityContext. Field values of
2844// container.securityContext take precedence over field values of PodSecurityContext.
2845message PodSecurityContext {
2846 // The SELinux context to be applied to all containers.
2847 // If unspecified, the container runtime will allocate a random SELinux context for each
2848 // container. May also be set in SecurityContext. If set in
2849 // both SecurityContext and PodSecurityContext, the value specified in SecurityContext
2850 // takes precedence for that container.
2851 // +optional
2852 optional SELinuxOptions seLinuxOptions = 1;
2853
2854 // The UID to run the entrypoint of the container process.
2855 // Defaults to user specified in image metadata if unspecified.
2856 // May also be set in SecurityContext. If set in both SecurityContext and
2857 // PodSecurityContext, the value specified in SecurityContext takes precedence
2858 // for that container.
2859 // +optional
2860 optional int64 runAsUser = 2;
2861
2862 // The GID to run the entrypoint of the container process.
2863 // Uses runtime default if unset.
2864 // May also be set in SecurityContext. If set in both SecurityContext and
2865 // PodSecurityContext, the value specified in SecurityContext takes precedence
2866 // for that container.
2867 // +optional
2868 optional int64 runAsGroup = 6;
2869
2870 // Indicates that the container must run as a non-root user.
2871 // If true, the Kubelet will validate the image at runtime to ensure that it
2872 // does not run as UID 0 (root) and fail to start the container if it does.
2873 // If unset or false, no such validation will be performed.
2874 // May also be set in SecurityContext. If set in both SecurityContext and
2875 // PodSecurityContext, the value specified in SecurityContext takes precedence.
2876 // +optional
2877 optional bool runAsNonRoot = 3;
2878
2879 // A list of groups applied to the first process run in each container, in addition
2880 // to the container's primary GID. If unspecified, no groups will be added to
2881 // any container.
2882 // +optional
2883 repeated int64 supplementalGroups = 4;
2884
2885 // A special supplemental group that applies to all containers in a pod.
2886 // Some volume types allow the Kubelet to change the ownership of that volume
2887 // to be owned by the pod:
2888 //
2889 // 1. The owning GID will be the FSGroup
2890 // 2. The setgid bit is set (new files created in the volume will be owned by FSGroup)
2891 // 3. The permission bits are OR'd with rw-rw----
2892 //
2893 // If unset, the Kubelet will not modify the ownership and permissions of any volume.
2894 // +optional
2895 optional int64 fsGroup = 5;
2896
2897 // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported
2898 // sysctls (by the container runtime) might fail to launch.
2899 // +optional
2900 repeated Sysctl sysctls = 7;
2901}
2902
2903// Describes the class of pods that should avoid this node.
2904// Exactly one field should be set.
2905message PodSignature {
2906 // Reference to controller whose pods should avoid this node.
2907 // +optional
2908 optional k8s.io.apimachinery.pkg.apis.meta.v1.OwnerReference podController = 1;
2909}
2910
2911// PodSpec is a description of a pod.
2912message PodSpec {
2913 // List of volumes that can be mounted by containers belonging to the pod.
2914 // More info: https://kubernetes.io/docs/concepts/storage/volumes
2915 // +optional
2916 // +patchMergeKey=name
2917 // +patchStrategy=merge,retainKeys
2918 repeated Volume volumes = 1;
2919
2920 // List of initialization containers belonging to the pod.
2921 // Init containers are executed in order prior to containers being started. If any
2922 // init container fails, the pod is considered to have failed and is handled according
2923 // to its restartPolicy. The name for an init container or normal container must be
2924 // unique among all containers.
2925 // Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes.
2926 // The resourceRequirements of an init container are taken into account during scheduling
2927 // by finding the highest request/limit for each resource type, and then using the max of
2928 // of that value or the sum of the normal containers. Limits are applied to init containers
2929 // in a similar fashion.
2930 // Init containers cannot currently be added or removed.
2931 // Cannot be updated.
2932 // More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
2933 // +patchMergeKey=name
2934 // +patchStrategy=merge
2935 repeated Container initContainers = 20;
2936
2937 // List of containers belonging to the pod.
2938 // Containers cannot currently be added or removed.
2939 // There must be at least one container in a Pod.
2940 // Cannot be updated.
2941 // +patchMergeKey=name
2942 // +patchStrategy=merge
2943 repeated Container containers = 2;
2944
2945 // Restart policy for all containers within the pod.
2946 // One of Always, OnFailure, Never.
2947 // Default to Always.
2948 // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy
2949 // +optional
2950 optional string restartPolicy = 3;
2951
2952 // Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request.
2953 // Value must be non-negative integer. The value zero indicates delete immediately.
2954 // If this value is nil, the default grace period will be used instead.
2955 // The grace period is the duration in seconds after the processes running in the pod are sent
2956 // a termination signal and the time when the processes are forcibly halted with a kill signal.
2957 // Set this value longer than the expected cleanup time for your process.
2958 // Defaults to 30 seconds.
2959 // +optional
2960 optional int64 terminationGracePeriodSeconds = 4;
2961
2962 // Optional duration in seconds the pod may be active on the node relative to
2963 // StartTime before the system will actively try to mark it failed and kill associated containers.
2964 // Value must be a positive integer.
2965 // +optional
2966 optional int64 activeDeadlineSeconds = 5;
2967
2968 // Set DNS policy for the pod.
2969 // Defaults to "ClusterFirst".
2970 // Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'.
2971 // DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy.
2972 // To have DNS options set along with hostNetwork, you have to specify DNS policy
2973 // explicitly to 'ClusterFirstWithHostNet'.
2974 // +optional
2975 optional string dnsPolicy = 6;
2976
2977 // NodeSelector is a selector which must be true for the pod to fit on a node.
2978 // Selector which must match a node's labels for the pod to be scheduled on that node.
2979 // More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
2980 // +optional
2981 map<string, string> nodeSelector = 7;
2982
2983 // ServiceAccountName is the name of the ServiceAccount to use to run this pod.
2984 // More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
2985 // +optional
2986 optional string serviceAccountName = 8;
2987
2988 // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName.
2989 // Deprecated: Use serviceAccountName instead.
2990 // +k8s:conversion-gen=false
2991 // +optional
2992 optional string serviceAccount = 9;
2993
2994 // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted.
2995 // +optional
2996 optional bool automountServiceAccountToken = 21;
2997
2998 // NodeName is a request to schedule this pod onto a specific node. If it is non-empty,
2999 // the scheduler simply schedules this pod onto that node, assuming that it fits resource
3000 // requirements.
3001 // +optional
3002 optional string nodeName = 10;
3003
3004 // Host networking requested for this pod. Use the host's network namespace.
3005 // If this option is set, the ports that will be used must be specified.
3006 // Default to false.
3007 // +k8s:conversion-gen=false
3008 // +optional
3009 optional bool hostNetwork = 11;
3010
3011 // Use the host's pid namespace.
3012 // Optional: Default to false.
3013 // +k8s:conversion-gen=false
3014 // +optional
3015 optional bool hostPID = 12;
3016
3017 // Use the host's ipc namespace.
3018 // Optional: Default to false.
3019 // +k8s:conversion-gen=false
3020 // +optional
3021 optional bool hostIPC = 13;
3022
3023 // Share a single process namespace between all of the containers in a pod.
3024 // When this is set containers will be able to view and signal processes from other containers
3025 // in the same pod, and the first process in each container will not be assigned PID 1.
3026 // HostPID and ShareProcessNamespace cannot both be set.
3027 // Optional: Default to false.
3028 // This field is alpha-level and is honored only by servers that enable the PodShareProcessNamespace feature.
3029 // +k8s:conversion-gen=false
3030 // +optional
3031 optional bool shareProcessNamespace = 27;
3032
3033 // SecurityContext holds pod-level security attributes and common container settings.
3034 // Optional: Defaults to empty. See type description for default values of each field.
3035 // +optional
3036 optional PodSecurityContext securityContext = 14;
3037
3038 // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec.
3039 // If specified, these secrets will be passed to individual puller implementations for them to use. For example,
3040 // in the case of docker, only DockerConfig type secrets are honored.
3041 // More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod
3042 // +optional
3043 // +patchMergeKey=name
3044 // +patchStrategy=merge
3045 repeated LocalObjectReference imagePullSecrets = 15;
3046
3047 // Specifies the hostname of the Pod
3048 // If not specified, the pod's hostname will be set to a system-defined value.
3049 // +optional
3050 optional string hostname = 16;
3051
3052 // If specified, the fully qualified Pod hostname will be "<hostname>.<subdomain>.<pod namespace>.svc.<cluster domain>".
3053 // If not specified, the pod will not have a domainname at all.
3054 // +optional
3055 optional string subdomain = 17;
3056
3057 // If specified, the pod's scheduling constraints
3058 // +optional
3059 optional Affinity affinity = 18;
3060
3061 // If specified, the pod will be dispatched by specified scheduler.
3062 // If not specified, the pod will be dispatched by default scheduler.
3063 // +optional
3064 optional string schedulerName = 19;
3065
3066 // If specified, the pod's tolerations.
3067 // +optional
3068 repeated Toleration tolerations = 22;
3069
3070 // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts
3071 // file if specified. This is only valid for non-hostNetwork pods.
3072 // +optional
3073 // +patchMergeKey=ip
3074 // +patchStrategy=merge
3075 repeated HostAlias hostAliases = 23;
3076
3077 // If specified, indicates the pod's priority. "system-node-critical" and
3078 // "system-cluster-critical" are two special keywords which indicate the
3079 // highest priorities with the former being the highest priority. Any other
3080 // name must be defined by creating a PriorityClass object with that name.
3081 // If not specified, the pod priority will be default or zero if there is no
3082 // default.
3083 // +optional
3084 optional string priorityClassName = 24;
3085
3086 // The priority value. Various system components use this field to find the
3087 // priority of the pod. When Priority Admission Controller is enabled, it
3088 // prevents users from setting this field. The admission controller populates
3089 // this field from PriorityClassName.
3090 // The higher the value, the higher the priority.
3091 // +optional
3092 optional int32 priority = 25;
3093
3094 // Specifies the DNS parameters of a pod.
3095 // Parameters specified here will be merged to the generated DNS
3096 // configuration based on DNSPolicy.
3097 // +optional
3098 optional PodDNSConfig dnsConfig = 26;
3099
3100 // If specified, all readiness gates will be evaluated for pod readiness.
3101 // A pod is ready when all its containers are ready AND
3102 // all conditions specified in the readiness gates have status equal to "True"
3103 // More info: https://github.com/kubernetes/community/blob/master/keps/sig-network/0007-pod-ready%2B%2B.md
3104 // +optional
3105 repeated PodReadinessGate readinessGates = 28;
3106}
3107
3108// PodStatus represents information about the status of a pod. Status may trail the actual
3109// state of a system, especially if the node that hosts the pod cannot contact the control
3110// plane.
3111message PodStatus {
3112 // The phase of a Pod is a simple, high-level summary of where the Pod is in its lifecycle.
3113 // The conditions array, the reason and message fields, and the individual container status
3114 // arrays contain more detail about the pod's status.
3115 // There are five possible phase values:
3116 //
3117 // Pending: The pod has been accepted by the Kubernetes system, but one or more of the
3118 // container images has not been created. This includes time before being scheduled as
3119 // well as time spent downloading images over the network, which could take a while.
3120 // Running: The pod has been bound to a node, and all of the containers have been created.
3121 // At least one container is still running, or is in the process of starting or restarting.
3122 // Succeeded: All containers in the pod have terminated in success, and will not be restarted.
3123 // Failed: All containers in the pod have terminated, and at least one container has
3124 // terminated in failure. The container either exited with non-zero status or was terminated
3125 // by the system.
3126 // Unknown: For some reason the state of the pod could not be obtained, typically due to an
3127 // error in communicating with the host of the pod.
3128 //
3129 // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-phase
3130 // +optional
3131 optional string phase = 1;
3132
3133 // Current service state of pod.
3134 // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions
3135 // +optional
3136 // +patchMergeKey=type
3137 // +patchStrategy=merge
3138 repeated PodCondition conditions = 2;
3139
3140 // A human readable message indicating details about why the pod is in this condition.
3141 // +optional
3142 optional string message = 3;
3143
3144 // A brief CamelCase message indicating details about why the pod is in this state.
3145 // e.g. 'Evicted'
3146 // +optional
3147 optional string reason = 4;
3148
3149 // nominatedNodeName is set only when this pod preempts other pods on the node, but it cannot be
3150 // scheduled right away as preemption victims receive their graceful termination periods.
3151 // This field does not guarantee that the pod will be scheduled on this node. Scheduler may decide
3152 // to place the pod elsewhere if other nodes become available sooner. Scheduler may also decide to
3153 // give the resources on this node to a higher priority pod that is created after preemption.
3154 // As a result, this field may be different than PodSpec.nodeName when the pod is
3155 // scheduled.
3156 // +optional
3157 optional string nominatedNodeName = 11;
3158
3159 // IP address of the host to which the pod is assigned. Empty if not yet scheduled.
3160 // +optional
3161 optional string hostIP = 5;
3162
3163 // IP address allocated to the pod. Routable at least within the cluster.
3164 // Empty if not yet allocated.
3165 // +optional
3166 optional string podIP = 6;
3167
3168 // RFC 3339 date and time at which the object was acknowledged by the Kubelet.
3169 // This is before the Kubelet pulled the container image(s) for the pod.
3170 // +optional
3171 optional k8s.io.apimachinery.pkg.apis.meta.v1.Time startTime = 7;
3172
3173 // The list has one entry per init container in the manifest. The most recent successful
3174 // init container will have ready = true, the most recently started container will have
3175 // startTime set.
3176 // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status
3177 repeated ContainerStatus initContainerStatuses = 10;
3178
3179 // The list has one entry per container in the manifest. Each entry is currently the output
3180 // of `docker inspect`.
3181 // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status
3182 // +optional
3183 repeated ContainerStatus containerStatuses = 8;
3184
3185 // The Quality of Service (QOS) classification assigned to the pod based on resource requirements
3186 // See PodQOSClass type for available QOS classes
3187 // More info: https://git.k8s.io/community/contributors/design-proposals/node/resource-qos.md
3188 // +optional
3189 optional string qosClass = 9;
3190}
3191
3192// PodStatusResult is a wrapper for PodStatus returned by kubelet that can be encode/decoded
3193message PodStatusResult {
3194 // Standard object's metadata.
3195 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
3196 // +optional
3197 optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
3198
3199 // Most recently observed status of the pod.
3200 // This data may not be up to date.
3201 // Populated by the system.
3202 // Read-only.
3203 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
3204 // +optional
3205 optional PodStatus status = 2;
3206}
3207
3208// PodTemplate describes a template for creating copies of a predefined pod.
3209message PodTemplate {
3210 // Standard object's metadata.
3211 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
3212 // +optional
3213 optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
3214
3215 // Template defines the pods that will be created from this pod template.
3216 // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
3217 // +optional
3218 optional PodTemplateSpec template = 2;
3219}
3220
3221// PodTemplateList is a list of PodTemplates.
3222message PodTemplateList {
3223 // Standard list metadata.
3224 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
3225 // +optional
3226 optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
3227
3228 // List of pod templates
3229 repeated PodTemplate items = 2;
3230}
3231
3232// PodTemplateSpec describes the data a pod should have when created from a template
3233message PodTemplateSpec {
3234 // Standard object's metadata.
3235 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
3236 // +optional
3237 optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
3238
3239 // Specification of the desired behavior of the pod.
3240 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
3241 // +optional
3242 optional PodSpec spec = 2;
3243}
3244
3245// PortworxVolumeSource represents a Portworx volume resource.
3246message PortworxVolumeSource {
3247 // VolumeID uniquely identifies a Portworx volume
3248 optional string volumeID = 1;
3249
3250 // FSType represents the filesystem type to mount
3251 // Must be a filesystem type supported by the host operating system.
3252 // Ex. "ext4", "xfs". Implicitly inferred to be "ext4" if unspecified.
3253 optional string fsType = 2;
3254
3255 // Defaults to false (read/write). ReadOnly here will force
3256 // the ReadOnly setting in VolumeMounts.
3257 // +optional
3258 optional bool readOnly = 3;
3259}
3260
3261// Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.
3262// +k8s:openapi-gen=false
3263message Preconditions {
3264 // Specifies the target UID.
3265 // +optional
3266 optional string uid = 1;
3267}
3268
3269// Describes a class of pods that should avoid this node.
3270message PreferAvoidPodsEntry {
3271 // The class of pods.
3272 optional PodSignature podSignature = 1;
3273
3274 // Time at which this entry was added to the list.
3275 // +optional
3276 optional k8s.io.apimachinery.pkg.apis.meta.v1.Time evictionTime = 2;
3277
3278 // (brief) reason why this entry was added to the list.
3279 // +optional
3280 optional string reason = 3;
3281
3282 // Human readable message indicating why this entry was added to the list.
3283 // +optional
3284 optional string message = 4;
3285}
3286
3287// An empty preferred scheduling term matches all objects with implicit weight 0
3288// (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).
3289message PreferredSchedulingTerm {
3290 // Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.
3291 optional int32 weight = 1;
3292
3293 // A node selector term, associated with the corresponding weight.
3294 optional NodeSelectorTerm preference = 2;
3295}
3296
3297// Probe describes a health check to be performed against a container to determine whether it is
3298// alive or ready to receive traffic.
3299message Probe {
3300 // The action taken to determine the health of a container
3301 optional Handler handler = 1;
3302
3303 // Number of seconds after the container has started before liveness probes are initiated.
3304 // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
3305 // +optional
3306 optional int32 initialDelaySeconds = 2;
3307
3308 // Number of seconds after which the probe times out.
3309 // Defaults to 1 second. Minimum value is 1.
3310 // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
3311 // +optional
3312 optional int32 timeoutSeconds = 3;
3313
3314 // How often (in seconds) to perform the probe.
3315 // Default to 10 seconds. Minimum value is 1.
3316 // +optional
3317 optional int32 periodSeconds = 4;
3318
3319 // Minimum consecutive successes for the probe to be considered successful after having failed.
3320 // Defaults to 1. Must be 1 for liveness. Minimum value is 1.
3321 // +optional
3322 optional int32 successThreshold = 5;
3323
3324 // Minimum consecutive failures for the probe to be considered failed after having succeeded.
3325 // Defaults to 3. Minimum value is 1.
3326 // +optional
3327 optional int32 failureThreshold = 6;
3328}
3329
3330// Represents a projected volume source
3331message ProjectedVolumeSource {
3332 // list of volume projections
3333 repeated VolumeProjection sources = 1;
3334
3335 // Mode bits to use on created files by default. Must be a value between
3336 // 0 and 0777.
3337 // Directories within the path are not affected by this setting.
3338 // This might be in conflict with other options that affect the file
3339 // mode, like fsGroup, and the result can be other mode bits set.
3340 // +optional
3341 optional int32 defaultMode = 2;
3342}
3343
3344// Represents a Quobyte mount that lasts the lifetime of a pod.
3345// Quobyte volumes do not support ownership management or SELinux relabeling.
3346message QuobyteVolumeSource {
3347 // Registry represents a single or multiple Quobyte Registry services
3348 // specified as a string as host:port pair (multiple entries are separated with commas)
3349 // which acts as the central registry for volumes
3350 optional string registry = 1;
3351
3352 // Volume is a string that references an already created Quobyte volume by name.
3353 optional string volume = 2;
3354
3355 // ReadOnly here will force the Quobyte volume to be mounted with read-only permissions.
3356 // Defaults to false.
3357 // +optional
3358 optional bool readOnly = 3;
3359
3360 // User to map volume access to
3361 // Defaults to serivceaccount user
3362 // +optional
3363 optional string user = 4;
3364
3365 // Group to map volume access to
3366 // Default is no group
3367 // +optional
3368 optional string group = 5;
3369}
3370
3371// Represents a Rados Block Device mount that lasts the lifetime of a pod.
3372// RBD volumes support ownership management and SELinux relabeling.
3373message RBDPersistentVolumeSource {
3374 // A collection of Ceph monitors.
3375 // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
3376 repeated string monitors = 1;
3377
3378 // The rados image name.
3379 // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
3380 optional string image = 2;
3381
3382 // Filesystem type of the volume that you want to mount.
3383 // Tip: Ensure that the filesystem type is supported by the host operating system.
3384 // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
3385 // More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd
3386 // TODO: how do we prevent errors in the filesystem from compromising the machine
3387 // +optional
3388 optional string fsType = 3;
3389
3390 // The rados pool name.
3391 // Default is rbd.
3392 // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
3393 // +optional
3394 optional string pool = 4;
3395
3396 // The rados user name.
3397 // Default is admin.
3398 // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
3399 // +optional
3400 optional string user = 5;
3401
3402 // Keyring is the path to key ring for RBDUser.
3403 // Default is /etc/ceph/keyring.
3404 // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
3405 // +optional
3406 optional string keyring = 6;
3407
3408 // SecretRef is name of the authentication secret for RBDUser. If provided
3409 // overrides keyring.
3410 // Default is nil.
3411 // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
3412 // +optional
3413 optional SecretReference secretRef = 7;
3414
3415 // ReadOnly here will force the ReadOnly setting in VolumeMounts.
3416 // Defaults to false.
3417 // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
3418 // +optional
3419 optional bool readOnly = 8;
3420}
3421
3422// Represents a Rados Block Device mount that lasts the lifetime of a pod.
3423// RBD volumes support ownership management and SELinux relabeling.
3424message RBDVolumeSource {
3425 // A collection of Ceph monitors.
3426 // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
3427 repeated string monitors = 1;
3428
3429 // The rados image name.
3430 // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
3431 optional string image = 2;
3432
3433 // Filesystem type of the volume that you want to mount.
3434 // Tip: Ensure that the filesystem type is supported by the host operating system.
3435 // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
3436 // More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd
3437 // TODO: how do we prevent errors in the filesystem from compromising the machine
3438 // +optional
3439 optional string fsType = 3;
3440
3441 // The rados pool name.
3442 // Default is rbd.
3443 // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
3444 // +optional
3445 optional string pool = 4;
3446
3447 // The rados user name.
3448 // Default is admin.
3449 // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
3450 // +optional
3451 optional string user = 5;
3452
3453 // Keyring is the path to key ring for RBDUser.
3454 // Default is /etc/ceph/keyring.
3455 // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
3456 // +optional
3457 optional string keyring = 6;
3458
3459 // SecretRef is name of the authentication secret for RBDUser. If provided
3460 // overrides keyring.
3461 // Default is nil.
3462 // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
3463 // +optional
3464 optional LocalObjectReference secretRef = 7;
3465
3466 // ReadOnly here will force the ReadOnly setting in VolumeMounts.
3467 // Defaults to false.
3468 // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
3469 // +optional
3470 optional bool readOnly = 8;
3471}
3472
3473// RangeAllocation is not a public type.
3474message RangeAllocation {
3475 // Standard object's metadata.
3476 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
3477 // +optional
3478 optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
3479
3480 // Range is string that identifies the range represented by 'data'.
3481 optional string range = 2;
3482
3483 // Data is a bit array containing all allocated addresses in the previous segment.
3484 optional bytes data = 3;
3485}
3486
3487// ReplicationController represents the configuration of a replication controller.
3488message ReplicationController {
3489 // If the Labels of a ReplicationController are empty, they are defaulted to
3490 // be the same as the Pod(s) that the replication controller manages.
3491 // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
3492 // +optional
3493 optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
3494
3495 // Spec defines the specification of the desired behavior of the replication controller.
3496 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
3497 // +optional
3498 optional ReplicationControllerSpec spec = 2;
3499
3500 // Status is the most recently observed status of the replication controller.
3501 // This data may be out of date by some window of time.
3502 // Populated by the system.
3503 // Read-only.
3504 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
3505 // +optional
3506 optional ReplicationControllerStatus status = 3;
3507}
3508
3509// ReplicationControllerCondition describes the state of a replication controller at a certain point.
3510message ReplicationControllerCondition {
3511 // Type of replication controller condition.
3512 optional string type = 1;
3513
3514 // Status of the condition, one of True, False, Unknown.
3515 optional string status = 2;
3516
3517 // The last time the condition transitioned from one status to another.
3518 // +optional
3519 optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3;
3520
3521 // The reason for the condition's last transition.
3522 // +optional
3523 optional string reason = 4;
3524
3525 // A human readable message indicating details about the transition.
3526 // +optional
3527 optional string message = 5;
3528}
3529
3530// ReplicationControllerList is a collection of replication controllers.
3531message ReplicationControllerList {
3532 // Standard list metadata.
3533 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
3534 // +optional
3535 optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
3536
3537 // List of replication controllers.
3538 // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller
3539 repeated ReplicationController items = 2;
3540}
3541
3542// ReplicationControllerSpec is the specification of a replication controller.
3543message ReplicationControllerSpec {
3544 // Replicas is the number of desired replicas.
3545 // This is a pointer to distinguish between explicit zero and unspecified.
3546 // Defaults to 1.
3547 // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller
3548 // +optional
3549 optional int32 replicas = 1;
3550
3551 // Minimum number of seconds for which a newly created pod should be ready
3552 // without any of its container crashing, for it to be considered available.
3553 // Defaults to 0 (pod will be considered available as soon as it is ready)
3554 // +optional
3555 optional int32 minReadySeconds = 4;
3556
3557 // Selector is a label query over pods that should match the Replicas count.
3558 // If Selector is empty, it is defaulted to the labels present on the Pod template.
3559 // Label keys and values that must match in order to be controlled by this replication
3560 // controller, if empty defaulted to labels on Pod template.
3561 // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
3562 // +optional
3563 map<string, string> selector = 2;
3564
3565 // Template is the object that describes the pod that will be created if
3566 // insufficient replicas are detected. This takes precedence over a TemplateRef.
3567 // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template
3568 // +optional
3569 optional PodTemplateSpec template = 3;
3570}
3571
3572// ReplicationControllerStatus represents the current status of a replication
3573// controller.
3574message ReplicationControllerStatus {
3575 // Replicas is the most recently oberved number of replicas.
3576 // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller
3577 optional int32 replicas = 1;
3578
3579 // The number of pods that have labels matching the labels of the pod template of the replication controller.
3580 // +optional
3581 optional int32 fullyLabeledReplicas = 2;
3582
3583 // The number of ready replicas for this replication controller.
3584 // +optional
3585 optional int32 readyReplicas = 4;
3586
3587 // The number of available replicas (ready for at least minReadySeconds) for this replication controller.
3588 // +optional
3589 optional int32 availableReplicas = 5;
3590
3591 // ObservedGeneration reflects the generation of the most recently observed replication controller.
3592 // +optional
3593 optional int64 observedGeneration = 3;
3594
3595 // Represents the latest available observations of a replication controller's current state.
3596 // +optional
3597 // +patchMergeKey=type
3598 // +patchStrategy=merge
3599 repeated ReplicationControllerCondition conditions = 6;
3600}
3601
3602// ResourceFieldSelector represents container resources (cpu, memory) and their output format
3603message ResourceFieldSelector {
3604 // Container name: required for volumes, optional for env vars
3605 // +optional
3606 optional string containerName = 1;
3607
3608 // Required: resource to select
3609 optional string resource = 2;
3610
3611 // Specifies the output format of the exposed resources, defaults to "1"
3612 // +optional
3613 optional k8s.io.apimachinery.pkg.api.resource.Quantity divisor = 3;
3614}
3615
3616// ResourceQuota sets aggregate quota restrictions enforced per namespace
3617message ResourceQuota {
3618 // Standard object's metadata.
3619 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
3620 // +optional
3621 optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
3622
3623 // Spec defines the desired quota.
3624 // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
3625 // +optional
3626 optional ResourceQuotaSpec spec = 2;
3627
3628 // Status defines the actual enforced quota and its current usage.
3629 // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
3630 // +optional
3631 optional ResourceQuotaStatus status = 3;
3632}
3633
3634// ResourceQuotaList is a list of ResourceQuota items.
3635message ResourceQuotaList {
3636 // Standard list metadata.
3637 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
3638 // +optional
3639 optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
3640
3641 // Items is a list of ResourceQuota objects.
3642 // More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/
3643 repeated ResourceQuota items = 2;
3644}
3645
3646// ResourceQuotaSpec defines the desired hard limits to enforce for Quota.
3647message ResourceQuotaSpec {
3648 // hard is the set of desired hard limits for each named resource.
3649 // More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/
3650 // +optional
3651 map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> hard = 1;
3652
3653 // A collection of filters that must match each object tracked by a quota.
3654 // If not specified, the quota matches all objects.
3655 // +optional
3656 repeated string scopes = 2;
3657
3658 // scopeSelector is also a collection of filters like scopes that must match each object tracked by a quota
3659 // but expressed using ScopeSelectorOperator in combination with possible values.
3660 // For a resource to match, both scopes AND scopeSelector (if specified in spec), must be matched.
3661 // +optional
3662 optional ScopeSelector scopeSelector = 3;
3663}
3664
3665// ResourceQuotaStatus defines the enforced hard limits and observed use.
3666message ResourceQuotaStatus {
3667 // Hard is the set of enforced hard limits for each named resource.
3668 // More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/
3669 // +optional
3670 map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> hard = 1;
3671
3672 // Used is the current observed total usage of the resource in the namespace.
3673 // +optional
3674 map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> used = 2;
3675}
3676
3677// ResourceRequirements describes the compute resource requirements.
3678message ResourceRequirements {
3679 // Limits describes the maximum amount of compute resources allowed.
3680 // More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
3681 // +optional
3682 map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> limits = 1;
3683
3684 // Requests describes the minimum amount of compute resources required.
3685 // If Requests is omitted for a container, it defaults to Limits if that is explicitly specified,
3686 // otherwise to an implementation-defined value.
3687 // More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
3688 // +optional
3689 map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> requests = 2;
3690}
3691
3692// SELinuxOptions are the labels to be applied to the container
3693message SELinuxOptions {
3694 // User is a SELinux user label that applies to the container.
3695 // +optional
3696 optional string user = 1;
3697
3698 // Role is a SELinux role label that applies to the container.
3699 // +optional
3700 optional string role = 2;
3701
3702 // Type is a SELinux type label that applies to the container.
3703 // +optional
3704 optional string type = 3;
3705
3706 // Level is SELinux level label that applies to the container.
3707 // +optional
3708 optional string level = 4;
3709}
3710
3711// ScaleIOPersistentVolumeSource represents a persistent ScaleIO volume
3712message ScaleIOPersistentVolumeSource {
3713 // The host address of the ScaleIO API Gateway.
3714 optional string gateway = 1;
3715
3716 // The name of the storage system as configured in ScaleIO.
3717 optional string system = 2;
3718
3719 // SecretRef references to the secret for ScaleIO user and other
3720 // sensitive information. If this is not provided, Login operation will fail.
3721 optional SecretReference secretRef = 3;
3722
3723 // Flag to enable/disable SSL communication with Gateway, default false
3724 // +optional
3725 optional bool sslEnabled = 4;
3726
3727 // The name of the ScaleIO Protection Domain for the configured storage.
3728 // +optional
3729 optional string protectionDomain = 5;
3730
3731 // The ScaleIO Storage Pool associated with the protection domain.
3732 // +optional
3733 optional string storagePool = 6;
3734
3735 // Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned.
3736 // +optional
3737 optional string storageMode = 7;
3738
3739 // The name of a volume already created in the ScaleIO system
3740 // that is associated with this volume source.
3741 optional string volumeName = 8;
3742
3743 // Filesystem type to mount.
3744 // Must be a filesystem type supported by the host operating system.
3745 // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
3746 // +optional
3747 optional string fsType = 9;
3748
3749 // Defaults to false (read/write). ReadOnly here will force
3750 // the ReadOnly setting in VolumeMounts.
3751 // +optional
3752 optional bool readOnly = 10;
3753}
3754
3755// ScaleIOVolumeSource represents a persistent ScaleIO volume
3756message ScaleIOVolumeSource {
3757 // The host address of the ScaleIO API Gateway.
3758 optional string gateway = 1;
3759
3760 // The name of the storage system as configured in ScaleIO.
3761 optional string system = 2;
3762
3763 // SecretRef references to the secret for ScaleIO user and other
3764 // sensitive information. If this is not provided, Login operation will fail.
3765 optional LocalObjectReference secretRef = 3;
3766
3767 // Flag to enable/disable SSL communication with Gateway, default false
3768 // +optional
3769 optional bool sslEnabled = 4;
3770
3771 // The name of the ScaleIO Protection Domain for the configured storage.
3772 // +optional
3773 optional string protectionDomain = 5;
3774
3775 // The ScaleIO Storage Pool associated with the protection domain.
3776 // +optional
3777 optional string storagePool = 6;
3778
3779 // Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned.
3780 // +optional
3781 optional string storageMode = 7;
3782
3783 // The name of a volume already created in the ScaleIO system
3784 // that is associated with this volume source.
3785 optional string volumeName = 8;
3786
3787 // Filesystem type to mount.
3788 // Must be a filesystem type supported by the host operating system.
3789 // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
3790 // +optional
3791 optional string fsType = 9;
3792
3793 // Defaults to false (read/write). ReadOnly here will force
3794 // the ReadOnly setting in VolumeMounts.
3795 // +optional
3796 optional bool readOnly = 10;
3797}
3798
3799// A scope selector represents the AND of the selectors represented
3800// by the scoped-resource selector requirements.
3801message ScopeSelector {
3802 // A list of scope selector requirements by scope of the resources.
3803 // +optional
3804 repeated ScopedResourceSelectorRequirement matchExpressions = 1;
3805}
3806
3807// A scoped-resource selector requirement is a selector that contains values, a scope name, and an operator
3808// that relates the scope name and values.
3809message ScopedResourceSelectorRequirement {
3810 // The name of the scope that the selector applies to.
3811 optional string scopeName = 1;
3812
3813 // Represents a scope's relationship to a set of values.
3814 // Valid operators are In, NotIn, Exists, DoesNotExist.
3815 optional string operator = 2;
3816
3817 // An array of string values. If the operator is In or NotIn,
3818 // the values array must be non-empty. If the operator is Exists or DoesNotExist,
3819 // the values array must be empty.
3820 // This array is replaced during a strategic merge patch.
3821 // +optional
3822 repeated string values = 3;
3823}
3824
3825// Secret holds secret data of a certain type. The total bytes of the values in
3826// the Data field must be less than MaxSecretSize bytes.
3827message Secret {
3828 // Standard object's metadata.
3829 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
3830 // +optional
3831 optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
3832
3833 // Data contains the secret data. Each key must consist of alphanumeric
3834 // characters, '-', '_' or '.'. The serialized form of the secret data is a
3835 // base64 encoded string, representing the arbitrary (possibly non-string)
3836 // data value here. Described in https://tools.ietf.org/html/rfc4648#section-4
3837 // +optional
3838 map<string, bytes> data = 2;
3839
3840 // stringData allows specifying non-binary secret data in string form.
3841 // It is provided as a write-only convenience method.
3842 // All keys and values are merged into the data field on write, overwriting any existing values.
3843 // It is never output when reading from the API.
3844 // +k8s:conversion-gen=false
3845 // +optional
3846 map<string, string> stringData = 4;
3847
3848 // Used to facilitate programmatic handling of secret data.
3849 // +optional
3850 optional string type = 3;
3851}
3852
3853// SecretEnvSource selects a Secret to populate the environment
3854// variables with.
3855//
3856// The contents of the target Secret's Data field will represent the
3857// key-value pairs as environment variables.
3858message SecretEnvSource {
3859 // The Secret to select from.
3860 optional LocalObjectReference localObjectReference = 1;
3861
3862 // Specify whether the Secret must be defined
3863 // +optional
3864 optional bool optional = 2;
3865}
3866
3867// SecretKeySelector selects a key of a Secret.
3868message SecretKeySelector {
3869 // The name of the secret in the pod's namespace to select from.
3870 optional LocalObjectReference localObjectReference = 1;
3871
3872 // The key of the secret to select from. Must be a valid secret key.
3873 optional string key = 2;
3874
3875 // Specify whether the Secret or it's key must be defined
3876 // +optional
3877 optional bool optional = 3;
3878}
3879
3880// SecretList is a list of Secret.
3881message SecretList {
3882 // Standard list metadata.
3883 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
3884 // +optional
3885 optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
3886
3887 // Items is a list of secret objects.
3888 // More info: https://kubernetes.io/docs/concepts/configuration/secret
3889 repeated Secret items = 2;
3890}
3891
3892// Adapts a secret into a projected volume.
3893//
3894// The contents of the target Secret's Data field will be presented in a
3895// projected volume as files using the keys in the Data field as the file names.
3896// Note that this is identical to a secret volume source without the default
3897// mode.
3898message SecretProjection {
3899 optional LocalObjectReference localObjectReference = 1;
3900
3901 // If unspecified, each key-value pair in the Data field of the referenced
3902 // Secret will be projected into the volume as a file whose name is the
3903 // key and content is the value. If specified, the listed keys will be
3904 // projected into the specified paths, and unlisted keys will not be
3905 // present. If a key is specified which is not present in the Secret,
3906 // the volume setup will error unless it is marked optional. Paths must be
3907 // relative and may not contain the '..' path or start with '..'.
3908 // +optional
3909 repeated KeyToPath items = 2;
3910
3911 // Specify whether the Secret or its key must be defined
3912 // +optional
3913 optional bool optional = 4;
3914}
3915
3916// SecretReference represents a Secret Reference. It has enough information to retrieve secret
3917// in any namespace
3918message SecretReference {
3919 // Name is unique within a namespace to reference a secret resource.
3920 // +optional
3921 optional string name = 1;
3922
3923 // Namespace defines the space within which the secret name must be unique.
3924 // +optional
3925 optional string namespace = 2;
3926}
3927
3928// Adapts a Secret into a volume.
3929//
3930// The contents of the target Secret's Data field will be presented in a volume
3931// as files using the keys in the Data field as the file names.
3932// Secret volumes support ownership management and SELinux relabeling.
3933message SecretVolumeSource {
3934 // Name of the secret in the pod's namespace to use.
3935 // More info: https://kubernetes.io/docs/concepts/storage/volumes#secret
3936 // +optional
3937 optional string secretName = 1;
3938
3939 // If unspecified, each key-value pair in the Data field of the referenced
3940 // Secret will be projected into the volume as a file whose name is the
3941 // key and content is the value. If specified, the listed keys will be
3942 // projected into the specified paths, and unlisted keys will not be
3943 // present. If a key is specified which is not present in the Secret,
3944 // the volume setup will error unless it is marked optional. Paths must be
3945 // relative and may not contain the '..' path or start with '..'.
3946 // +optional
3947 repeated KeyToPath items = 2;
3948
3949 // Optional: mode bits to use on created files by default. Must be a
3950 // value between 0 and 0777. Defaults to 0644.
3951 // Directories within the path are not affected by this setting.
3952 // This might be in conflict with other options that affect the file
3953 // mode, like fsGroup, and the result can be other mode bits set.
3954 // +optional
3955 optional int32 defaultMode = 3;
3956
3957 // Specify whether the Secret or it's keys must be defined
3958 // +optional
3959 optional bool optional = 4;
3960}
3961
3962// SecurityContext holds security configuration that will be applied to a container.
3963// Some fields are present in both SecurityContext and PodSecurityContext. When both
3964// are set, the values in SecurityContext take precedence.
3965message SecurityContext {
3966 // The capabilities to add/drop when running containers.
3967 // Defaults to the default set of capabilities granted by the container runtime.
3968 // +optional
3969 optional Capabilities capabilities = 1;
3970
3971 // Run container in privileged mode.
3972 // Processes in privileged containers are essentially equivalent to root on the host.
3973 // Defaults to false.
3974 // +optional
3975 optional bool privileged = 2;
3976
3977 // The SELinux context to be applied to the container.
3978 // If unspecified, the container runtime will allocate a random SELinux context for each
3979 // container. May also be set in PodSecurityContext. If set in both SecurityContext and
3980 // PodSecurityContext, the value specified in SecurityContext takes precedence.
3981 // +optional
3982 optional SELinuxOptions seLinuxOptions = 3;
3983
3984 // The UID to run the entrypoint of the container process.
3985 // Defaults to user specified in image metadata if unspecified.
3986 // May also be set in PodSecurityContext. If set in both SecurityContext and
3987 // PodSecurityContext, the value specified in SecurityContext takes precedence.
3988 // +optional
3989 optional int64 runAsUser = 4;
3990
3991 // The GID to run the entrypoint of the container process.
3992 // Uses runtime default if unset.
3993 // May also be set in PodSecurityContext. If set in both SecurityContext and
3994 // PodSecurityContext, the value specified in SecurityContext takes precedence.
3995 // +optional
3996 optional int64 runAsGroup = 8;
3997
3998 // Indicates that the container must run as a non-root user.
3999 // If true, the Kubelet will validate the image at runtime to ensure that it
4000 // does not run as UID 0 (root) and fail to start the container if it does.
4001 // If unset or false, no such validation will be performed.
4002 // May also be set in PodSecurityContext. If set in both SecurityContext and
4003 // PodSecurityContext, the value specified in SecurityContext takes precedence.
4004 // +optional
4005 optional bool runAsNonRoot = 5;
4006
4007 // Whether this container has a read-only root filesystem.
4008 // Default is false.
4009 // +optional
4010 optional bool readOnlyRootFilesystem = 6;
4011
4012 // AllowPrivilegeEscalation controls whether a process can gain more
4013 // privileges than its parent process. This bool directly controls if
4014 // the no_new_privs flag will be set on the container process.
4015 // AllowPrivilegeEscalation is true always when the container is:
4016 // 1) run as Privileged
4017 // 2) has CAP_SYS_ADMIN
4018 // +optional
4019 optional bool allowPrivilegeEscalation = 7;
4020}
4021
4022// SerializedReference is a reference to serialized object.
4023message SerializedReference {
4024 // The reference to an object in the system.
4025 // +optional
4026 optional ObjectReference reference = 1;
4027}
4028
4029// Service is a named abstraction of software service (for example, mysql) consisting of local port
4030// (for example 3306) that the proxy listens on, and the selector that determines which pods
4031// will answer requests sent through the proxy.
4032message Service {
4033 // Standard object's metadata.
4034 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
4035 // +optional
4036 optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
4037
4038 // Spec defines the behavior of a service.
4039 // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
4040 // +optional
4041 optional ServiceSpec spec = 2;
4042
4043 // Most recently observed status of the service.
4044 // Populated by the system.
4045 // Read-only.
4046 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
4047 // +optional
4048 optional ServiceStatus status = 3;
4049}
4050
4051// ServiceAccount binds together:
4052// * a name, understood by users, and perhaps by peripheral systems, for an identity
4053// * a principal that can be authenticated and authorized
4054// * a set of secrets
4055message ServiceAccount {
4056 // Standard object's metadata.
4057 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
4058 // +optional
4059 optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
4060
4061 // Secrets is the list of secrets allowed to be used by pods running using this ServiceAccount.
4062 // More info: https://kubernetes.io/docs/concepts/configuration/secret
4063 // +optional
4064 // +patchMergeKey=name
4065 // +patchStrategy=merge
4066 repeated ObjectReference secrets = 2;
4067
4068 // ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images
4069 // in pods that reference this ServiceAccount. ImagePullSecrets are distinct from Secrets because Secrets
4070 // can be mounted in the pod, but ImagePullSecrets are only accessed by the kubelet.
4071 // More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod
4072 // +optional
4073 repeated LocalObjectReference imagePullSecrets = 3;
4074
4075 // AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted.
4076 // Can be overridden at the pod level.
4077 // +optional
4078 optional bool automountServiceAccountToken = 4;
4079}
4080
4081// ServiceAccountList is a list of ServiceAccount objects
4082message ServiceAccountList {
4083 // Standard list metadata.
4084 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
4085 // +optional
4086 optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
4087
4088 // List of ServiceAccounts.
4089 // More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
4090 repeated ServiceAccount items = 2;
4091}
4092
4093// ServiceAccountTokenProjection represents a projected service account token
4094// volume. This projection can be used to insert a service account token into
4095// the pods runtime filesystem for use against APIs (Kubernetes API Server or
4096// otherwise).
4097message ServiceAccountTokenProjection {
4098 // Audience is the intended audience of the token. A recipient of a token
4099 // must identify itself with an identifier specified in the audience of the
4100 // token, and otherwise should reject the token. The audience defaults to the
4101 // identifier of the apiserver.
4102 // +optional
4103 optional string audience = 1;
4104
4105 // ExpirationSeconds is the requested duration of validity of the service
4106 // account token. As the token approaches expiration, the kubelet volume
4107 // plugin will proactively rotate the service account token. The kubelet will
4108 // start trying to rotate the token if the token is older than 80 percent of
4109 // its time to live or if the token is older than 24 hours.Defaults to 1 hour
4110 // and must be at least 10 minutes.
4111 // +optional
4112 optional int64 expirationSeconds = 2;
4113
4114 // Path is the path relative to the mount point of the file to project the
4115 // token into.
4116 optional string path = 3;
4117}
4118
4119// ServiceList holds a list of services.
4120message ServiceList {
4121 // Standard list metadata.
4122 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
4123 // +optional
4124 optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
4125
4126 // List of services
4127 repeated Service items = 2;
4128}
4129
4130// ServicePort contains information on service's port.
4131message ServicePort {
4132 // The name of this port within the service. This must be a DNS_LABEL.
4133 // All ports within a ServiceSpec must have unique names. This maps to
4134 // the 'Name' field in EndpointPort objects.
4135 // Optional if only one ServicePort is defined on this service.
4136 // +optional
4137 optional string name = 1;
4138
4139 // The IP protocol for this port. Supports "TCP" and "UDP".
4140 // Default is TCP.
4141 // +optional
4142 optional string protocol = 2;
4143
4144 // The port that will be exposed by this service.
4145 optional int32 port = 3;
4146
4147 // Number or name of the port to access on the pods targeted by the service.
4148 // Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.
4149 // If this is a string, it will be looked up as a named port in the
4150 // target Pod's container ports. If this is not specified, the value
4151 // of the 'port' field is used (an identity map).
4152 // This field is ignored for services with clusterIP=None, and should be
4153 // omitted or set equal to the 'port' field.
4154 // More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service
4155 // +optional
4156 optional k8s.io.apimachinery.pkg.util.intstr.IntOrString targetPort = 4;
4157
4158 // The port on each node on which this service is exposed when type=NodePort or LoadBalancer.
4159 // Usually assigned by the system. If specified, it will be allocated to the service
4160 // if unused or else creation of the service will fail.
4161 // Default is to auto-allocate a port if the ServiceType of this Service requires one.
4162 // More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
4163 // +optional
4164 optional int32 nodePort = 5;
4165}
4166
4167// ServiceProxyOptions is the query options to a Service's proxy call.
4168message ServiceProxyOptions {
4169 // Path is the part of URLs that include service endpoints, suffixes,
4170 // and parameters to use for the current proxy request to service.
4171 // For example, the whole request URL is
4172 // http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy.
4173 // Path is _search?q=user:kimchy.
4174 // +optional
4175 optional string path = 1;
4176}
4177
4178// ServiceSpec describes the attributes that a user creates on a service.
4179message ServiceSpec {
4180 // The list of ports that are exposed by this service.
4181 // More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
4182 // +patchMergeKey=port
4183 // +patchStrategy=merge
4184 repeated ServicePort ports = 1;
4185
4186 // Route service traffic to pods with label keys and values matching this
4187 // selector. If empty or not present, the service is assumed to have an
4188 // external process managing its endpoints, which Kubernetes will not
4189 // modify. Only applies to types ClusterIP, NodePort, and LoadBalancer.
4190 // Ignored if type is ExternalName.
4191 // More info: https://kubernetes.io/docs/concepts/services-networking/service/
4192 // +optional
4193 map<string, string> selector = 2;
4194
4195 // clusterIP is the IP address of the service and is usually assigned
4196 // randomly by the master. If an address is specified manually and is not in
4197 // use by others, it will be allocated to the service; otherwise, creation
4198 // of the service will fail. This field can not be changed through updates.
4199 // Valid values are "None", empty string (""), or a valid IP address. "None"
4200 // can be specified for headless services when proxying is not required.
4201 // Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if
4202 // type is ExternalName.
4203 // More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
4204 // +optional
4205 optional string clusterIP = 3;
4206
4207 // type determines how the Service is exposed. Defaults to ClusterIP. Valid
4208 // options are ExternalName, ClusterIP, NodePort, and LoadBalancer.
4209 // "ExternalName" maps to the specified externalName.
4210 // "ClusterIP" allocates a cluster-internal IP address for load-balancing to
4211 // endpoints. Endpoints are determined by the selector or if that is not
4212 // specified, by manual construction of an Endpoints object. If clusterIP is
4213 // "None", no virtual IP is allocated and the endpoints are published as a
4214 // set of endpoints rather than a stable IP.
4215 // "NodePort" builds on ClusterIP and allocates a port on every node which
4216 // routes to the clusterIP.
4217 // "LoadBalancer" builds on NodePort and creates an
4218 // external load-balancer (if supported in the current cloud) which routes
4219 // to the clusterIP.
4220 // More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services---service-types
4221 // +optional
4222 optional string type = 4;
4223
4224 // externalIPs is a list of IP addresses for which nodes in the cluster
4225 // will also accept traffic for this service. These IPs are not managed by
4226 // Kubernetes. The user is responsible for ensuring that traffic arrives
4227 // at a node with this IP. A common example is external load-balancers
4228 // that are not part of the Kubernetes system.
4229 // +optional
4230 repeated string externalIPs = 5;
4231
4232 // Supports "ClientIP" and "None". Used to maintain session affinity.
4233 // Enable client IP based session affinity.
4234 // Must be ClientIP or None.
4235 // Defaults to None.
4236 // More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
4237 // +optional
4238 optional string sessionAffinity = 7;
4239
4240 // Only applies to Service Type: LoadBalancer
4241 // LoadBalancer will get created with the IP specified in this field.
4242 // This feature depends on whether the underlying cloud-provider supports specifying
4243 // the loadBalancerIP when a load balancer is created.
4244 // This field will be ignored if the cloud-provider does not support the feature.
4245 // +optional
4246 optional string loadBalancerIP = 8;
4247
4248 // If specified and supported by the platform, this will restrict traffic through the cloud-provider
4249 // load-balancer will be restricted to the specified client IPs. This field will be ignored if the
4250 // cloud-provider does not support the feature."
4251 // More info: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/
4252 // +optional
4253 repeated string loadBalancerSourceRanges = 9;
4254
4255 // externalName is the external reference that kubedns or equivalent will
4256 // return as a CNAME record for this service. No proxying will be involved.
4257 // Must be a valid RFC-1123 hostname (https://tools.ietf.org/html/rfc1123)
4258 // and requires Type to be ExternalName.
4259 // +optional
4260 optional string externalName = 10;
4261
4262 // externalTrafficPolicy denotes if this Service desires to route external
4263 // traffic to node-local or cluster-wide endpoints. "Local" preserves the
4264 // client source IP and avoids a second hop for LoadBalancer and Nodeport
4265 // type services, but risks potentially imbalanced traffic spreading.
4266 // "Cluster" obscures the client source IP and may cause a second hop to
4267 // another node, but should have good overall load-spreading.
4268 // +optional
4269 optional string externalTrafficPolicy = 11;
4270
4271 // healthCheckNodePort specifies the healthcheck nodePort for the service.
4272 // If not specified, HealthCheckNodePort is created by the service api
4273 // backend with the allocated nodePort. Will use user-specified nodePort value
4274 // if specified by the client. Only effects when Type is set to LoadBalancer
4275 // and ExternalTrafficPolicy is set to Local.
4276 // +optional
4277 optional int32 healthCheckNodePort = 12;
4278
4279 // publishNotReadyAddresses, when set to true, indicates that DNS implementations
4280 // must publish the notReadyAddresses of subsets for the Endpoints associated with
4281 // the Service. The default value is false.
4282 // The primary use case for setting this field is to use a StatefulSet's Headless Service
4283 // to propagate SRV records for its Pods without respect to their readiness for purpose
4284 // of peer discovery.
4285 // +optional
4286 optional bool publishNotReadyAddresses = 13;
4287
4288 // sessionAffinityConfig contains the configurations of session affinity.
4289 // +optional
4290 optional SessionAffinityConfig sessionAffinityConfig = 14;
4291}
4292
4293// ServiceStatus represents the current status of a service.
4294message ServiceStatus {
4295 // LoadBalancer contains the current status of the load-balancer,
4296 // if one is present.
4297 // +optional
4298 optional LoadBalancerStatus loadBalancer = 1;
4299}
4300
4301// SessionAffinityConfig represents the configurations of session affinity.
4302message SessionAffinityConfig {
4303 // clientIP contains the configurations of Client IP based session affinity.
4304 // +optional
4305 optional ClientIPConfig clientIP = 1;
4306}
4307
4308// Represents a StorageOS persistent volume resource.
4309message StorageOSPersistentVolumeSource {
4310 // VolumeName is the human-readable name of the StorageOS volume. Volume
4311 // names are only unique within a namespace.
4312 optional string volumeName = 1;
4313
4314 // VolumeNamespace specifies the scope of the volume within StorageOS. If no
4315 // namespace is specified then the Pod's namespace will be used. This allows the
4316 // Kubernetes name scoping to be mirrored within StorageOS for tighter integration.
4317 // Set VolumeName to any name to override the default behaviour.
4318 // Set to "default" if you are not using namespaces within StorageOS.
4319 // Namespaces that do not pre-exist within StorageOS will be created.
4320 // +optional
4321 optional string volumeNamespace = 2;
4322
4323 // Filesystem type to mount.
4324 // Must be a filesystem type supported by the host operating system.
4325 // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
4326 // +optional
4327 optional string fsType = 3;
4328
4329 // Defaults to false (read/write). ReadOnly here will force
4330 // the ReadOnly setting in VolumeMounts.
4331 // +optional
4332 optional bool readOnly = 4;
4333
4334 // SecretRef specifies the secret to use for obtaining the StorageOS API
4335 // credentials. If not specified, default values will be attempted.
4336 // +optional
4337 optional ObjectReference secretRef = 5;
4338}
4339
4340// Represents a StorageOS persistent volume resource.
4341message StorageOSVolumeSource {
4342 // VolumeName is the human-readable name of the StorageOS volume. Volume
4343 // names are only unique within a namespace.
4344 optional string volumeName = 1;
4345
4346 // VolumeNamespace specifies the scope of the volume within StorageOS. If no
4347 // namespace is specified then the Pod's namespace will be used. This allows the
4348 // Kubernetes name scoping to be mirrored within StorageOS for tighter integration.
4349 // Set VolumeName to any name to override the default behaviour.
4350 // Set to "default" if you are not using namespaces within StorageOS.
4351 // Namespaces that do not pre-exist within StorageOS will be created.
4352 // +optional
4353 optional string volumeNamespace = 2;
4354
4355 // Filesystem type to mount.
4356 // Must be a filesystem type supported by the host operating system.
4357 // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
4358 // +optional
4359 optional string fsType = 3;
4360
4361 // Defaults to false (read/write). ReadOnly here will force
4362 // the ReadOnly setting in VolumeMounts.
4363 // +optional
4364 optional bool readOnly = 4;
4365
4366 // SecretRef specifies the secret to use for obtaining the StorageOS API
4367 // credentials. If not specified, default values will be attempted.
4368 // +optional
4369 optional LocalObjectReference secretRef = 5;
4370}
4371
4372// Sysctl defines a kernel parameter to be set
4373message Sysctl {
4374 // Name of a property to set
4375 optional string name = 1;
4376
4377 // Value of a property to set
4378 optional string value = 2;
4379}
4380
4381// TCPSocketAction describes an action based on opening a socket
4382message TCPSocketAction {
4383 // Number or name of the port to access on the container.
4384 // Number must be in the range 1 to 65535.
4385 // Name must be an IANA_SVC_NAME.
4386 optional k8s.io.apimachinery.pkg.util.intstr.IntOrString port = 1;
4387
4388 // Optional: Host name to connect to, defaults to the pod IP.
4389 // +optional
4390 optional string host = 2;
4391}
4392
4393// The node this Taint is attached to has the "effect" on
4394// any pod that does not tolerate the Taint.
4395message Taint {
4396 // Required. The taint key to be applied to a node.
4397 optional string key = 1;
4398
4399 // Required. The taint value corresponding to the taint key.
4400 // +optional
4401 optional string value = 2;
4402
4403 // Required. The effect of the taint on pods
4404 // that do not tolerate the taint.
4405 // Valid effects are NoSchedule, PreferNoSchedule and NoExecute.
4406 optional string effect = 3;
4407
4408 // TimeAdded represents the time at which the taint was added.
4409 // It is only written for NoExecute taints.
4410 // +optional
4411 optional k8s.io.apimachinery.pkg.apis.meta.v1.Time timeAdded = 4;
4412}
4413
4414// The pod this Toleration is attached to tolerates any taint that matches
4415// the triple <key,value,effect> using the matching operator <operator>.
4416message Toleration {
4417 // Key is the taint key that the toleration applies to. Empty means match all taint keys.
4418 // If the key is empty, operator must be Exists; this combination means to match all values and all keys.
4419 // +optional
4420 optional string key = 1;
4421
4422 // Operator represents a key's relationship to the value.
4423 // Valid operators are Exists and Equal. Defaults to Equal.
4424 // Exists is equivalent to wildcard for value, so that a pod can
4425 // tolerate all taints of a particular category.
4426 // +optional
4427 optional string operator = 2;
4428
4429 // Value is the taint value the toleration matches to.
4430 // If the operator is Exists, the value should be empty, otherwise just a regular string.
4431 // +optional
4432 optional string value = 3;
4433
4434 // Effect indicates the taint effect to match. Empty means match all taint effects.
4435 // When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.
4436 // +optional
4437 optional string effect = 4;
4438
4439 // TolerationSeconds represents the period of time the toleration (which must be
4440 // of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default,
4441 // it is not set, which means tolerate the taint forever (do not evict). Zero and
4442 // negative values will be treated as 0 (evict immediately) by the system.
4443 // +optional
4444 optional int64 tolerationSeconds = 5;
4445}
4446
4447// A topology selector requirement is a selector that matches given label.
4448// This is an alpha feature and may change in the future.
4449message TopologySelectorLabelRequirement {
4450 // The label key that the selector applies to.
4451 optional string key = 1;
4452
4453 // An array of string values. One value must match the label to be selected.
4454 // Each entry in Values is ORed.
4455 repeated string values = 2;
4456}
4457
4458// A topology selector term represents the result of label queries.
4459// A null or empty topology selector term matches no objects.
4460// The requirements of them are ANDed.
4461// It provides a subset of functionality as NodeSelectorTerm.
4462// This is an alpha feature and may change in the future.
4463message TopologySelectorTerm {
4464 // A list of topology selector requirements by labels.
4465 // +optional
4466 repeated TopologySelectorLabelRequirement matchLabelExpressions = 1;
4467}
4468
4469// Volume represents a named volume in a pod that may be accessed by any container in the pod.
4470message Volume {
4471 // Volume's name.
4472 // Must be a DNS_LABEL and unique within the pod.
4473 // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
4474 optional string name = 1;
4475
4476 // VolumeSource represents the location and type of the mounted volume.
4477 // If not specified, the Volume is implied to be an EmptyDir.
4478 // This implied behavior is deprecated and will be removed in a future version.
4479 optional VolumeSource volumeSource = 2;
4480}
4481
4482// volumeDevice describes a mapping of a raw block device within a container.
4483message VolumeDevice {
4484 // name must match the name of a persistentVolumeClaim in the pod
4485 optional string name = 1;
4486
4487 // devicePath is the path inside of the container that the device will be mapped to.
4488 optional string devicePath = 2;
4489}
4490
4491// VolumeMount describes a mounting of a Volume within a container.
4492message VolumeMount {
4493 // This must match the Name of a Volume.
4494 optional string name = 1;
4495
4496 // Mounted read-only if true, read-write otherwise (false or unspecified).
4497 // Defaults to false.
4498 // +optional
4499 optional bool readOnly = 2;
4500
4501 // Path within the container at which the volume should be mounted. Must
4502 // not contain ':'.
4503 optional string mountPath = 3;
4504
4505 // Path within the volume from which the container's volume should be mounted.
4506 // Defaults to "" (volume's root).
4507 // +optional
4508 optional string subPath = 4;
4509
4510 // mountPropagation determines how mounts are propagated from the host
4511 // to container and the other way around.
4512 // When not set, MountPropagationNone is used.
4513 // This field is beta in 1.10.
4514 // +optional
4515 optional string mountPropagation = 5;
4516}
4517
4518// VolumeNodeAffinity defines constraints that limit what nodes this volume can be accessed from.
4519message VolumeNodeAffinity {
4520 // Required specifies hard node constraints that must be met.
4521 optional NodeSelector required = 1;
4522}
4523
4524// Projection that may be projected along with other supported volume types
4525message VolumeProjection {
4526 // information about the secret data to project
4527 // +optional
4528 optional SecretProjection secret = 1;
4529
4530 // information about the downwardAPI data to project
4531 // +optional
4532 optional DownwardAPIProjection downwardAPI = 2;
4533
4534 // information about the configMap data to project
4535 // +optional
4536 optional ConfigMapProjection configMap = 3;
4537
4538 // information about the serviceAccountToken data to project
4539 // +optional
4540 optional ServiceAccountTokenProjection serviceAccountToken = 4;
4541}
4542
4543// Represents the source of a volume to mount.
4544// Only one of its members may be specified.
4545message VolumeSource {
4546 // HostPath represents a pre-existing file or directory on the host
4547 // machine that is directly exposed to the container. This is generally
4548 // used for system agents or other privileged things that are allowed
4549 // to see the host machine. Most containers will NOT need this.
4550 // More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath
4551 // ---
4552 // TODO(jonesdl) We need to restrict who can use host directory mounts and who can/can not
4553 // mount host directories as read/write.
4554 // +optional
4555 optional HostPathVolumeSource hostPath = 1;
4556
4557 // EmptyDir represents a temporary directory that shares a pod's lifetime.
4558 // More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir
4559 // +optional
4560 optional EmptyDirVolumeSource emptyDir = 2;
4561
4562 // GCEPersistentDisk represents a GCE Disk resource that is attached to a
4563 // kubelet's host machine and then exposed to the pod.
4564 // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
4565 // +optional
4566 optional GCEPersistentDiskVolumeSource gcePersistentDisk = 3;
4567
4568 // AWSElasticBlockStore represents an AWS Disk resource that is attached to a
4569 // kubelet's host machine and then exposed to the pod.
4570 // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
4571 // +optional
4572 optional AWSElasticBlockStoreVolumeSource awsElasticBlockStore = 4;
4573
4574 // GitRepo represents a git repository at a particular revision.
4575 // DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an
4576 // EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir
4577 // into the Pod's container.
4578 // +optional
4579 optional GitRepoVolumeSource gitRepo = 5;
4580
4581 // Secret represents a secret that should populate this volume.
4582 // More info: https://kubernetes.io/docs/concepts/storage/volumes#secret
4583 // +optional
4584 optional SecretVolumeSource secret = 6;
4585
4586 // NFS represents an NFS mount on the host that shares a pod's lifetime
4587 // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
4588 // +optional
4589 optional NFSVolumeSource nfs = 7;
4590
4591 // ISCSI represents an ISCSI Disk resource that is attached to a
4592 // kubelet's host machine and then exposed to the pod.
4593 // More info: https://releases.k8s.io/HEAD/examples/volumes/iscsi/README.md
4594 // +optional
4595 optional ISCSIVolumeSource iscsi = 8;
4596
4597 // Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime.
4598 // More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md
4599 // +optional
4600 optional GlusterfsVolumeSource glusterfs = 9;
4601
4602 // PersistentVolumeClaimVolumeSource represents a reference to a
4603 // PersistentVolumeClaim in the same namespace.
4604 // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
4605 // +optional
4606 optional PersistentVolumeClaimVolumeSource persistentVolumeClaim = 10;
4607
4608 // RBD represents a Rados Block Device mount on the host that shares a pod's lifetime.
4609 // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md
4610 // +optional
4611 optional RBDVolumeSource rbd = 11;
4612
4613 // FlexVolume represents a generic volume resource that is
4614 // provisioned/attached using an exec based plugin.
4615 // +optional
4616 optional FlexVolumeSource flexVolume = 12;
4617
4618 // Cinder represents a cinder volume attached and mounted on kubelets host machine
4619 // More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
4620 // +optional
4621 optional CinderVolumeSource cinder = 13;
4622
4623 // CephFS represents a Ceph FS mount on the host that shares a pod's lifetime
4624 // +optional
4625 optional CephFSVolumeSource cephfs = 14;
4626
4627 // Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running
4628 // +optional
4629 optional FlockerVolumeSource flocker = 15;
4630
4631 // DownwardAPI represents downward API about the pod that should populate this volume
4632 // +optional
4633 optional DownwardAPIVolumeSource downwardAPI = 16;
4634
4635 // FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.
4636 // +optional
4637 optional FCVolumeSource fc = 17;
4638
4639 // AzureFile represents an Azure File Service mount on the host and bind mount to the pod.
4640 // +optional
4641 optional AzureFileVolumeSource azureFile = 18;
4642
4643 // ConfigMap represents a configMap that should populate this volume
4644 // +optional
4645 optional ConfigMapVolumeSource configMap = 19;
4646
4647 // VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine
4648 // +optional
4649 optional VsphereVirtualDiskVolumeSource vsphereVolume = 20;
4650
4651 // Quobyte represents a Quobyte mount on the host that shares a pod's lifetime
4652 // +optional
4653 optional QuobyteVolumeSource quobyte = 21;
4654
4655 // AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
4656 // +optional
4657 optional AzureDiskVolumeSource azureDisk = 22;
4658
4659 // PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine
4660 optional PhotonPersistentDiskVolumeSource photonPersistentDisk = 23;
4661
4662 // Items for all in one resources secrets, configmaps, and downward API
4663 optional ProjectedVolumeSource projected = 26;
4664
4665 // PortworxVolume represents a portworx volume attached and mounted on kubelets host machine
4666 // +optional
4667 optional PortworxVolumeSource portworxVolume = 24;
4668
4669 // ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.
4670 // +optional
4671 optional ScaleIOVolumeSource scaleIO = 25;
4672
4673 // StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.
4674 // +optional
4675 optional StorageOSVolumeSource storageos = 27;
4676}
4677
4678// Represents a vSphere volume resource.
4679message VsphereVirtualDiskVolumeSource {
4680 // Path that identifies vSphere volume vmdk
4681 optional string volumePath = 1;
4682
4683 // Filesystem type to mount.
4684 // Must be a filesystem type supported by the host operating system.
4685 // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
4686 // +optional
4687 optional string fsType = 2;
4688
4689 // Storage Policy Based Management (SPBM) profile name.
4690 // +optional
4691 optional string storagePolicyName = 3;
4692
4693 // Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName.
4694 // +optional
4695 optional string storagePolicyID = 4;
4696}
4697
4698// The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)
4699message WeightedPodAffinityTerm {
4700 // weight associated with matching the corresponding podAffinityTerm,
4701 // in the range 1-100.
4702 optional int32 weight = 1;
4703
4704 // Required. A pod affinity term, associated with the corresponding weight.
4705 optional PodAffinityTerm podAffinityTerm = 2;
4706}
4707