summaryrefslogtreecommitdiff
path: root/vendor/k8s.io/api/core/v1/generated.proto
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/k8s.io/api/core/v1/generated.proto')
-rw-r--r--vendor/k8s.io/api/core/v1/generated.proto1074
1 files changed, 886 insertions, 188 deletions
diff --git a/vendor/k8s.io/api/core/v1/generated.proto b/vendor/k8s.io/api/core/v1/generated.proto
index bb88fb27c..3a13c53fa 100644
--- a/vendor/k8s.io/api/core/v1/generated.proto
+++ b/vendor/k8s.io/api/core/v1/generated.proto
@@ -17,7 +17,7 @@ limitations under the License.
// This file was autogenerated by go-to-protobuf. Do not edit it manually!
-syntax = 'proto2';
+syntax = "proto2";
package k8s.io.api.core.v1;
@@ -161,7 +161,7 @@ message AzureFileVolumeSource {
// Deprecated in 1.7, please use the bindings subresource of pods instead.
message Binding {
// Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
// +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
@@ -275,7 +275,7 @@ message Capabilities {
// Cephfs volumes do not support ownership management or SELinux relabeling.
message CephFSPersistentVolumeSource {
// Required: Monitors is a collection of Ceph monitors
- // More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
+ // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
repeated string monitors = 1;
// Optional: Used as the mounted root, rather than the full Ceph tree, default is /
@@ -283,23 +283,23 @@ message CephFSPersistentVolumeSource {
optional string path = 2;
// Optional: User is the rados user name, default is admin
- // More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
+ // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
// +optional
optional string user = 3;
// Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret
- // More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
+ // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
// +optional
optional string secretFile = 4;
// Optional: SecretRef is reference to the authentication secret for User, default is empty.
- // More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
+ // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
// +optional
optional SecretReference secretRef = 5;
// Optional: Defaults to false (read/write). ReadOnly here will force
// the ReadOnly setting in VolumeMounts.
- // More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
+ // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
// +optional
optional bool readOnly = 6;
}
@@ -308,7 +308,7 @@ message CephFSPersistentVolumeSource {
// Cephfs volumes do not support ownership management or SELinux relabeling.
message CephFSVolumeSource {
// Required: Monitors is a collection of Ceph monitors
- // More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
+ // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
repeated string monitors = 1;
// Optional: Used as the mounted root, rather than the full Ceph tree, default is /
@@ -316,23 +316,23 @@ message CephFSVolumeSource {
optional string path = 2;
// Optional: User is the rados user name, default is admin
- // More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
+ // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
// +optional
optional string user = 3;
// Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret
- // More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
+ // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
// +optional
optional string secretFile = 4;
// Optional: SecretRef is reference to the authentication secret for User, default is empty.
- // More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
+ // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
// +optional
optional LocalObjectReference secretRef = 5;
// Optional: Defaults to false (read/write). ReadOnly here will force
// the ReadOnly setting in VolumeMounts.
- // More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
+ // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
// +optional
optional bool readOnly = 6;
}
@@ -342,20 +342,20 @@ message CephFSVolumeSource {
// The volume must also be in the same region as the kubelet.
// Cinder volumes support ownership management and SELinux relabeling.
message CinderPersistentVolumeSource {
- // volume id used to identify the volume in cinder
- // More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
+ // volume id used to identify the volume in cinder.
+ // More info: https://examples.k8s.io/mysql-cinder-pd/README.md
optional string volumeID = 1;
// Filesystem type to mount.
// Must be a filesystem type supported by the host operating system.
// Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
- // More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
+ // More info: https://examples.k8s.io/mysql-cinder-pd/README.md
// +optional
optional string fsType = 2;
// Optional: Defaults to false (read/write). ReadOnly here will force
// the ReadOnly setting in VolumeMounts.
- // More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
+ // More info: https://examples.k8s.io/mysql-cinder-pd/README.md
// +optional
optional bool readOnly = 3;
@@ -370,20 +370,20 @@ message CinderPersistentVolumeSource {
// The volume must also be in the same region as the kubelet.
// Cinder volumes support ownership management and SELinux relabeling.
message CinderVolumeSource {
- // volume id used to identify the volume in cinder
- // More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
+ // volume id used to identify the volume in cinder.
+ // More info: https://examples.k8s.io/mysql-cinder-pd/README.md
optional string volumeID = 1;
// Filesystem type to mount.
// Must be a filesystem type supported by the host operating system.
// Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
- // More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
+ // More info: https://examples.k8s.io/mysql-cinder-pd/README.md
// +optional
optional string fsType = 2;
// Optional: Defaults to false (read/write). ReadOnly here will force
// the ReadOnly setting in VolumeMounts.
- // More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
+ // More info: https://examples.k8s.io/mysql-cinder-pd/README.md
// +optional
optional bool readOnly = 3;
@@ -424,9 +424,10 @@ message ComponentCondition {
}
// ComponentStatus (and ComponentStatusList) holds the cluster validation info.
+// Deprecated: This API is deprecated in v1.19+
message ComponentStatus {
// Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
// +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
@@ -438,9 +439,10 @@ message ComponentStatus {
}
// Status of all the conditions for the component as a list of ComponentStatus objects.
+// Deprecated: This API is deprecated in v1.19+
message ComponentStatusList {
// Standard list metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
// +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
@@ -451,10 +453,18 @@ message ComponentStatusList {
// ConfigMap holds configuration data for pods to consume.
message ConfigMap {
// Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
// +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+ // Immutable, if set to true, ensures that data stored in the ConfigMap cannot
+ // be updated (only object metadata can be modified).
+ // If not set to true, the field can be modified at any time.
+ // Defaulted to nil.
+ // This is a beta field enabled by ImmutableEphemeralVolumes feature gate.
+ // +optional
+ optional bool immutable = 4;
+
// Data contains the configuration data.
// Each key must consist of alphanumeric characters, '-', '_' or '.'.
// Values with non-UTF-8 byte sequences must use the BinaryData field.
@@ -503,7 +513,7 @@ message ConfigMapKeySelector {
// ConfigMapList is a resource containing a list of ConfigMap objects.
message ConfigMapList {
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
// +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
@@ -580,8 +590,10 @@ message ConfigMapVolumeSource {
// +optional
repeated KeyToPath items = 2;
- // Optional: mode bits to use on created files by default. Must be a
- // value between 0 and 0777. Defaults to 0644.
+ // Optional: mode bits used to set permissions on created files by default.
+ // Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511.
+ // YAML accepts both octal and decimal values, JSON requires decimal values for mode bits.
+ // Defaults to 0644.
// Directories within the path are not affected by this setting.
// This might be in conflict with other options that affect the file
// mode, like fsGroup, and the result can be other mode bits set.
@@ -681,7 +693,6 @@ message Container {
repeated VolumeMount volumeMounts = 9;
// volumeDevices is the list of block devices to be used by the container.
- // This is a beta feature.
// +patchMergeKey=devicePath
// +patchStrategy=merge
// +optional
@@ -701,6 +712,16 @@ message Container {
// +optional
optional Probe readinessProbe = 11;
+ // StartupProbe indicates that the Pod has successfully initialized.
+ // If specified, no other probes are executed until this completes successfully.
+ // If this probe fails, the Pod will be restarted, just as if the livenessProbe failed.
+ // This can be used to provide different probe parameters at the beginning of a Pod's lifecycle,
+ // when it might take a long time to load data or warm a cache, than during steady-state operation.
+ // This cannot be updated.
+ // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
+ // +optional
+ optional Probe startupProbe = 22;
+
// Actions that the management system should take in response to container lifecycle events.
// Cannot be updated.
// +optional
@@ -795,6 +816,7 @@ message ContainerPort {
// Protocol for port. Must be UDP, TCP, or SCTP.
// Defaults to "TCP".
// +optional
+ // +default="TCP"
optional string protocol = 4;
// What host IP to bind the external port to.
@@ -901,6 +923,13 @@ message ContainerStatus {
// Container's ID in the format 'docker://<container_id>'.
// +optional
optional string containerID = 8;
+
+ // Specifies whether the container has passed its startup probe.
+ // Initialized as false, becomes true after startupProbe is considered successful.
+ // Resets to false when the container is restarted, or if kubelet loses state temporarily.
+ // Is always true when no startupProbe is defined.
+ // +optional
+ optional bool started = 9;
}
// DaemonEndpoint contains information about a single Daemon endpoint.
@@ -932,8 +961,10 @@ message DownwardAPIVolumeFile {
// +optional
optional ResourceFieldSelector resourceFieldRef = 3;
- // Optional: mode bits to use on this file, must be a value between 0
- // and 0777. If not specified, the volume defaultMode will be used.
+ // Optional: mode bits used to set permissions on this file, must be an octal value
+ // between 0000 and 0777 or a decimal value between 0 and 511.
+ // YAML accepts both octal and decimal values, JSON requires decimal values for mode bits.
+ // If not specified, the volume defaultMode will be used.
// This might be in conflict with other options that affect the file
// mode, like fsGroup, and the result can be other mode bits set.
// +optional
@@ -948,7 +979,10 @@ message DownwardAPIVolumeSource {
repeated DownwardAPIVolumeFile items = 1;
// Optional: mode bits to use on created files by default. Must be a
- // value between 0 and 0777. Defaults to 0644.
+ // Optional: mode bits used to set permissions on created files by default.
+ // Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511.
+ // YAML accepts both octal and decimal values, JSON requires decimal values for mode bits.
+ // Defaults to 0644.
// Directories within the path are not affected by this setting.
// This might be in conflict with other options that affect the file
// mode, like fsGroup, and the result can be other mode bits set.
@@ -1001,7 +1035,8 @@ message EndpointAddress {
// EndpointPort is a tuple that describes a single port.
message EndpointPort {
- // The name of this port (corresponds to ServicePort.Name).
+ // The name of this port. This must match the 'name' field in the
+ // corresponding ServicePort.
// Must be a DNS_LABEL.
// Optional only if one port is defined.
// +optional
@@ -1015,6 +1050,17 @@ message EndpointPort {
// Default is TCP.
// +optional
optional string protocol = 3;
+
+ // The application protocol for this port.
+ // This field follows standard Kubernetes label syntax.
+ // Un-prefixed names are reserved for IANA standard service names (as per
+ // RFC-6335 and http://www.iana.org/assignments/service-names).
+ // Non-standard protocols should use prefixed names such as
+ // mycompany.com/my-custom-protocol.
+ // This is a beta field that is guarded by the ServiceAppProtocol feature
+ // gate and enabled by default.
+ // +optional
+ optional string appProtocol = 4;
}
// EndpointSubset is a group of addresses with a common set of ports. The
@@ -1058,7 +1104,7 @@ message EndpointSubset {
// ]
message Endpoints {
// Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
// +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
@@ -1076,7 +1122,7 @@ message Endpoints {
// EndpointsList is a list of endpoints.
message EndpointsList {
// Standard list metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
// +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
@@ -1122,8 +1168,8 @@ message EnvVar {
// EnvVarSource represents a source for the value of an EnvVar.
message EnvVarSource {
- // Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations,
- // spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP.
+ // Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['<KEY>']`, `metadata.annotations['<KEY>']`,
+ // spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
// +optional
optional ObjectFieldSelector fieldRef = 1;
@@ -1141,10 +1187,232 @@ message EnvVarSource {
optional SecretKeySelector secretKeyRef = 4;
}
-// Event is a report of an event somewhere in the cluster.
+// An EphemeralContainer is a container that may be added temporarily to an existing pod for
+// user-initiated activities such as debugging. Ephemeral containers have no resource or
+// scheduling guarantees, and they will not be restarted when they exit or when a pod is
+// removed or restarted. If an ephemeral container causes a pod to exceed its resource
+// allocation, the pod may be evicted.
+// Ephemeral containers may not be added by directly updating the pod spec. They must be added
+// via the pod's ephemeralcontainers subresource, and they will appear in the pod spec
+// once added.
+// This is an alpha feature enabled by the EphemeralContainers feature flag.
+message EphemeralContainer {
+ // Ephemeral containers have all of the fields of Container, plus additional fields
+ // specific to ephemeral containers. Fields in common with Container are in the
+ // following inlined struct so than an EphemeralContainer may easily be converted
+ // to a Container.
+ optional EphemeralContainerCommon ephemeralContainerCommon = 1;
+
+ // If set, the name of the container from PodSpec that this ephemeral container targets.
+ // The ephemeral container will be run in the namespaces (IPC, PID, etc) of this container.
+ // If not set then the ephemeral container is run in whatever namespaces are shared
+ // for the pod. Note that the container runtime must support this feature.
+ // +optional
+ optional string targetContainerName = 2;
+}
+
+// EphemeralContainerCommon is a copy of all fields in Container to be inlined in
+// EphemeralContainer. This separate type allows easy conversion from EphemeralContainer
+// to Container and allows separate documentation for the fields of EphemeralContainer.
+// When a new field is added to Container it must be added here as well.
+message EphemeralContainerCommon {
+ // Name of the ephemeral container specified as a DNS_LABEL.
+ // This name must be unique among all containers, init containers and ephemeral containers.
+ optional string name = 1;
+
+ // Docker image name.
+ // More info: https://kubernetes.io/docs/concepts/containers/images
+ optional string image = 2;
+
+ // Entrypoint array. Not executed within a shell.
+ // The docker image's ENTRYPOINT is used if this is not provided.
+ // Variable references $(VAR_NAME) are expanded using the container's environment. If a variable
+ // cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax
+ // can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded,
+ // regardless of whether the variable exists or not.
+ // Cannot be updated.
+ // More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
+ // +optional
+ repeated string command = 3;
+
+ // Arguments to the entrypoint.
+ // The docker image's CMD is used if this is not provided.
+ // Variable references $(VAR_NAME) are expanded using the container's environment. If a variable
+ // cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax
+ // can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded,
+ // regardless of whether the variable exists or not.
+ // Cannot be updated.
+ // More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
+ // +optional
+ repeated string args = 4;
+
+ // Container's working directory.
+ // If not specified, the container runtime's default will be used, which
+ // might be configured in the container image.
+ // Cannot be updated.
+ // +optional
+ optional string workingDir = 5;
+
+ // Ports are not allowed for ephemeral containers.
+ repeated ContainerPort ports = 6;
+
+ // List of sources to populate environment variables in the container.
+ // The keys defined within a source must be a C_IDENTIFIER. All invalid keys
+ // will be reported as an event when the container is starting. When a key exists in multiple
+ // sources, the value associated with the last source will take precedence.
+ // Values defined by an Env with a duplicate key will take precedence.
+ // Cannot be updated.
+ // +optional
+ repeated EnvFromSource envFrom = 19;
+
+ // List of environment variables to set in the container.
+ // Cannot be updated.
+ // +optional
+ // +patchMergeKey=name
+ // +patchStrategy=merge
+ repeated EnvVar env = 7;
+
+ // Resources are not allowed for ephemeral containers. Ephemeral containers use spare resources
+ // already allocated to the pod.
+ // +optional
+ optional ResourceRequirements resources = 8;
+
+ // Pod volumes to mount into the container's filesystem.
+ // Cannot be updated.
+ // +optional
+ // +patchMergeKey=mountPath
+ // +patchStrategy=merge
+ repeated VolumeMount volumeMounts = 9;
+
+ // volumeDevices is the list of block devices to be used by the container.
+ // +patchMergeKey=devicePath
+ // +patchStrategy=merge
+ // +optional
+ repeated VolumeDevice volumeDevices = 21;
+
+ // Probes are not allowed for ephemeral containers.
+ // +optional
+ optional Probe livenessProbe = 10;
+
+ // Probes are not allowed for ephemeral containers.
+ // +optional
+ optional Probe readinessProbe = 11;
+
+ // Probes are not allowed for ephemeral containers.
+ // +optional
+ optional Probe startupProbe = 22;
+
+ // Lifecycle is not allowed for ephemeral containers.
+ // +optional
+ optional Lifecycle lifecycle = 12;
+
+ // Optional: Path at which the file to which the container's termination message
+ // will be written is mounted into the container's filesystem.
+ // Message written is intended to be brief final status, such as an assertion failure message.
+ // Will be truncated by the node if greater than 4096 bytes. The total message length across
+ // all containers will be limited to 12kb.
+ // Defaults to /dev/termination-log.
+ // Cannot be updated.
+ // +optional
+ optional string terminationMessagePath = 13;
+
+ // Indicate how the termination message should be populated. File will use the contents of
+ // terminationMessagePath to populate the container status message on both success and failure.
+ // FallbackToLogsOnError will use the last chunk of container log output if the termination
+ // message file is empty and the container exited with an error.
+ // The log output is limited to 2048 bytes or 80 lines, whichever is smaller.
+ // Defaults to File.
+ // Cannot be updated.
+ // +optional
+ optional string terminationMessagePolicy = 20;
+
+ // Image pull policy.
+ // One of Always, Never, IfNotPresent.
+ // Defaults to Always if :latest tag is specified, or IfNotPresent otherwise.
+ // Cannot be updated.
+ // More info: https://kubernetes.io/docs/concepts/containers/images#updating-images
+ // +optional
+ optional string imagePullPolicy = 14;
+
+ // SecurityContext is not allowed for ephemeral containers.
+ // +optional
+ optional SecurityContext securityContext = 15;
+
+ // Whether this container should allocate a buffer for stdin in the container runtime. If this
+ // is not set, reads from stdin in the container will always result in EOF.
+ // Default is false.
+ // +optional
+ optional bool stdin = 16;
+
+ // Whether the container runtime should close the stdin channel after it has been opened by
+ // a single attach. When stdin is true the stdin stream will remain open across multiple attach
+ // sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the
+ // first client attaches to stdin, and then remains open and accepts data until the client disconnects,
+ // at which time stdin is closed and remains closed until the container is restarted. If this
+ // flag is false, a container processes that reads from stdin will never receive an EOF.
+ // Default is false
+ // +optional
+ optional bool stdinOnce = 17;
+
+ // Whether this container should allocate a TTY for itself, also requires 'stdin' to be true.
+ // Default is false.
+ // +optional
+ optional bool tty = 18;
+}
+
+// A list of ephemeral containers used with the Pod ephemeralcontainers subresource.
+message EphemeralContainers {
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // A list of ephemeral containers associated with this pod. New ephemeral containers
+ // may be appended to this list, but existing ephemeral containers may not be removed
+ // or modified.
+ // +patchMergeKey=name
+ // +patchStrategy=merge
+ repeated EphemeralContainer ephemeralContainers = 2;
+}
+
+// Represents an ephemeral volume that is handled by a normal storage driver.
+message EphemeralVolumeSource {
+ // Will be used to create a stand-alone PVC to provision the volume.
+ // The pod in which this EphemeralVolumeSource is embedded will be the
+ // owner of the PVC, i.e. the PVC will be deleted together with the
+ // pod. The name of the PVC will be `<pod name>-<volume name>` where
+ // `<volume name>` is the name from the `PodSpec.Volumes` array
+ // entry. Pod validation will reject the pod if the concatenated name
+ // is not valid for a PVC (for example, too long).
+ //
+ // An existing PVC with that name that is not owned by the pod
+ // will *not* be used for the pod to avoid using an unrelated
+ // volume by mistake. Starting the pod is then blocked until
+ // the unrelated PVC is removed. If such a pre-created PVC is
+ // meant to be used by the pod, the PVC has to updated with an
+ // owner reference to the pod once the pod exists. Normally
+ // this should not be necessary, but it may be useful when
+ // manually reconstructing a broken cluster.
+ //
+ // This field is read-only and no changes will be made by Kubernetes
+ // to the PVC after it has been created.
+ //
+ // Required, must not be nil.
+ optional PersistentVolumeClaimTemplate volumeClaimTemplate = 1;
+
+ // Specifies a read-only configuration for the volume.
+ // Defaults to false (read/write).
+ // +optional
+ optional bool readOnly = 2;
+}
+
+// Event is a report of an event somewhere in the cluster. Events
+// have a limited retention time and triggers and messages may evolve
+// with time. Event consumers should not rely on the timing of an event
+// with a given Reason reflecting a consistent underlying trigger, or the
+// continued existence of events with that Reason. Events should be
+// treated as informative, best-effort, supplemental data.
message Event {
// Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
// The object that this event is about.
@@ -1209,7 +1477,7 @@ message Event {
// EventList is a list of events.
message EventList {
// Standard list metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
// +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
@@ -1225,10 +1493,6 @@ message EventSeries {
// Time of the last occurrence observed
optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime lastObservedTime = 2;
-
- // State of this Series: Ongoing or Finished
- // Deprecated. Planned removal for 1.18
- optional string state = 3;
}
// EventSource contains information for an event.
@@ -1418,22 +1682,22 @@ message GitRepoVolumeSource {
// Glusterfs volumes do not support ownership management or SELinux relabeling.
message GlusterfsPersistentVolumeSource {
// EndpointsName is the endpoint name that details Glusterfs topology.
- // More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod
+ // More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
optional string endpoints = 1;
// Path is the Glusterfs volume path.
- // More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod
+ // More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
optional string path = 2;
// ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions.
// Defaults to false.
- // More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod
+ // More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
// +optional
optional bool readOnly = 3;
// EndpointsNamespace is the namespace that contains Glusterfs endpoint.
// If this field is empty, the EndpointNamespace defaults to the same namespace as the bound PVC.
- // More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod
+ // More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
// +optional
optional string endpointsNamespace = 4;
}
@@ -1442,16 +1706,16 @@ message GlusterfsPersistentVolumeSource {
// Glusterfs volumes do not support ownership management or SELinux relabeling.
message GlusterfsVolumeSource {
// EndpointsName is the endpoint name that details Glusterfs topology.
- // More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod
+ // More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
optional string endpoints = 1;
// Path is the Glusterfs volume path.
- // More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod
+ // More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
optional string path = 2;
// ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions.
// Defaults to false.
- // More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod
+ // More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
// +optional
optional bool readOnly = 3;
}
@@ -1658,8 +1922,10 @@ message KeyToPath {
// May not start with the string '..'.
optional string path = 2;
- // Optional: mode bits to use on this file, must be a value between 0
- // and 0777. If not specified, the volume defaultMode will be used.
+ // Optional: mode bits used to set permissions on this file.
+ // Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511.
+ // YAML accepts both octal and decimal values, JSON requires decimal values for mode bits.
+ // If not specified, the volume defaultMode will be used.
// This might be in conflict with other options that affect the file
// mode, like fsGroup, and the result can be other mode bits set.
// +optional
@@ -1678,7 +1944,7 @@ message Lifecycle {
optional Handler postStart = 1;
// PreStop is called immediately before a container is terminated due to an
- // API request or management event such as liveness probe failure,
+ // API request or management event such as liveness/startup probe failure,
// preemption, resource contention, etc. The handler is not called if the
// container crashes or exits. The reason for termination is passed to the
// handler. The Pod's termination grace period countdown begins before the
@@ -1694,12 +1960,12 @@ message Lifecycle {
// LimitRange sets resource usage limits for each kind of resource in a Namespace.
message LimitRange {
// Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
// +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
// Spec defines the limits enforced.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
// +optional
optional LimitRangeSpec spec = 2;
}
@@ -1707,7 +1973,6 @@ message LimitRange {
// LimitRangeItem defines a min/max usage limit for any resource that matches on kind.
message LimitRangeItem {
// Type of resource that this limit applies to.
- // +optional
optional string type = 1;
// Max usage constraints on this kind by resource name.
@@ -1734,7 +1999,7 @@ message LimitRangeItem {
// LimitRangeList is a list of LimitRange items.
message LimitRangeList {
// Standard list metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
// +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
@@ -1752,7 +2017,7 @@ message LimitRangeSpec {
// List holds a list of objects, which may not be known by the server.
message List {
// Standard list metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
// +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
@@ -1772,6 +2037,12 @@ message LoadBalancerIngress {
// (typically AWS load-balancers)
// +optional
optional string hostname = 2;
+
+ // Ports is a list of records of service ports
+ // If used, every port defined in the service should have an entry in it
+ // +listType=atomic
+ // +optional
+ repeated PortStatus ports = 4;
}
// LoadBalancerStatus represents the status of a load-balancer.
@@ -1829,25 +2100,43 @@ message NFSVolumeSource {
// Use of multiple namespaces is optional.
message Namespace {
// Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
// +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
// Spec defines the behavior of the Namespace.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
// +optional
optional NamespaceSpec spec = 2;
// Status describes the current status of a Namespace.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
// +optional
optional NamespaceStatus status = 3;
}
+// NamespaceCondition contains details about state of namespace.
+message NamespaceCondition {
+ // Type of namespace controller condition.
+ optional string type = 1;
+
+ // Status of the condition, one of True, False, Unknown.
+ optional string status = 2;
+
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 4;
+
+ // +optional
+ optional string reason = 5;
+
+ // +optional
+ optional string message = 6;
+}
+
// NamespaceList is a list of Namespaces.
message NamespaceList {
// Standard list metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
// +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
@@ -1870,25 +2159,31 @@ message NamespaceStatus {
// More info: https://kubernetes.io/docs/tasks/administer-cluster/namespaces/
// +optional
optional string phase = 1;
+
+ // Represents the latest available observations of a namespace's current state.
+ // +optional
+ // +patchMergeKey=type
+ // +patchStrategy=merge
+ repeated NamespaceCondition conditions = 2;
}
// Node is a worker node in Kubernetes.
// Each node will have a unique identifier in the cache (i.e. in etcd).
message Node {
// Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
// +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
// Spec defines the behavior of a node.
- // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
// +optional
optional NodeSpec spec = 2;
// Most recently observed status of the node.
// Populated by the system.
// Read-only.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
// +optional
optional NodeStatus status = 3;
}
@@ -2016,7 +2311,7 @@ message NodeDaemonEndpoints {
// NodeList is the whole list of all Nodes which have been registered with master.
message NodeList {
// Standard list metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
// +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
@@ -2032,7 +2327,7 @@ message NodeProxyOptions {
}
// NodeResources is an object for conveying resource information about a node.
-// see http://releases.k8s.io/HEAD/docs/design/resources.md for more details.
+// see https://kubernetes.io/docs/concepts/architecture/nodes/#capacity for more details.
message NodeResources {
// Capacity represents the available resources of a node
map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> capacity = 1;
@@ -2084,6 +2379,13 @@ message NodeSpec {
// +optional
optional string podCIDR = 1;
+ // podCIDRs represents the IP ranges assigned to the node for usage by Pods on that node. If this
+ // field is specified, the 0th entry must match the podCIDR field. It may contain at most 1 value for
+ // each of IPv4 and IPv6.
+ // +optional
+ // +patchStrategy=merge
+ repeated string podCIDRs = 7;
+
// ID of the node assigned by the cloud provider in the format: <ProviderName>://<ProviderSpecificNodeID>
// +optional
optional string providerID = 3;
@@ -2136,6 +2438,9 @@ message NodeStatus {
// List of addresses reachable to the node.
// Queried from cloud provider, if available.
// More info: https://kubernetes.io/docs/concepts/nodes/node/#addresses
+ // Note: This field is declared as mergeable, but the merge key is not sufficiently
+ // unique, which can cause data corruption when it is merged. Callers should instead
+ // use a full-replacement patch. See http://pr.k8s.io/79391 for an example.
// +optional
// +patchMergeKey=type
// +patchStrategy=merge
@@ -2176,7 +2481,7 @@ message NodeSystemInfo {
// SystemUUID reported by the node. For unique machine identification
// MachineID is preferred. This field is specific to Red Hat hosts
- // https://access.redhat.com/documentation/en-US/Red_Hat_Subscription_Management/1/html/RHSM/getting-system-uuid.html
+ // https://access.redhat.com/documentation/en-us/red_hat_subscription_management/1/html/rhsm/uuid
optional string systemUUID = 2;
// Boot ID reported by the node.
@@ -2215,10 +2520,24 @@ message ObjectFieldSelector {
}
// ObjectReference contains enough information to let you inspect or modify the referred object.
+// ---
+// New uses of this type are discouraged because of difficulty describing its usage when embedded in APIs.
+// 1. Ignored fields. It includes many fields which are not generally honored. For instance, ResourceVersion and FieldPath are both very rarely valid in actual usage.
+// 2. Invalid usage help. It is impossible to add specific help for individual usage. In most embedded usages, there are particular
+// restrictions like, "must refer only to types A and B" or "UID not honored" or "name must be restricted".
+// Those cannot be well described when embedded.
+// 3. Inconsistent validation. Because the usages are different, the validation rules are different by usage, which makes it hard for users to predict what will happen.
+// 4. The fields are both imprecise and overly precise. Kind is not a precise mapping to a URL. This can produce ambiguity
+// during interpretation and require a REST mapping. In most cases, the dependency is on the group,resource tuple
+// and the version of the actual struct is irrelevant.
+// 5. We cannot easily change it. Because this type is embedded in many locations, updates to this type
+// will affect numerous schemas. Don't make new APIs embed an underspecified API type they do not control.
+// Instead of using this type, create a locally provided and used type that is well-focused on your reference.
+// For example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 .
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
message ObjectReference {
// Kind of the referent.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
// +optional
optional string kind = 1;
@@ -2242,7 +2561,7 @@ message ObjectReference {
optional string apiVersion = 5;
// Specific resourceVersion to which this reference is made, if any.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
// +optional
optional string resourceVersion = 6;
@@ -2263,7 +2582,7 @@ message ObjectReference {
// More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes
message PersistentVolume {
// Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
// +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
@@ -2284,7 +2603,7 @@ message PersistentVolume {
// PersistentVolumeClaim is a user's request for and claim to a persistent volume
message PersistentVolumeClaim {
// Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
// +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
@@ -2328,7 +2647,7 @@ message PersistentVolumeClaimCondition {
// PersistentVolumeClaimList is a list of PersistentVolumeClaim items.
message PersistentVolumeClaimList {
// Standard list metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
// +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
@@ -2365,18 +2684,17 @@ message PersistentVolumeClaimSpec {
// volumeMode defines what type of volume is required by the claim.
// Value of Filesystem is implied when not included in claim spec.
- // This is a beta feature.
// +optional
optional string volumeMode = 6;
- // This field requires the VolumeSnapshotDataSource alpha feature gate to be
- // enabled and currently VolumeSnapshot is the only supported data source.
- // If the provisioner can support VolumeSnapshot data source, it will create
- // a new volume and data will be restored to the volume at the same time.
- // If the provisioner does not support VolumeSnapshot data source, volume will
- // not be created and the failure will be reported as an event.
- // In the future, we plan to support more data source types and the behavior
- // of the provisioner may change.
+ // This field can be used to specify either:
+ // * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot)
+ // * An existing PVC (PersistentVolumeClaim)
+ // * An existing custom resource that implements data population (Alpha)
+ // In order to use custom resource types that implement data population,
+ // the AnyVolumeDataSource feature gate must be enabled.
+ // If the provisioner or an external controller can support the specified data source,
+ // it will create a new volume based on the contents of the specified data source.
// +optional
optional TypedLocalObjectReference dataSource = 7;
}
@@ -2404,6 +2722,23 @@ message PersistentVolumeClaimStatus {
repeated PersistentVolumeClaimCondition conditions = 4;
}
+// PersistentVolumeClaimTemplate is used to produce
+// PersistentVolumeClaim objects as part of an EphemeralVolumeSource.
+message PersistentVolumeClaimTemplate {
+ // May contain labels and annotations that will be copied into the PVC
+ // when creating it. No other fields are allowed and will be rejected during
+ // validation.
+ //
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // The specification for the PersistentVolumeClaim. The entire content is
+ // copied unchanged into the PVC that gets created from this
+ // template. The same fields as in a PersistentVolumeClaim
+ // are also valid here.
+ optional PersistentVolumeClaimSpec spec = 2;
+}
+
// PersistentVolumeClaimVolumeSource references the user's PVC in the same namespace.
// This volume finds the bound PV and mounts that volume for the pod. A
// PersistentVolumeClaimVolumeSource is, essentially, a wrapper around another
@@ -2422,7 +2757,7 @@ message PersistentVolumeClaimVolumeSource {
// PersistentVolumeList is a list of PersistentVolume items.
message PersistentVolumeList {
// Standard list metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
// +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
@@ -2456,7 +2791,7 @@ message PersistentVolumeSource {
// Glusterfs represents a Glusterfs volume that is attached to a host and
// exposed to the pod. Provisioned by an admin.
- // More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md
+ // More info: https://examples.k8s.io/volumes/glusterfs/README.md
// +optional
optional GlusterfsPersistentVolumeSource glusterfs = 4;
@@ -2466,7 +2801,7 @@ message PersistentVolumeSource {
optional NFSVolumeSource nfs = 5;
// RBD represents a Rados Block Device mount on the host that shares a pod's lifetime.
- // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md
+ // More info: https://examples.k8s.io/volumes/rbd/README.md
// +optional
optional RBDPersistentVolumeSource rbd = 6;
@@ -2475,8 +2810,8 @@ message PersistentVolumeSource {
// +optional
optional ISCSIPersistentVolumeSource iscsi = 7;
- // Cinder represents a cinder volume attached and mounted on kubelets host machine
- // More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
+ // Cinder represents a cinder volume attached and mounted on kubelets host machine.
+ // More info: https://examples.k8s.io/mysql-cinder-pd/README.md
// +optional
optional CinderPersistentVolumeSource cinder = 8;
@@ -2529,7 +2864,7 @@ message PersistentVolumeSource {
optional LocalVolumeSource local = 20;
// StorageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod
- // More info: https://releases.k8s.io/HEAD/examples/volumes/storageos/README.md
+ // More info: https://examples.k8s.io/volumes/storageos/README.md
// +optional
optional StorageOSPersistentVolumeSource storageos = 21;
@@ -2581,7 +2916,6 @@ message PersistentVolumeSpec {
// volumeMode defines if a volume is intended to be used with a formatted filesystem
// or to remain in raw block state. Value of Filesystem is implied when not included in spec.
- // This is a beta feature.
// +optional
optional string volumeMode = 8;
@@ -2623,12 +2957,12 @@ message PhotonPersistentDiskVolumeSource {
// by clients and scheduled onto hosts.
message Pod {
// Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
// +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
// Specification of the desired behavior of the pod.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
// +optional
optional PodSpec spec = 2;
@@ -2636,7 +2970,7 @@ message Pod {
// This data may not be up to date.
// Populated by the system.
// Read-only.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
// +optional
optional PodStatus status = 3;
}
@@ -2842,15 +3176,23 @@ message PodExecOptions {
repeated string command = 6;
}
+// IP address information for entries in the (plural) PodIPs field.
+// Each entry includes:
+// IP: An IP address allocated to the pod. Routable at least within the cluster.
+message PodIP {
+ // ip is an IP address (IPv4 or IPv6) assigned to the pod
+ optional string ip = 1;
+}
+
// PodList is a list of Pods.
message PodList {
// Standard list metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
// +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
// List of pods.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md
repeated Pod items = 2;
}
@@ -2897,6 +3239,15 @@ message PodLogOptions {
// slightly more or slightly less than the specified limit.
// +optional
optional int64 limitBytes = 8;
+
+ // insecureSkipTLSVerifyBackend indicates that the apiserver should not confirm the validity of the
+ // serving certificate of the backend it is connecting to. This will make the HTTPS connection between the apiserver
+ // and the backend insecure. This means the apiserver cannot verify the log data it is receiving came from the real
+ // kubelet. If the kubelet is configured to verify the apiserver's TLS credentials, it does not mean the
+ // connection to the real kubelet is vulnerable to a man in the middle attack (e.g. an attacker could not intercept
+ // the actual log data coming from the real kubelet).
+ // +optional
+ optional bool insecureSkipTLSVerifyBackend = 9;
}
// PodPortForwardOptions is the query options to a Pod's port forward call
@@ -2937,7 +3288,9 @@ message PodSecurityContext {
// +optional
optional SELinuxOptions seLinuxOptions = 1;
- // Windows security options.
+ // The Windows specific settings applied to all containers.
+ // If unspecified, the options within a container's SecurityContext will be used.
+ // If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
// +optional
optional WindowsSecurityContextOptions windowsOptions = 8;
@@ -2988,6 +3341,19 @@ message PodSecurityContext {
// sysctls (by the container runtime) might fail to launch.
// +optional
repeated Sysctl sysctls = 7;
+
+ // fsGroupChangePolicy defines behavior of changing ownership and permission of the volume
+ // before being exposed inside Pod. This field will only apply to
+ // volume types which support fsGroup based ownership(and permissions).
+ // It will have no effect on ephemeral volume types such as: secret, configmaps
+ // and emptydir.
+ // Valid values are "OnRootMismatch" and "Always". If not specified, "Always" is used.
+ // +optional
+ optional string fsGroupChangePolicy = 9;
+
+ // The seccomp options to use by the containers in this pod.
+ // +optional
+ optional SeccompProfile seccompProfile = 10;
}
// Describes the class of pods that should avoid this node.
@@ -3012,7 +3378,7 @@ message PodSpec {
// init container fails, the pod is considered to have failed and is handled according
// to its restartPolicy. The name for an init container or normal container must be
// unique among all containers.
- // Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes.
+ // Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes.
// The resourceRequirements of an init container are taken into account during scheduling
// by finding the highest request/limit for each resource type, and then using the max of
// of that value or the sum of the normal containers. Limits are applied to init containers
@@ -3032,6 +3398,16 @@ message PodSpec {
// +patchStrategy=merge
repeated Container containers = 2;
+ // List of ephemeral containers run in this pod. Ephemeral containers may be run in an existing
+ // pod to perform user-initiated actions such as debugging. This list cannot be specified when
+ // creating a pod, and it cannot be modified by updating the pod spec. In order to add an
+ // ephemeral container to an existing pod, use the pod's ephemeralcontainers subresource.
+ // This field is alpha-level and is only honored by servers that enable the EphemeralContainers feature.
+ // +optional
+ // +patchMergeKey=name
+ // +patchStrategy=merge
+ repeated EphemeralContainer ephemeralContainers = 34;
+
// Restart policy for all containers within the pod.
// One of Always, OnFailure, Never.
// Default to Always.
@@ -3115,7 +3491,6 @@ message PodSpec {
// in the same pod, and the first process in each container will not be assigned PID 1.
// HostPID and ShareProcessNamespace cannot both be set.
// Optional: Default to false.
- // This field is beta-level and may be disabled with the PodShareProcessNamespace feature.
// +k8s:conversion-gen=false
// +optional
optional bool shareProcessNamespace = 27;
@@ -3212,9 +3587,39 @@ message PodSpec {
// PreemptionPolicy is the Policy for preempting pods with lower priority.
// One of Never, PreemptLowerPriority.
// Defaults to PreemptLowerPriority if unset.
- // This field is alpha-level and is only honored by servers that enable the NonPreemptingPriority feature.
+ // This field is beta-level, gated by the NonPreemptingPriority feature-gate.
// +optional
optional string preemptionPolicy = 31;
+
+ // Overhead represents the resource overhead associated with running a pod for a given RuntimeClass.
+ // This field will be autopopulated at admission time by the RuntimeClass admission controller. If
+ // the RuntimeClass admission controller is enabled, overhead must not be set in Pod create requests.
+ // The RuntimeClass admission controller will reject Pod create requests which have the overhead already
+ // set. If RuntimeClass is configured and selected in the PodSpec, Overhead will be set to the value
+ // defined in the corresponding RuntimeClass, otherwise it will remain unset and treated as zero.
+ // More info: https://git.k8s.io/enhancements/keps/sig-node/20190226-pod-overhead.md
+ // This field is alpha-level as of Kubernetes v1.16, and is only honored by servers that enable the PodOverhead feature.
+ // +optional
+ map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> overhead = 32;
+
+ // TopologySpreadConstraints describes how a group of pods ought to spread across topology
+ // domains. Scheduler will schedule pods in a way which abides by the constraints.
+ // All topologySpreadConstraints are ANDed.
+ // +optional
+ // +patchMergeKey=topologyKey
+ // +patchStrategy=merge
+ // +listType=map
+ // +listMapKey=topologyKey
+ // +listMapKey=whenUnsatisfiable
+ repeated TopologySpreadConstraint topologySpreadConstraints = 33;
+
+ // If true the pod's hostname will be configured as the pod's FQDN, rather than the leaf name (the default).
+ // In Linux containers, this means setting the FQDN in the hostname field of the kernel (the nodename field of struct utsname).
+ // In Windows containers, this means setting the registry value of hostname for the registry key HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters to FQDN.
+ // If a pod does not have FQDN, this has no effect.
+ // Default to false.
+ // +optional
+ optional bool setHostnameAsFQDN = 35;
}
// PodStatus represents information about the status of a pod. Status may trail the actual
@@ -3277,6 +3682,14 @@ message PodStatus {
// +optional
optional string podIP = 6;
+ // podIPs holds the IP addresses allocated to the pod. If this field is specified, the 0th entry must
+ // match the podIP field. Pods may be allocated at most 1 value for each of IPv4 and IPv6. This list
+ // is empty if no IPs have been allocated yet.
+ // +optional
+ // +patchStrategy=merge
+ // +patchMergeKey=ip
+ repeated PodIP podIPs = 12;
+
// RFC 3339 date and time at which the object was acknowledged by the Kubelet.
// This is before the Kubelet pulled the container image(s) for the pod.
// +optional
@@ -3299,12 +3712,17 @@ message PodStatus {
// More info: https://git.k8s.io/community/contributors/design-proposals/node/resource-qos.md
// +optional
optional string qosClass = 9;
+
+ // Status for any ephemeral containers that have run in this pod.
+ // This field is alpha-level and is only populated by servers that enable the EphemeralContainers feature.
+ // +optional
+ repeated ContainerStatus ephemeralContainerStatuses = 13;
}
// PodStatusResult is a wrapper for PodStatus returned by kubelet that can be encode/decoded
message PodStatusResult {
// Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
// +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
@@ -3312,7 +3730,7 @@ message PodStatusResult {
// This data may not be up to date.
// Populated by the system.
// Read-only.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
// +optional
optional PodStatus status = 2;
}
@@ -3320,12 +3738,12 @@ message PodStatusResult {
// PodTemplate describes a template for creating copies of a predefined pod.
message PodTemplate {
// Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
// +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
// Template defines the pods that will be created from this pod template.
- // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
// +optional
optional PodTemplateSpec template = 2;
}
@@ -3333,7 +3751,7 @@ message PodTemplate {
// PodTemplateList is a list of PodTemplates.
message PodTemplateList {
// Standard list metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
// +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
@@ -3344,16 +3762,39 @@ message PodTemplateList {
// PodTemplateSpec describes the data a pod should have when created from a template
message PodTemplateSpec {
// Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
// +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
// Specification of the desired behavior of the pod.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
// +optional
optional PodSpec spec = 2;
}
+message PortStatus {
+ // Port is the port number of the service port of which status is recorded here
+ optional int32 port = 1;
+
+ // Protocol is the protocol of the service port of which status is recorded here
+ // The supported values are: "TCP", "UDP", "SCTP"
+ optional string protocol = 2;
+
+ // Error is to record the problem with the service port
+ // The format of the error shall comply with the following rules:
+ // - built-in error values shall be specified in this file and those shall use
+ // CamelCase names
+ // - cloud provider specific error values must have names that comply with the
+ // format foo.example.com/CamelCase.
+ // ---
+ // The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
+ // +optional
+ // +kubebuilder:validation:Required
+ // +kubebuilder:validation:Pattern=`^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$`
+ // +kubebuilder:validation:MaxLength=316
+ optional string error = 3;
+}
+
// PortworxVolumeSource represents a Portworx volume resource.
message PortworxVolumeSource {
// VolumeID uniquely identifies a Portworx volume
@@ -3429,7 +3870,7 @@ message Probe {
optional int32 periodSeconds = 4;
// Minimum consecutive successes for the probe to be considered successful after having failed.
- // Defaults to 1. Must be 1 for liveness. Minimum value is 1.
+ // Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1.
// +optional
optional int32 successThreshold = 5;
@@ -3442,10 +3883,12 @@ message Probe {
// Represents a projected volume source
message ProjectedVolumeSource {
// list of volume projections
+ // +optional
repeated VolumeProjection sources = 1;
- // Mode bits to use on created files by default. Must be a value between
- // 0 and 0777.
+ // Mode bits used to set permissions on created files by default.
+ // Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511.
+ // YAML accepts both octal and decimal values, JSON requires decimal values for mode bits.
// Directories within the path are not affected by this setting.
// This might be in conflict with other options that affect the file
// mode, like fsGroup, and the result can be other mode bits set.
@@ -3489,11 +3932,11 @@ message QuobyteVolumeSource {
// RBD volumes support ownership management and SELinux relabeling.
message RBDPersistentVolumeSource {
// A collection of Ceph monitors.
- // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
+ // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
repeated string monitors = 1;
// The rados image name.
- // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
+ // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
optional string image = 2;
// Filesystem type of the volume that you want to mount.
@@ -3506,32 +3949,32 @@ message RBDPersistentVolumeSource {
// The rados pool name.
// Default is rbd.
- // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
+ // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
// +optional
optional string pool = 4;
// The rados user name.
// Default is admin.
- // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
+ // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
// +optional
optional string user = 5;
// Keyring is the path to key ring for RBDUser.
// Default is /etc/ceph/keyring.
- // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
+ // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
// +optional
optional string keyring = 6;
// SecretRef is name of the authentication secret for RBDUser. If provided
// overrides keyring.
// Default is nil.
- // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
+ // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
// +optional
optional SecretReference secretRef = 7;
// ReadOnly here will force the ReadOnly setting in VolumeMounts.
// Defaults to false.
- // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
+ // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
// +optional
optional bool readOnly = 8;
}
@@ -3540,11 +3983,11 @@ message RBDPersistentVolumeSource {
// RBD volumes support ownership management and SELinux relabeling.
message RBDVolumeSource {
// A collection of Ceph monitors.
- // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
+ // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
repeated string monitors = 1;
// The rados image name.
- // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
+ // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
optional string image = 2;
// Filesystem type of the volume that you want to mount.
@@ -3557,32 +4000,32 @@ message RBDVolumeSource {
// The rados pool name.
// Default is rbd.
- // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
+ // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
// +optional
optional string pool = 4;
// The rados user name.
// Default is admin.
- // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
+ // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
// +optional
optional string user = 5;
// Keyring is the path to key ring for RBDUser.
// Default is /etc/ceph/keyring.
- // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
+ // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
// +optional
optional string keyring = 6;
// SecretRef is name of the authentication secret for RBDUser. If provided
// overrides keyring.
// Default is nil.
- // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
+ // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
// +optional
optional LocalObjectReference secretRef = 7;
// ReadOnly here will force the ReadOnly setting in VolumeMounts.
// Defaults to false.
- // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
+ // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
// +optional
optional bool readOnly = 8;
}
@@ -3590,7 +4033,7 @@ message RBDVolumeSource {
// RangeAllocation is not a public type.
message RangeAllocation {
// Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
// +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
@@ -3605,12 +4048,12 @@ message RangeAllocation {
message ReplicationController {
// If the Labels of a ReplicationController are empty, they are defaulted to
// be the same as the Pod(s) that the replication controller manages.
- // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
// +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
// Spec defines the specification of the desired behavior of the replication controller.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
// +optional
optional ReplicationControllerSpec spec = 2;
@@ -3618,7 +4061,7 @@ message ReplicationController {
// This data may be out of date by some window of time.
// Populated by the system.
// Read-only.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
// +optional
optional ReplicationControllerStatus status = 3;
}
@@ -3647,7 +4090,7 @@ message ReplicationControllerCondition {
// ReplicationControllerList is a collection of replication controllers.
message ReplicationControllerList {
// Standard list metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
// +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
@@ -3733,17 +4176,17 @@ message ResourceFieldSelector {
// ResourceQuota sets aggregate quota restrictions enforced per namespace
message ResourceQuota {
// Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
// +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
// Spec defines the desired quota.
- // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
// +optional
optional ResourceQuotaSpec spec = 2;
// Status defines the actual enforced quota and its current usage.
- // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
// +optional
optional ResourceQuotaStatus status = 3;
}
@@ -3751,7 +4194,7 @@ message ResourceQuota {
// ResourceQuotaList is a list of ResourceQuota items.
message ResourceQuotaList {
// Standard list metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
// +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
@@ -3943,14 +4386,43 @@ message ScopedResourceSelectorRequirement {
repeated string values = 3;
}
+// SeccompProfile defines a pod/container's seccomp profile settings.
+// Only one profile source may be set.
+// +union
+message SeccompProfile {
+ // type indicates which kind of seccomp profile will be applied.
+ // Valid options are:
+ //
+ // Localhost - a profile defined in a file on the node should be used.
+ // RuntimeDefault - the container runtime default profile should be used.
+ // Unconfined - no profile should be applied.
+ // +unionDiscriminator
+ optional string type = 1;
+
+ // localhostProfile indicates a profile defined in a file on the node should be used.
+ // The profile must be preconfigured on the node to work.
+ // Must be a descending path, relative to the kubelet's configured seccomp profile location.
+ // Must only be set if type is "Localhost".
+ // +optional
+ optional string localhostProfile = 2;
+}
+
// Secret holds secret data of a certain type. The total bytes of the values in
// the Data field must be less than MaxSecretSize bytes.
message Secret {
// Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
// +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+ // Immutable, if set to true, ensures that data stored in the Secret cannot
+ // be updated (only object metadata can be modified).
+ // If not set to true, the field can be modified at any time.
+ // Defaulted to nil.
+ // This is a beta field enabled by ImmutableEphemeralVolumes feature gate.
+ // +optional
+ optional bool immutable = 5;
+
// Data contains the secret data. Each key must consist of alphanumeric
// characters, '-', '_' or '.'. The serialized form of the secret data is a
// base64 encoded string, representing the arbitrary (possibly non-string)
@@ -4001,7 +4473,7 @@ message SecretKeySelector {
// SecretList is a list of Secret.
message SecretList {
// Standard list metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
// +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
@@ -4067,8 +4539,10 @@ message SecretVolumeSource {
// +optional
repeated KeyToPath items = 2;
- // Optional: mode bits to use on created files by default. Must be a
- // value between 0 and 0777. Defaults to 0644.
+ // Optional: mode bits used to set permissions on created files by default.
+ // Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511.
+ // YAML accepts both octal and decimal values, JSON requires decimal values
+ // for mode bits. Defaults to 0644.
// Directories within the path are not affected by this setting.
// This might be in conflict with other options that affect the file
// mode, like fsGroup, and the result can be other mode bits set.
@@ -4102,7 +4576,9 @@ message SecurityContext {
// +optional
optional SELinuxOptions seLinuxOptions = 3;
- // Windows security options.
+ // The Windows specific settings applied to all containers.
+ // If unspecified, the options from the PodSecurityContext will be used.
+ // If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
// +optional
optional WindowsSecurityContextOptions windowsOptions = 10;
@@ -4149,6 +4625,12 @@ message SecurityContext {
// This requires the ProcMountType feature flag to be enabled.
// +optional
optional string procMount = 9;
+
+ // The seccomp options to use by this container. If seccomp options are
+ // provided at both the pod & container level, the container options
+ // override the pod options.
+ // +optional
+ optional SeccompProfile seccompProfile = 11;
}
// SerializedReference is a reference to serialized object.
@@ -4163,19 +4645,19 @@ message SerializedReference {
// will answer requests sent through the proxy.
message Service {
// Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
// +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
// Spec defines the behavior of a service.
- // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
// +optional
optional ServiceSpec spec = 2;
// Most recently observed status of the service.
// Populated by the system.
// Read-only.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
// +optional
optional ServiceStatus status = 3;
}
@@ -4186,7 +4668,7 @@ message Service {
// * a set of secrets
message ServiceAccount {
// Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
// +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
@@ -4213,7 +4695,7 @@ message ServiceAccount {
// ServiceAccountList is a list of ServiceAccount objects
message ServiceAccountList {
// Standard list metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
// +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
@@ -4251,7 +4733,7 @@ message ServiceAccountTokenProjection {
// ServiceList holds a list of services.
message ServiceList {
// Standard list metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
// +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
@@ -4262,8 +4744,9 @@ message ServiceList {
// ServicePort contains information on service's port.
message ServicePort {
// The name of this port within the service. This must be a DNS_LABEL.
- // All ports within a ServiceSpec must have unique names. This maps to
- // the 'Name' field in EndpointPort objects.
+ // All ports within a ServiceSpec must have unique names. When considering
+ // the endpoints for a Service, this must match the 'name' field in the
+ // EndpointPort.
// Optional if only one ServicePort is defined on this service.
// +optional
optional string name = 1;
@@ -4273,6 +4756,17 @@ message ServicePort {
// +optional
optional string protocol = 2;
+ // The application protocol for this port.
+ // This field follows standard Kubernetes label syntax.
+ // Un-prefixed names are reserved for IANA standard service names (as per
+ // RFC-6335 and http://www.iana.org/assignments/service-names).
+ // Non-standard protocols should use prefixed names such as
+ // mycompany.com/my-custom-protocol.
+ // This is a beta field that is guarded by the ServiceAppProtocol feature
+ // gate and enabled by default.
+ // +optional
+ optional string appProtocol = 6;
+
// The port that will be exposed by this service.
optional int32 port = 3;
@@ -4287,10 +4781,14 @@ message ServicePort {
// +optional
optional k8s.io.apimachinery.pkg.util.intstr.IntOrString targetPort = 4;
- // The port on each node on which this service is exposed when type=NodePort or LoadBalancer.
- // Usually assigned by the system. If specified, it will be allocated to the service
- // if unused or else creation of the service will fail.
- // Default is to auto-allocate a port if the ServiceType of this Service requires one.
+ // The port on each node on which this service is exposed when type is
+ // NodePort or LoadBalancer. Usually assigned by the system. If a value is
+ // specified, in-range, and not in use it will be used, otherwise the
+ // operation will fail. If not specified, a port will be allocated if this
+ // Service requires one. If this field is specified when creating a
+ // Service which does not need it, creation will fail. This field will be
+ // wiped when updating a Service to no longer need it (e.g. changing type
+ // from NodePort to ClusterIP).
// More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
// +optional
optional int32 nodePort = 5;
@@ -4328,30 +4826,68 @@ message ServiceSpec {
map<string, string> selector = 2;
// clusterIP is the IP address of the service and is usually assigned
- // randomly by the master. If an address is specified manually and is not in
- // use by others, it will be allocated to the service; otherwise, creation
- // of the service will fail. This field can not be changed through updates.
- // Valid values are "None", empty string (""), or a valid IP address. "None"
- // can be specified for headless services when proxying is not required.
- // Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if
- // type is ExternalName.
+ // randomly. If an address is specified manually, is in-range (as per
+ // system configuration), and is not in use, it will be allocated to the
+ // service; otherwise creation of the service will fail. This field may not
+ // be changed through updates unless the type field is also being changed
+ // to ExternalName (which requires this field to be blank) or the type
+ // field is being changed from ExternalName (in which case this field may
+ // optionally be specified, as describe above). Valid values are "None",
+ // empty string (""), or a valid IP address. Setting this to "None" makes a
+ // "headless service" (no virtual IP), which is useful when direct endpoint
+ // connections are preferred and proxying is not required. Only applies to
+ // types ClusterIP, NodePort, and LoadBalancer. If this field is specified
+ // when creating a Service of type ExternalName, creation will fail. This
+ // field will be wiped when updating a Service to type ExternalName.
// More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
// +optional
optional string clusterIP = 3;
+ // ClusterIPs is a list of IP addresses assigned to this service, and are
+ // usually assigned randomly. If an address is specified manually, is
+ // in-range (as per system configuration), and is not in use, it will be
+ // allocated to the service; otherwise creation of the service will fail.
+ // This field may not be changed through updates unless the type field is
+ // also being changed to ExternalName (which requires this field to be
+ // empty) or the type field is being changed from ExternalName (in which
+ // case this field may optionally be specified, as describe above). Valid
+ // values are "None", empty string (""), or a valid IP address. Setting
+ // this to "None" makes a "headless service" (no virtual IP), which is
+ // useful when direct endpoint connections are preferred and proxying is
+ // not required. Only applies to types ClusterIP, NodePort, and
+ // LoadBalancer. If this field is specified when creating a Service of type
+ // ExternalName, creation will fail. This field will be wiped when updating
+ // a Service to type ExternalName. If this field is not specified, it will
+ // be initialized from the clusterIP field. If this field is specified,
+ // clients must ensure that clusterIPs[0] and clusterIP have the same
+ // value.
+ //
+ // Unless the "IPv6DualStack" feature gate is enabled, this field is
+ // limited to one value, which must be the same as the clusterIP field. If
+ // the feature gate is enabled, this field may hold a maximum of two
+ // entries (dual-stack IPs, in either order). These IPs must correspond to
+ // the values of the ipFamilies field. Both clusterIPs and ipFamilies are
+ // governed by the ipFamilyPolicy field.
+ // More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
+ // +listType=atomic
+ // +optional
+ repeated string clusterIPs = 18;
+
// type determines how the Service is exposed. Defaults to ClusterIP. Valid
// options are ExternalName, ClusterIP, NodePort, and LoadBalancer.
- // "ExternalName" maps to the specified externalName.
- // "ClusterIP" allocates a cluster-internal IP address for load-balancing to
- // endpoints. Endpoints are determined by the selector or if that is not
- // specified, by manual construction of an Endpoints object. If clusterIP is
- // "None", no virtual IP is allocated and the endpoints are published as a
- // set of endpoints rather than a stable IP.
+ // "ClusterIP" allocates a cluster-internal IP address for load-balancing
+ // to endpoints. Endpoints are determined by the selector or if that is not
+ // specified, by manual construction of an Endpoints object or
+ // EndpointSlice objects. If clusterIP is "None", no virtual IP is
+ // allocated and the endpoints are published as a set of endpoints rather
+ // than a virtual IP.
// "NodePort" builds on ClusterIP and allocates a port on every node which
- // routes to the clusterIP.
- // "LoadBalancer" builds on NodePort and creates an
- // external load-balancer (if supported in the current cloud) which routes
- // to the clusterIP.
+ // routes to the same endpoints as the clusterIP.
+ // "LoadBalancer" builds on NodePort and creates an external load-balancer
+ // (if supported in the current cloud) which routes to the same endpoints
+ // as the clusterIP.
+ // "ExternalName" aliases this service to the specified externalName.
+ // Several other fields do not apply to ExternalName services.
// More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types
// +optional
optional string type = 4;
@@ -4387,10 +4923,10 @@ message ServiceSpec {
// +optional
repeated string loadBalancerSourceRanges = 9;
- // externalName is the external reference that kubedns or equivalent will
- // return as a CNAME record for this service. No proxying will be involved.
- // Must be a valid RFC-1123 hostname (https://tools.ietf.org/html/rfc1123)
- // and requires Type to be ExternalName.
+ // externalName is the external reference that discovery mechanisms will
+ // return as an alias for this service (e.g. a DNS CNAME record). No
+ // proxying will be involved. Must be a lowercase RFC-1123 hostname
+ // (https://tools.ietf.org/html/rfc1123) and requires Type to be
// +optional
optional string externalName = 10;
@@ -4404,25 +4940,89 @@ message ServiceSpec {
optional string externalTrafficPolicy = 11;
// healthCheckNodePort specifies the healthcheck nodePort for the service.
- // If not specified, HealthCheckNodePort is created by the service api
- // backend with the allocated nodePort. Will use user-specified nodePort value
- // if specified by the client. Only effects when Type is set to LoadBalancer
- // and ExternalTrafficPolicy is set to Local.
+ // This only applies when type is set to LoadBalancer and
+ // externalTrafficPolicy is set to Local. If a value is specified, is
+ // in-range, and is not in use, it will be used. If not specified, a value
+ // will be automatically allocated. External systems (e.g. load-balancers)
+ // can use this port to determine if a given node holds endpoints for this
+ // service or not. If this field is specified when creating a Service
+ // which does not need it, creation will fail. This field will be wiped
+ // when updating a Service to no longer need it (e.g. changing type).
// +optional
optional int32 healthCheckNodePort = 12;
- // publishNotReadyAddresses, when set to true, indicates that DNS implementations
- // must publish the notReadyAddresses of subsets for the Endpoints associated with
- // the Service. The default value is false.
- // The primary use case for setting this field is to use a StatefulSet's Headless Service
- // to propagate SRV records for its Pods without respect to their readiness for purpose
- // of peer discovery.
+ // publishNotReadyAddresses indicates that any agent which deals with endpoints for this
+ // Service should disregard any indications of ready/not-ready.
+ // The primary use case for setting this field is for a StatefulSet's Headless Service to
+ // propagate SRV DNS records for its Pods for the purpose of peer discovery.
+ // The Kubernetes controllers that generate Endpoints and EndpointSlice resources for
+ // Services interpret this to mean that all endpoints are considered "ready" even if the
+ // Pods themselves are not. Agents which consume only Kubernetes generated endpoints
+ // through the Endpoints or EndpointSlice resources can safely assume this behavior.
// +optional
optional bool publishNotReadyAddresses = 13;
// sessionAffinityConfig contains the configurations of session affinity.
// +optional
optional SessionAffinityConfig sessionAffinityConfig = 14;
+
+ // topologyKeys is a preference-order list of topology keys which
+ // implementations of services should use to preferentially sort endpoints
+ // when accessing this Service, it can not be used at the same time as
+ // externalTrafficPolicy=Local.
+ // Topology keys must be valid label keys and at most 16 keys may be specified.
+ // Endpoints are chosen based on the first topology key with available backends.
+ // If this field is specified and all entries have no backends that match
+ // the topology of the client, the service has no backends for that client
+ // and connections should fail.
+ // The special value "*" may be used to mean "any topology". This catch-all
+ // value, if used, only makes sense as the last value in the list.
+ // If this is not specified or empty, no topology constraints will be applied.
+ // This field is alpha-level and is only honored by servers that enable the ServiceTopology feature.
+ // +optional
+ repeated string topologyKeys = 16;
+
+ // IPFamilies is a list of IP families (e.g. IPv4, IPv6) assigned to this
+ // service, and is gated by the "IPv6DualStack" feature gate. This field
+ // is usually assigned automatically based on cluster configuration and the
+ // ipFamilyPolicy field. If this field is specified manually, the requested
+ // family is available in the cluster, and ipFamilyPolicy allows it, it
+ // will be used; otherwise creation of the service will fail. This field
+ // is conditionally mutable: it allows for adding or removing a secondary
+ // IP family, but it does not allow changing the primary IP family of the
+ // Service. Valid values are "IPv4" and "IPv6". This field only applies
+ // to Services of types ClusterIP, NodePort, and LoadBalancer, and does
+ // apply to "headless" services. This field will be wiped when updating a
+ // Service to type ExternalName.
+ //
+ // This field may hold a maximum of two entries (dual-stack families, in
+ // either order). These families must correspond to the values of the
+ // clusterIPs field, if specified. Both clusterIPs and ipFamilies are
+ // governed by the ipFamilyPolicy field.
+ // +listType=atomic
+ // +optional
+ repeated string ipFamilies = 19;
+
+ // IPFamilyPolicy represents the dual-stack-ness requested or required by
+ // this Service, and is gated by the "IPv6DualStack" feature gate. If
+ // there is no value provided, then this field will be set to SingleStack.
+ // Services can be "SingleStack" (a single IP family), "PreferDualStack"
+ // (two IP families on dual-stack configured clusters or a single IP family
+ // on single-stack clusters), or "RequireDualStack" (two IP families on
+ // dual-stack configured clusters, otherwise fail). The ipFamilies and
+ // clusterIPs fields depend on the value of this field. This field will be
+ // wiped when updating a service to type ExternalName.
+ // +optional
+ optional string ipFamilyPolicy = 17;
+
+ // allocateLoadBalancerNodePorts defines if NodePorts will be automatically
+ // allocated for services with type LoadBalancer. Default is "true". It may be
+ // set to "false" if the cluster load-balancer does not rely on NodePorts.
+ // allocateLoadBalancerNodePorts may only be set for services with type LoadBalancer
+ // and will be cleared if the type is changed to any other type.
+ // This field is alpha-level and is only honored by servers that enable the ServiceLBNodePortControl feature.
+ // +optional
+ optional bool allocateLoadBalancerNodePorts = 20;
}
// ServiceStatus represents the current status of a service.
@@ -4431,6 +5031,14 @@ message ServiceStatus {
// if one is present.
// +optional
optional LoadBalancerStatus loadBalancer = 1;
+
+ // Current service state
+ // +optional
+ // +patchMergeKey=type
+ // +patchStrategy=merge
+ // +listType=map
+ // +listMapKey=type
+ repeated k8s.io.apimachinery.pkg.apis.meta.v1.Condition conditions = 2;
}
// SessionAffinityConfig represents the configurations of session affinity.
@@ -4531,7 +5139,7 @@ message Taint {
// Required. The taint key to be applied to a node.
optional string key = 1;
- // Required. The taint value corresponding to the taint key.
+ // The taint value corresponding to the taint key.
// +optional
optional string value = 2;
@@ -4601,6 +5209,64 @@ message TopologySelectorTerm {
repeated TopologySelectorLabelRequirement matchLabelExpressions = 1;
}
+// TopologySpreadConstraint specifies how to spread matching pods among the given topology.
+message TopologySpreadConstraint {
+ // MaxSkew describes the degree to which pods may be unevenly distributed.
+ // When `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted difference
+ // between the number of matching pods in the target topology and the global minimum.
+ // For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same
+ // labelSelector spread as 1/1/0:
+ // +-------+-------+-------+
+ // | zone1 | zone2 | zone3 |
+ // +-------+-------+-------+
+ // | P | P | |
+ // +-------+-------+-------+
+ // - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 1/1/1;
+ // scheduling it onto zone1(zone2) would make the ActualSkew(2-0) on zone1(zone2)
+ // violate MaxSkew(1).
+ // - if MaxSkew is 2, incoming pod can be scheduled onto any zone.
+ // When `whenUnsatisfiable=ScheduleAnyway`, it is used to give higher precedence
+ // to topologies that satisfy it.
+ // It's a required field. Default value is 1 and 0 is not allowed.
+ optional int32 maxSkew = 1;
+
+ // TopologyKey is the key of node labels. Nodes that have a label with this key
+ // and identical values are considered to be in the same topology.
+ // We consider each <key, value> as a "bucket", and try to put balanced number
+ // of pods into each bucket.
+ // It's a required field.
+ optional string topologyKey = 2;
+
+ // WhenUnsatisfiable indicates how to deal with a pod if it doesn't satisfy
+ // the spread constraint.
+ // - DoNotSchedule (default) tells the scheduler not to schedule it.
+ // - ScheduleAnyway tells the scheduler to schedule the pod in any location,
+ // but giving higher precedence to topologies that would help reduce the
+ // skew.
+ // A constraint is considered "Unsatisfiable" for an incoming pod
+ // if and only if every possible node assigment for that pod would violate
+ // "MaxSkew" on some topology.
+ // For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same
+ // labelSelector spread as 3/1/1:
+ // +-------+-------+-------+
+ // | zone1 | zone2 | zone3 |
+ // +-------+-------+-------+
+ // | P P P | P | P |
+ // +-------+-------+-------+
+ // If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled
+ // to zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) satisfies
+ // MaxSkew(1). In other words, the cluster can still be imbalanced, but scheduler
+ // won't make it *more* imbalanced.
+ // It's a required field.
+ optional string whenUnsatisfiable = 3;
+
+ // LabelSelector is used to find matching pods.
+ // Pods that match this label selector are counted to determine the number of pods
+ // in their corresponding topology domain.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector labelSelector = 4;
+}
+
// TypedLocalObjectReference contains enough information to let you locate the
// typed referenced object inside the same namespace.
message TypedLocalObjectReference {
@@ -4669,7 +5335,6 @@ message VolumeMount {
// Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment.
// Defaults to "" (volume's root).
// SubPathExpr and SubPath are mutually exclusive.
- // This field is beta in 1.15.
// +optional
optional string subPathExpr = 6;
}
@@ -4749,12 +5414,12 @@ message VolumeSource {
// ISCSI represents an ISCSI Disk resource that is attached to a
// kubelet's host machine and then exposed to the pod.
- // More info: https://releases.k8s.io/HEAD/examples/volumes/iscsi/README.md
+ // More info: https://examples.k8s.io/volumes/iscsi/README.md
// +optional
optional ISCSIVolumeSource iscsi = 8;
// Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime.
- // More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md
+ // More info: https://examples.k8s.io/volumes/glusterfs/README.md
// +optional
optional GlusterfsVolumeSource glusterfs = 9;
@@ -4765,7 +5430,7 @@ message VolumeSource {
optional PersistentVolumeClaimVolumeSource persistentVolumeClaim = 10;
// RBD represents a Rados Block Device mount on the host that shares a pod's lifetime.
- // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md
+ // More info: https://examples.k8s.io/volumes/rbd/README.md
// +optional
optional RBDVolumeSource rbd = 11;
@@ -4774,8 +5439,8 @@ message VolumeSource {
// +optional
optional FlexVolumeSource flexVolume = 12;
- // Cinder represents a cinder volume attached and mounted on kubelets host machine
- // More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
+ // Cinder represents a cinder volume attached and mounted on kubelets host machine.
+ // More info: https://examples.k8s.io/mysql-cinder-pd/README.md
// +optional
optional CinderVolumeSource cinder = 13;
@@ -4833,9 +5498,37 @@ message VolumeSource {
// +optional
optional StorageOSVolumeSource storageos = 27;
- // CSI (Container Storage Interface) represents storage that is handled by an external CSI driver (Alpha feature).
+ // CSI (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature).
// +optional
optional CSIVolumeSource csi = 28;
+
+ // Ephemeral represents a volume that is handled by a cluster storage driver (Alpha feature).
+ // The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts,
+ // and deleted when the pod is removed.
+ //
+ // Use this if:
+ // a) the volume is only needed while the pod runs,
+ // b) features of normal volumes like restoring from snapshot or capacity
+ // tracking are needed,
+ // c) the storage driver is specified through a storage class, and
+ // d) the storage driver supports dynamic volume provisioning through
+ // a PersistentVolumeClaim (see EphemeralVolumeSource for more
+ // information on the connection between this volume type
+ // and PersistentVolumeClaim).
+ //
+ // Use PersistentVolumeClaim or one of the vendor-specific
+ // APIs for volumes that persist for longer than the lifecycle
+ // of an individual pod.
+ //
+ // Use CSI for light-weight local ephemeral volumes if the CSI driver is meant to
+ // be used that way - see the documentation of the driver for
+ // more information.
+ //
+ // A pod can use both types of ephemeral volumes and
+ // persistent volumes at the same time.
+ //
+ // +optional
+ optional EphemeralVolumeSource ephemeral = 29;
}
// Represents a vSphere volume resource.
@@ -4871,15 +5564,20 @@ message WeightedPodAffinityTerm {
// WindowsSecurityContextOptions contain Windows-specific options and credentials.
message WindowsSecurityContextOptions {
// GMSACredentialSpecName is the name of the GMSA credential spec to use.
- // This field is alpha-level and is only honored by servers that enable the WindowsGMSA feature flag.
// +optional
optional string gmsaCredentialSpecName = 1;
// GMSACredentialSpec is where the GMSA admission webhook
// (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the
// GMSA credential spec named by the GMSACredentialSpecName field.
- // This field is alpha-level and is only honored by servers that enable the WindowsGMSA feature flag.
// +optional
optional string gmsaCredentialSpec = 2;
+
+ // The UserName in Windows to run the entrypoint of the container process.
+ // Defaults to the user specified in image metadata if unspecified.
+ // May also be set in PodSecurityContext. If set in both SecurityContext and
+ // PodSecurityContext, the value specified in SecurityContext takes precedence.
+ // +optional
+ optional string runAsUserName = 3;
}