Unverified Commit 5b32e4d2 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #50457 from screeley44/volumetype-api

Automatic merge from submit-queue (batch tested with PRs 50457, 55558, 53483, 55731, 52842). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. VolumeMode and VolumeDevice api **What this PR does / why we need it:** Adds volumeType api to PV and PVC for local block support based on this proposal (https://github.com/kubernetes/community/pull/805) and this feature issue: https://github.com/kubernetes/features/issues/351 **Special notes for your reviewer:** There are other PR changes coming, this just simply creates the api fields #53385 - binding logic changes dependent on this change **Release note:** NONE Notes will be added in subsequents PR with the volume plugin changes, CRI, etc... cc @msau42 @liggitt @jsafrane @mtanino @saad-ali @erinboyd
parents cb91e2d9 de4138d8
...@@ -73936,6 +73936,15 @@ ...@@ -73936,6 +73936,15 @@
"description": "Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false.", "description": "Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false.",
"type": "boolean" "type": "boolean"
}, },
"volumeDevices": {
"description": "volumeDevices is the list of block devices to be used by the container. This is an alpha feature and may change in the future.",
"type": "array",
"items": {
"$ref": "#/definitions/io.k8s.api.core.v1.VolumeDevice"
},
"x-kubernetes-patch-merge-key": "devicePath",
"x-kubernetes-patch-strategy": "merge"
},
"volumeMounts": { "volumeMounts": {
"description": "Pod volumes to mount into the container's filesystem. Cannot be updated.", "description": "Pod volumes to mount into the container's filesystem. Cannot be updated.",
"type": "array", "type": "array",
...@@ -75704,6 +75713,10 @@ ...@@ -75704,6 +75713,10 @@
"description": "Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1", "description": "Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1",
"type": "string" "type": "string"
}, },
"volumeMode": {
"description": "volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec. This is an alpha feature and may change in the future.",
"type": "string"
},
"volumeName": { "volumeName": {
"description": "VolumeName is the binding reference to the PersistentVolume backing this claim.", "description": "VolumeName is the binding reference to the PersistentVolume backing this claim.",
"type": "string" "type": "string"
...@@ -75912,6 +75925,10 @@ ...@@ -75912,6 +75925,10 @@
"description": "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", "description": "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",
"$ref": "#/definitions/io.k8s.api.core.v1.StorageOSPersistentVolumeSource" "$ref": "#/definitions/io.k8s.api.core.v1.StorageOSPersistentVolumeSource"
}, },
"volumeMode": {
"description": "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 an alpha feature and may change in the future.",
"type": "string"
},
"vsphereVolume": { "vsphereVolume": {
"description": "VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine", "description": "VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine",
"$ref": "#/definitions/io.k8s.api.core.v1.VsphereVirtualDiskVolumeSource" "$ref": "#/definitions/io.k8s.api.core.v1.VsphereVirtualDiskVolumeSource"
...@@ -77762,6 +77779,23 @@ ...@@ -77762,6 +77779,23 @@
} }
} }
}, },
"io.k8s.api.core.v1.VolumeDevice": {
"description": "volumeDevice describes a mapping of a raw block device within a container.",
"required": [
"name",
"devicePath"
],
"properties": {
"devicePath": {
"description": "devicePath is the path inside of the container that the device will be mapped to.",
"type": "string"
},
"name": {
"description": "name must match the name of a persistentVolumeClaim in the pod",
"type": "string"
}
}
},
"io.k8s.api.core.v1.VolumeMount": { "io.k8s.api.core.v1.VolumeMount": {
"description": "VolumeMount describes a mounting of a Volume within a container.", "description": "VolumeMount describes a mounting of a Volume within a container.",
"required": [ "required": [
...@@ -7825,6 +7825,13 @@ ...@@ -7825,6 +7825,13 @@
}, },
"description": "Pod volumes to mount into the container's filesystem. Cannot be updated." "description": "Pod volumes to mount into the container's filesystem. Cannot be updated."
}, },
"volumeDevices": {
"type": "array",
"items": {
"$ref": "v1.VolumeDevice"
},
"description": "volumeDevices is the list of block devices to be used by the container. This is an alpha feature and may change in the future."
},
"livenessProbe": { "livenessProbe": {
"$ref": "v1.Probe", "$ref": "v1.Probe",
"description": "Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes" "description": "Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes"
...@@ -8077,6 +8084,24 @@ ...@@ -8077,6 +8084,24 @@
"id": "v1.MountPropagationMode", "id": "v1.MountPropagationMode",
"properties": {} "properties": {}
}, },
"v1.VolumeDevice": {
"id": "v1.VolumeDevice",
"description": "volumeDevice describes a mapping of a raw block device within a container.",
"required": [
"name",
"devicePath"
],
"properties": {
"name": {
"type": "string",
"description": "name must match the name of a persistentVolumeClaim in the pod"
},
"devicePath": {
"type": "string",
"description": "devicePath is the path inside of the container that the device will be mapped to."
}
}
},
"v1.Probe": { "v1.Probe": {
"id": "v1.Probe", "id": "v1.Probe",
"description": "Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.", "description": "Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.",
...@@ -9268,6 +9293,10 @@ ...@@ -9268,6 +9293,10 @@
"storageClassName": { "storageClassName": {
"type": "string", "type": "string",
"description": "Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1" "description": "Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1"
},
"volumeMode": {
"$ref": "v1.PersistentVolumeMode",
"description": "volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec. This is an alpha feature and may change in the future."
} }
} }
}, },
...@@ -9275,6 +9304,10 @@ ...@@ -9275,6 +9304,10 @@
"id": "v1.PersistentVolumeAccessMode", "id": "v1.PersistentVolumeAccessMode",
"properties": {} "properties": {}
}, },
"v1.PersistentVolumeMode": {
"id": "v1.PersistentVolumeMode",
"properties": {}
},
"v1.PersistentVolumeClaimStatus": { "v1.PersistentVolumeClaimStatus": {
"id": "v1.PersistentVolumeClaimStatus", "id": "v1.PersistentVolumeClaimStatus",
"description": "PersistentVolumeClaimStatus is the current status of a persistent volume claim.", "description": "PersistentVolumeClaimStatus is the current status of a persistent volume claim.",
......
...@@ -5459,6 +5459,13 @@ ...@@ -5459,6 +5459,13 @@
}, },
"description": "Pod volumes to mount into the container's filesystem. Cannot be updated." "description": "Pod volumes to mount into the container's filesystem. Cannot be updated."
}, },
"volumeDevices": {
"type": "array",
"items": {
"$ref": "v1.VolumeDevice"
},
"description": "volumeDevices is the list of block devices to be used by the container. This is an alpha feature and may change in the future."
},
"livenessProbe": { "livenessProbe": {
"$ref": "v1.Probe", "$ref": "v1.Probe",
"description": "Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes" "description": "Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes"
...@@ -5711,6 +5718,24 @@ ...@@ -5711,6 +5718,24 @@
"id": "v1.MountPropagationMode", "id": "v1.MountPropagationMode",
"properties": {} "properties": {}
}, },
"v1.VolumeDevice": {
"id": "v1.VolumeDevice",
"description": "volumeDevice describes a mapping of a raw block device within a container.",
"required": [
"name",
"devicePath"
],
"properties": {
"name": {
"type": "string",
"description": "name must match the name of a persistentVolumeClaim in the pod"
},
"devicePath": {
"type": "string",
"description": "devicePath is the path inside of the container that the device will be mapped to."
}
}
},
"v1.Probe": { "v1.Probe": {
"id": "v1.Probe", "id": "v1.Probe",
"description": "Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.", "description": "Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.",
...@@ -6576,6 +6601,10 @@ ...@@ -6576,6 +6601,10 @@
"storageClassName": { "storageClassName": {
"type": "string", "type": "string",
"description": "Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1" "description": "Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1"
},
"volumeMode": {
"$ref": "v1.PersistentVolumeMode",
"description": "volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec. This is an alpha feature and may change in the future."
} }
} }
}, },
...@@ -6583,6 +6612,10 @@ ...@@ -6583,6 +6612,10 @@
"id": "v1.PersistentVolumeAccessMode", "id": "v1.PersistentVolumeAccessMode",
"properties": {} "properties": {}
}, },
"v1.PersistentVolumeMode": {
"id": "v1.PersistentVolumeMode",
"properties": {}
},
"v1.PersistentVolumeClaimStatus": { "v1.PersistentVolumeClaimStatus": {
"id": "v1.PersistentVolumeClaimStatus", "id": "v1.PersistentVolumeClaimStatus",
"description": "PersistentVolumeClaimStatus is the current status of a persistent volume claim.", "description": "PersistentVolumeClaimStatus is the current status of a persistent volume claim.",
......
...@@ -7824,6 +7824,13 @@ ...@@ -7824,6 +7824,13 @@
}, },
"description": "Pod volumes to mount into the container's filesystem. Cannot be updated." "description": "Pod volumes to mount into the container's filesystem. Cannot be updated."
}, },
"volumeDevices": {
"type": "array",
"items": {
"$ref": "v1.VolumeDevice"
},
"description": "volumeDevices is the list of block devices to be used by the container. This is an alpha feature and may change in the future."
},
"livenessProbe": { "livenessProbe": {
"$ref": "v1.Probe", "$ref": "v1.Probe",
"description": "Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes" "description": "Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes"
...@@ -8076,6 +8083,24 @@ ...@@ -8076,6 +8083,24 @@
"id": "v1.MountPropagationMode", "id": "v1.MountPropagationMode",
"properties": {} "properties": {}
}, },
"v1.VolumeDevice": {
"id": "v1.VolumeDevice",
"description": "volumeDevice describes a mapping of a raw block device within a container.",
"required": [
"name",
"devicePath"
],
"properties": {
"name": {
"type": "string",
"description": "name must match the name of a persistentVolumeClaim in the pod"
},
"devicePath": {
"type": "string",
"description": "devicePath is the path inside of the container that the device will be mapped to."
}
}
},
"v1.Probe": { "v1.Probe": {
"id": "v1.Probe", "id": "v1.Probe",
"description": "Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.", "description": "Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.",
...@@ -9266,6 +9291,10 @@ ...@@ -9266,6 +9291,10 @@
"storageClassName": { "storageClassName": {
"type": "string", "type": "string",
"description": "Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1" "description": "Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1"
},
"volumeMode": {
"$ref": "v1.PersistentVolumeMode",
"description": "volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec. This is an alpha feature and may change in the future."
} }
} }
}, },
...@@ -9273,6 +9302,10 @@ ...@@ -9273,6 +9302,10 @@
"id": "v1.PersistentVolumeAccessMode", "id": "v1.PersistentVolumeAccessMode",
"properties": {} "properties": {}
}, },
"v1.PersistentVolumeMode": {
"id": "v1.PersistentVolumeMode",
"properties": {}
},
"v1.PersistentVolumeClaimStatus": { "v1.PersistentVolumeClaimStatus": {
"id": "v1.PersistentVolumeClaimStatus", "id": "v1.PersistentVolumeClaimStatus",
"description": "PersistentVolumeClaimStatus is the current status of a persistent volume claim.", "description": "PersistentVolumeClaimStatus is the current status of a persistent volume claim.",
......
...@@ -2799,6 +2799,13 @@ ...@@ -2799,6 +2799,13 @@
}, },
"description": "Pod volumes to mount into the container's filesystem. Cannot be updated." "description": "Pod volumes to mount into the container's filesystem. Cannot be updated."
}, },
"volumeDevices": {
"type": "array",
"items": {
"$ref": "v1.VolumeDevice"
},
"description": "volumeDevices is the list of block devices to be used by the container. This is an alpha feature and may change in the future."
},
"livenessProbe": { "livenessProbe": {
"$ref": "v1.Probe", "$ref": "v1.Probe",
"description": "Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes" "description": "Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes"
...@@ -3051,6 +3058,24 @@ ...@@ -3051,6 +3058,24 @@
"id": "v1.MountPropagationMode", "id": "v1.MountPropagationMode",
"properties": {} "properties": {}
}, },
"v1.VolumeDevice": {
"id": "v1.VolumeDevice",
"description": "volumeDevice describes a mapping of a raw block device within a container.",
"required": [
"name",
"devicePath"
],
"properties": {
"name": {
"type": "string",
"description": "name must match the name of a persistentVolumeClaim in the pod"
},
"devicePath": {
"type": "string",
"description": "devicePath is the path inside of the container that the device will be mapped to."
}
}
},
"v1.Probe": { "v1.Probe": {
"id": "v1.Probe", "id": "v1.Probe",
"description": "Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.", "description": "Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.",
......
...@@ -2854,6 +2854,13 @@ ...@@ -2854,6 +2854,13 @@
}, },
"description": "Pod volumes to mount into the container's filesystem. Cannot be updated." "description": "Pod volumes to mount into the container's filesystem. Cannot be updated."
}, },
"volumeDevices": {
"type": "array",
"items": {
"$ref": "v1.VolumeDevice"
},
"description": "volumeDevices is the list of block devices to be used by the container. This is an alpha feature and may change in the future."
},
"livenessProbe": { "livenessProbe": {
"$ref": "v1.Probe", "$ref": "v1.Probe",
"description": "Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes" "description": "Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes"
...@@ -3106,6 +3113,24 @@ ...@@ -3106,6 +3113,24 @@
"id": "v1.MountPropagationMode", "id": "v1.MountPropagationMode",
"properties": {} "properties": {}
}, },
"v1.VolumeDevice": {
"id": "v1.VolumeDevice",
"description": "volumeDevice describes a mapping of a raw block device within a container.",
"required": [
"name",
"devicePath"
],
"properties": {
"name": {
"type": "string",
"description": "name must match the name of a persistentVolumeClaim in the pod"
},
"devicePath": {
"type": "string",
"description": "devicePath is the path inside of the container that the device will be mapped to."
}
}
},
"v1.Probe": { "v1.Probe": {
"id": "v1.Probe", "id": "v1.Probe",
"description": "Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.", "description": "Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.",
......
...@@ -2854,6 +2854,13 @@ ...@@ -2854,6 +2854,13 @@
}, },
"description": "Pod volumes to mount into the container's filesystem. Cannot be updated." "description": "Pod volumes to mount into the container's filesystem. Cannot be updated."
}, },
"volumeDevices": {
"type": "array",
"items": {
"$ref": "v1.VolumeDevice"
},
"description": "volumeDevices is the list of block devices to be used by the container. This is an alpha feature and may change in the future."
},
"livenessProbe": { "livenessProbe": {
"$ref": "v1.Probe", "$ref": "v1.Probe",
"description": "Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes" "description": "Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes"
...@@ -3106,6 +3113,24 @@ ...@@ -3106,6 +3113,24 @@
"id": "v1.MountPropagationMode", "id": "v1.MountPropagationMode",
"properties": {} "properties": {}
}, },
"v1.VolumeDevice": {
"id": "v1.VolumeDevice",
"description": "volumeDevice describes a mapping of a raw block device within a container.",
"required": [
"name",
"devicePath"
],
"properties": {
"name": {
"type": "string",
"description": "name must match the name of a persistentVolumeClaim in the pod"
},
"devicePath": {
"type": "string",
"description": "devicePath is the path inside of the container that the device will be mapped to."
}
}
},
"v1.Probe": { "v1.Probe": {
"id": "v1.Probe", "id": "v1.Probe",
"description": "Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.", "description": "Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.",
......
...@@ -8467,6 +8467,13 @@ ...@@ -8467,6 +8467,13 @@
}, },
"description": "Pod volumes to mount into the container's filesystem. Cannot be updated." "description": "Pod volumes to mount into the container's filesystem. Cannot be updated."
}, },
"volumeDevices": {
"type": "array",
"items": {
"$ref": "v1.VolumeDevice"
},
"description": "volumeDevices is the list of block devices to be used by the container. This is an alpha feature and may change in the future."
},
"livenessProbe": { "livenessProbe": {
"$ref": "v1.Probe", "$ref": "v1.Probe",
"description": "Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes" "description": "Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes"
...@@ -8719,6 +8726,24 @@ ...@@ -8719,6 +8726,24 @@
"id": "v1.MountPropagationMode", "id": "v1.MountPropagationMode",
"properties": {} "properties": {}
}, },
"v1.VolumeDevice": {
"id": "v1.VolumeDevice",
"description": "volumeDevice describes a mapping of a raw block device within a container.",
"required": [
"name",
"devicePath"
],
"properties": {
"name": {
"type": "string",
"description": "name must match the name of a persistentVolumeClaim in the pod"
},
"devicePath": {
"type": "string",
"description": "devicePath is the path inside of the container that the device will be mapped to."
}
}
},
"v1.Probe": { "v1.Probe": {
"id": "v1.Probe", "id": "v1.Probe",
"description": "Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.", "description": "Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.",
......
...@@ -20323,6 +20323,10 @@ ...@@ -20323,6 +20323,10 @@
"storageClassName": { "storageClassName": {
"type": "string", "type": "string",
"description": "Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1" "description": "Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1"
},
"volumeMode": {
"$ref": "v1.PersistentVolumeMode",
"description": "volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec. This is an alpha feature and may change in the future."
} }
} }
}, },
...@@ -20386,6 +20390,10 @@ ...@@ -20386,6 +20390,10 @@
} }
} }
}, },
"v1.PersistentVolumeMode": {
"id": "v1.PersistentVolumeMode",
"properties": {}
},
"v1.PersistentVolumeClaimStatus": { "v1.PersistentVolumeClaimStatus": {
"id": "v1.PersistentVolumeClaimStatus", "id": "v1.PersistentVolumeClaimStatus",
"description": "PersistentVolumeClaimStatus is the current status of a persistent volume claim.", "description": "PersistentVolumeClaimStatus is the current status of a persistent volume claim.",
...@@ -20621,6 +20629,10 @@ ...@@ -20621,6 +20629,10 @@
"type": "string" "type": "string"
}, },
"description": "A list of mount options, e.g. [\"ro\", \"soft\"]. Not validated - mount will simply fail if one is invalid. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options" "description": "A list of mount options, e.g. [\"ro\", \"soft\"]. Not validated - mount will simply fail if one is invalid. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options"
},
"volumeMode": {
"$ref": "v1.PersistentVolumeMode",
"description": "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 an alpha feature and may change in the future."
} }
} }
}, },
...@@ -22147,6 +22159,13 @@ ...@@ -22147,6 +22159,13 @@
}, },
"description": "Pod volumes to mount into the container's filesystem. Cannot be updated." "description": "Pod volumes to mount into the container's filesystem. Cannot be updated."
}, },
"volumeDevices": {
"type": "array",
"items": {
"$ref": "v1.VolumeDevice"
},
"description": "volumeDevices is the list of block devices to be used by the container. This is an alpha feature and may change in the future."
},
"livenessProbe": { "livenessProbe": {
"$ref": "v1.Probe", "$ref": "v1.Probe",
"description": "Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes" "description": "Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes"
...@@ -22385,6 +22404,24 @@ ...@@ -22385,6 +22404,24 @@
"id": "v1.MountPropagationMode", "id": "v1.MountPropagationMode",
"properties": {} "properties": {}
}, },
"v1.VolumeDevice": {
"id": "v1.VolumeDevice",
"description": "volumeDevice describes a mapping of a raw block device within a container.",
"required": [
"name",
"devicePath"
],
"properties": {
"name": {
"type": "string",
"description": "name must match the name of a persistentVolumeClaim in the pod"
},
"devicePath": {
"type": "string",
"description": "devicePath is the path inside of the container that the device will be mapped to."
}
}
},
"v1.Probe": { "v1.Probe": {
"id": "v1.Probe", "id": "v1.Probe",
"description": "Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.", "description": "Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.",
......
...@@ -955,6 +955,13 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; } ...@@ -955,6 +955,13 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td> <td class="tableblock halign-left valign-top"></td>
</tr> </tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">volumeMode</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec. This is an alpha feature and may change in the future.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1_persistentvolumemode">v1.PersistentVolumeMode</a></p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody> </tbody>
</table> </table>
...@@ -3074,6 +3081,10 @@ When an object is created, the system will populate this list with the current s ...@@ -3074,6 +3081,10 @@ When an object is created, the system will populate this list with the current s
</div> </div>
<div class="sect2"> <div class="sect2">
<h3 id="_v1_persistentvolumemode">v1.PersistentVolumeMode</h3>
</div>
<div class="sect2">
<h3 id="_v1_deleteoptions">v1.DeleteOptions</h3> <h3 id="_v1_deleteoptions">v1.DeleteOptions</h3>
<div class="paragraph"> <div class="paragraph">
<p>DeleteOptions may be provided when deleting an API object.</p> <p>DeleteOptions may be provided when deleting an API object.</p>
...@@ -3462,6 +3473,47 @@ When an object is created, the system will populate this list with the current s ...@@ -3462,6 +3473,47 @@ When an object is created, the system will populate this list with the current s
</div> </div>
<div class="sect2"> <div class="sect2">
<h3 id="_v1_weightedpodaffinityterm">v1.WeightedPodAffinityTerm</h3>
<div class="paragraph">
<p>The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)</p>
</div>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Name</th>
<th class="tableblock halign-left valign-top">Description</th>
<th class="tableblock halign-left valign-top">Required</th>
<th class="tableblock halign-left valign-top">Schema</th>
<th class="tableblock halign-left valign-top">Default</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">weight</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">weight associated with matching the corresponding podAffinityTerm, in the range 1-100.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">integer (int32)</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">podAffinityTerm</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Required. A pod affinity term, associated with the corresponding weight.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1_podaffinityterm">v1.PodAffinityTerm</a></p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody>
</table>
</div>
<div class="sect2">
<h3 id="_v1_probe">v1.Probe</h3> <h3 id="_v1_probe">v1.Probe</h3>
<div class="paragraph"> <div class="paragraph">
<p>Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.</p> <p>Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.</p>
...@@ -3545,47 +3597,6 @@ When an object is created, the system will populate this list with the current s ...@@ -3545,47 +3597,6 @@ When an object is created, the system will populate this list with the current s
</div> </div>
<div class="sect2"> <div class="sect2">
<h3 id="_v1_weightedpodaffinityterm">v1.WeightedPodAffinityTerm</h3>
<div class="paragraph">
<p>The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)</p>
</div>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Name</th>
<th class="tableblock halign-left valign-top">Description</th>
<th class="tableblock halign-left valign-top">Required</th>
<th class="tableblock halign-left valign-top">Schema</th>
<th class="tableblock halign-left valign-top">Default</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">weight</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">weight associated with matching the corresponding podAffinityTerm, in the range 1-100.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">integer (int32)</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">podAffinityTerm</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Required. A pod affinity term, associated with the corresponding weight.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1_podaffinityterm">v1.PodAffinityTerm</a></p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody>
</table>
</div>
<div class="sect2">
<h3 id="_v1_rollingupdatestatefulsetstrategy">v1.RollingUpdateStatefulSetStrategy</h3> <h3 id="_v1_rollingupdatestatefulsetstrategy">v1.RollingUpdateStatefulSetStrategy</h3>
<div class="paragraph"> <div class="paragraph">
<p>RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.</p> <p>RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.</p>
...@@ -5496,6 +5507,13 @@ Examples:<br> ...@@ -5496,6 +5507,13 @@ Examples:<br>
<td class="tableblock halign-left valign-top"></td> <td class="tableblock halign-left valign-top"></td>
</tr> </tr>
<tr> <tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">volumeDevices</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">volumeDevices is the list of block devices to be used by the container. This is an alpha feature and may change in the future.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1_volumedevice">v1.VolumeDevice</a> array</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">livenessProbe</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">livenessProbe</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: <a href="https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes">https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes</a></p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: <a href="https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes">https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes</a></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
...@@ -5985,6 +6003,47 @@ Examples:<br> ...@@ -5985,6 +6003,47 @@ Examples:<br>
</div> </div>
<div class="sect2"> <div class="sect2">
<h3 id="_v1_volumedevice">v1.VolumeDevice</h3>
<div class="paragraph">
<p>volumeDevice describes a mapping of a raw block device within a container.</p>
</div>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Name</th>
<th class="tableblock halign-left valign-top">Description</th>
<th class="tableblock halign-left valign-top">Required</th>
<th class="tableblock halign-left valign-top">Schema</th>
<th class="tableblock halign-left valign-top">Default</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">name</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">name must match the name of a persistentVolumeClaim in the pod</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">devicePath</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">devicePath is the path inside of the container that the device will be mapped to.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody>
</table>
</div>
<div class="sect2">
<h3 id="_v1_nodeselectorrequirement">v1.NodeSelectorRequirement</h3> <h3 id="_v1_nodeselectorrequirement">v1.NodeSelectorRequirement</h3>
<div class="paragraph"> <div class="paragraph">
<p>A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.</p> <p>A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.</p>
......
...@@ -983,6 +983,13 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; } ...@@ -983,6 +983,13 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td> <td class="tableblock halign-left valign-top"></td>
</tr> </tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">volumeMode</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec. This is an alpha feature and may change in the future.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1_persistentvolumemode">v1.PersistentVolumeMode</a></p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody> </tbody>
</table> </table>
...@@ -3006,6 +3013,10 @@ When an object is created, the system will populate this list with the current s ...@@ -3006,6 +3013,10 @@ When an object is created, the system will populate this list with the current s
</div> </div>
<div class="sect2"> <div class="sect2">
<h3 id="_v1_persistentvolumemode">v1.PersistentVolumeMode</h3>
</div>
<div class="sect2">
<h3 id="_v1_deleteoptions">v1.DeleteOptions</h3> <h3 id="_v1_deleteoptions">v1.DeleteOptions</h3>
<div class="paragraph"> <div class="paragraph">
<p>DeleteOptions may be provided when deleting an API object.</p> <p>DeleteOptions may be provided when deleting an API object.</p>
...@@ -3459,6 +3470,47 @@ The StatefulSet guarantees that a given network identity will always map to the ...@@ -3459,6 +3470,47 @@ The StatefulSet guarantees that a given network identity will always map to the
</div> </div>
<div class="sect2"> <div class="sect2">
<h3 id="_v1_weightedpodaffinityterm">v1.WeightedPodAffinityTerm</h3>
<div class="paragraph">
<p>The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)</p>
</div>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Name</th>
<th class="tableblock halign-left valign-top">Description</th>
<th class="tableblock halign-left valign-top">Required</th>
<th class="tableblock halign-left valign-top">Schema</th>
<th class="tableblock halign-left valign-top">Default</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">weight</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">weight associated with matching the corresponding podAffinityTerm, in the range 1-100.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">integer (int32)</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">podAffinityTerm</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Required. A pod affinity term, associated with the corresponding weight.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1_podaffinityterm">v1.PodAffinityTerm</a></p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody>
</table>
</div>
<div class="sect2">
<h3 id="_v1_probe">v1.Probe</h3> <h3 id="_v1_probe">v1.Probe</h3>
<div class="paragraph"> <div class="paragraph">
<p>Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.</p> <p>Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.</p>
...@@ -3542,47 +3594,6 @@ The StatefulSet guarantees that a given network identity will always map to the ...@@ -3542,47 +3594,6 @@ The StatefulSet guarantees that a given network identity will always map to the
</div> </div>
<div class="sect2"> <div class="sect2">
<h3 id="_v1_weightedpodaffinityterm">v1.WeightedPodAffinityTerm</h3>
<div class="paragraph">
<p>The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)</p>
</div>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Name</th>
<th class="tableblock halign-left valign-top">Description</th>
<th class="tableblock halign-left valign-top">Required</th>
<th class="tableblock halign-left valign-top">Schema</th>
<th class="tableblock halign-left valign-top">Default</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">weight</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">weight associated with matching the corresponding podAffinityTerm, in the range 1-100.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">integer (int32)</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">podAffinityTerm</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Required. A pod affinity term, associated with the corresponding weight.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1_podaffinityterm">v1.PodAffinityTerm</a></p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody>
</table>
</div>
<div class="sect2">
<h3 id="_v1beta1_deploymentspec">v1beta1.DeploymentSpec</h3> <h3 id="_v1beta1_deploymentspec">v1beta1.DeploymentSpec</h3>
<div class="paragraph"> <div class="paragraph">
<p>DeploymentSpec is the specification of the desired behavior of the Deployment.</p> <p>DeploymentSpec is the specification of the desired behavior of the Deployment.</p>
...@@ -5631,6 +5642,13 @@ Examples:<br> ...@@ -5631,6 +5642,13 @@ Examples:<br>
<td class="tableblock halign-left valign-top"></td> <td class="tableblock halign-left valign-top"></td>
</tr> </tr>
<tr> <tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">volumeDevices</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">volumeDevices is the list of block devices to be used by the container. This is an alpha feature and may change in the future.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1_volumedevice">v1.VolumeDevice</a> array</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">livenessProbe</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">livenessProbe</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: <a href="https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes">https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes</a></p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: <a href="https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes">https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes</a></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
...@@ -5983,6 +6001,47 @@ Examples:<br> ...@@ -5983,6 +6001,47 @@ Examples:<br>
</div> </div>
<div class="sect2"> <div class="sect2">
<h3 id="_v1_volumedevice">v1.VolumeDevice</h3>
<div class="paragraph">
<p>volumeDevice describes a mapping of a raw block device within a container.</p>
</div>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Name</th>
<th class="tableblock halign-left valign-top">Description</th>
<th class="tableblock halign-left valign-top">Required</th>
<th class="tableblock halign-left valign-top">Schema</th>
<th class="tableblock halign-left valign-top">Default</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">name</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">name must match the name of a persistentVolumeClaim in the pod</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">devicePath</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">devicePath is the path inside of the container that the device will be mapped to.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody>
</table>
</div>
<div class="sect2">
<h3 id="_v1_nodeselectorrequirement">v1.NodeSelectorRequirement</h3> <h3 id="_v1_nodeselectorrequirement">v1.NodeSelectorRequirement</h3>
<div class="paragraph"> <div class="paragraph">
<p>A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.</p> <p>A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.</p>
......
...@@ -930,6 +930,13 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; } ...@@ -930,6 +930,13 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td> <td class="tableblock halign-left valign-top"></td>
</tr> </tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">volumeMode</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec. This is an alpha feature and may change in the future.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1_persistentvolumemode">v1.PersistentVolumeMode</a></p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody> </tbody>
</table> </table>
...@@ -3712,6 +3719,10 @@ When an object is created, the system will populate this list with the current s ...@@ -3712,6 +3719,10 @@ When an object is created, the system will populate this list with the current s
</div> </div>
<div class="sect2"> <div class="sect2">
<h3 id="_v1_persistentvolumemode">v1.PersistentVolumeMode</h3>
</div>
<div class="sect2">
<h3 id="_v1beta2_statefulset">v1beta2.StatefulSet</h3> <h3 id="_v1beta2_statefulset">v1beta2.StatefulSet</h3>
<div class="paragraph"> <div class="paragraph">
<p>StatefulSet represents a set of pods with consistent identities. Identities are defined as:<br> <p>StatefulSet represents a set of pods with consistent identities. Identities are defined as:<br>
...@@ -4165,6 +4176,47 @@ The StatefulSet guarantees that a given network identity will always map to the ...@@ -4165,6 +4176,47 @@ The StatefulSet guarantees that a given network identity will always map to the
</div> </div>
<div class="sect2"> <div class="sect2">
<h3 id="_v1_weightedpodaffinityterm">v1.WeightedPodAffinityTerm</h3>
<div class="paragraph">
<p>The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)</p>
</div>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Name</th>
<th class="tableblock halign-left valign-top">Description</th>
<th class="tableblock halign-left valign-top">Required</th>
<th class="tableblock halign-left valign-top">Schema</th>
<th class="tableblock halign-left valign-top">Default</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">weight</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">weight associated with matching the corresponding podAffinityTerm, in the range 1-100.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">integer (int32)</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">podAffinityTerm</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Required. A pod affinity term, associated with the corresponding weight.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1_podaffinityterm">v1.PodAffinityTerm</a></p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody>
</table>
</div>
<div class="sect2">
<h3 id="_v1_probe">v1.Probe</h3> <h3 id="_v1_probe">v1.Probe</h3>
<div class="paragraph"> <div class="paragraph">
<p>Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.</p> <p>Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.</p>
...@@ -4248,47 +4300,6 @@ The StatefulSet guarantees that a given network identity will always map to the ...@@ -4248,47 +4300,6 @@ The StatefulSet guarantees that a given network identity will always map to the
</div> </div>
<div class="sect2"> <div class="sect2">
<h3 id="_v1_weightedpodaffinityterm">v1.WeightedPodAffinityTerm</h3>
<div class="paragraph">
<p>The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)</p>
</div>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Name</th>
<th class="tableblock halign-left valign-top">Description</th>
<th class="tableblock halign-left valign-top">Required</th>
<th class="tableblock halign-left valign-top">Schema</th>
<th class="tableblock halign-left valign-top">Default</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">weight</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">weight associated with matching the corresponding podAffinityTerm, in the range 1-100.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">integer (int32)</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">podAffinityTerm</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Required. A pod affinity term, associated with the corresponding weight.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1_podaffinityterm">v1.PodAffinityTerm</a></p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody>
</table>
</div>
<div class="sect2">
<h3 id="_v1_secretkeyselector">v1.SecretKeySelector</h3> <h3 id="_v1_secretkeyselector">v1.SecretKeySelector</h3>
<div class="paragraph"> <div class="paragraph">
<p>SecretKeySelector selects a key of a Secret.</p> <p>SecretKeySelector selects a key of a Secret.</p>
...@@ -5965,6 +5976,13 @@ Examples:<br> ...@@ -5965,6 +5976,13 @@ Examples:<br>
<td class="tableblock halign-left valign-top"></td> <td class="tableblock halign-left valign-top"></td>
</tr> </tr>
<tr> <tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">volumeDevices</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">volumeDevices is the list of block devices to be used by the container. This is an alpha feature and may change in the future.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1_volumedevice">v1.VolumeDevice</a> array</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">livenessProbe</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">livenessProbe</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: <a href="https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes">https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes</a></p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: <a href="https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes">https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes</a></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
...@@ -6262,6 +6280,47 @@ Examples:<br> ...@@ -6262,6 +6280,47 @@ Examples:<br>
</div> </div>
<div class="sect2"> <div class="sect2">
<h3 id="_v1_volumedevice">v1.VolumeDevice</h3>
<div class="paragraph">
<p>volumeDevice describes a mapping of a raw block device within a container.</p>
</div>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Name</th>
<th class="tableblock halign-left valign-top">Description</th>
<th class="tableblock halign-left valign-top">Required</th>
<th class="tableblock halign-left valign-top">Schema</th>
<th class="tableblock halign-left valign-top">Default</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">name</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">name must match the name of a persistentVolumeClaim in the pod</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">devicePath</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">devicePath is the path inside of the container that the device will be mapped to.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody>
</table>
</div>
<div class="sect2">
<h3 id="_v1_nodeselectorrequirement">v1.NodeSelectorRequirement</h3> <h3 id="_v1_nodeselectorrequirement">v1.NodeSelectorRequirement</h3>
<div class="paragraph"> <div class="paragraph">
<p>A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.</p> <p>A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.</p>
......
...@@ -4447,6 +4447,13 @@ Examples:<br> ...@@ -4447,6 +4447,13 @@ Examples:<br>
<td class="tableblock halign-left valign-top"></td> <td class="tableblock halign-left valign-top"></td>
</tr> </tr>
<tr> <tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">volumeDevices</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">volumeDevices is the list of block devices to be used by the container. This is an alpha feature and may change in the future.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1_volumedevice">v1.VolumeDevice</a> array</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">livenessProbe</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">livenessProbe</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: <a href="https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes">https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes</a></p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: <a href="https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes">https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes</a></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
...@@ -4813,6 +4820,47 @@ Examples:<br> ...@@ -4813,6 +4820,47 @@ Examples:<br>
</div> </div>
<div class="sect2"> <div class="sect2">
<h3 id="_v1_volumedevice">v1.VolumeDevice</h3>
<div class="paragraph">
<p>volumeDevice describes a mapping of a raw block device within a container.</p>
</div>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Name</th>
<th class="tableblock halign-left valign-top">Description</th>
<th class="tableblock halign-left valign-top">Required</th>
<th class="tableblock halign-left valign-top">Schema</th>
<th class="tableblock halign-left valign-top">Default</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">name</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">name must match the name of a persistentVolumeClaim in the pod</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">devicePath</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">devicePath is the path inside of the container that the device will be mapped to.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody>
</table>
</div>
<div class="sect2">
<h3 id="_v1_nodeselectorrequirement">v1.NodeSelectorRequirement</h3> <h3 id="_v1_nodeselectorrequirement">v1.NodeSelectorRequirement</h3>
<div class="paragraph"> <div class="paragraph">
<p>A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.</p> <p>A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.</p>
......
...@@ -4598,6 +4598,13 @@ Examples:<br> ...@@ -4598,6 +4598,13 @@ Examples:<br>
<td class="tableblock halign-left valign-top"></td> <td class="tableblock halign-left valign-top"></td>
</tr> </tr>
<tr> <tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">volumeDevices</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">volumeDevices is the list of block devices to be used by the container. This is an alpha feature and may change in the future.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1_volumedevice">v1.VolumeDevice</a> array</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">livenessProbe</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">livenessProbe</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: <a href="https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes">https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes</a></p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: <a href="https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes">https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes</a></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
...@@ -4895,6 +4902,47 @@ Examples:<br> ...@@ -4895,6 +4902,47 @@ Examples:<br>
</div> </div>
<div class="sect2"> <div class="sect2">
<h3 id="_v1_volumedevice">v1.VolumeDevice</h3>
<div class="paragraph">
<p>volumeDevice describes a mapping of a raw block device within a container.</p>
</div>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Name</th>
<th class="tableblock halign-left valign-top">Description</th>
<th class="tableblock halign-left valign-top">Required</th>
<th class="tableblock halign-left valign-top">Schema</th>
<th class="tableblock halign-left valign-top">Default</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">name</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">name must match the name of a persistentVolumeClaim in the pod</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">devicePath</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">devicePath is the path inside of the container that the device will be mapped to.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody>
</table>
</div>
<div class="sect2">
<h3 id="_v1_nodeselectorrequirement">v1.NodeSelectorRequirement</h3> <h3 id="_v1_nodeselectorrequirement">v1.NodeSelectorRequirement</h3>
<div class="paragraph"> <div class="paragraph">
<p>A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.</p> <p>A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.</p>
......
...@@ -4454,6 +4454,13 @@ Examples:<br> ...@@ -4454,6 +4454,13 @@ Examples:<br>
<td class="tableblock halign-left valign-top"></td> <td class="tableblock halign-left valign-top"></td>
</tr> </tr>
<tr> <tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">volumeDevices</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">volumeDevices is the list of block devices to be used by the container. This is an alpha feature and may change in the future.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1_volumedevice">v1.VolumeDevice</a> array</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">livenessProbe</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">livenessProbe</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: <a href="https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes">https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes</a></p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: <a href="https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes">https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes</a></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
...@@ -4751,6 +4758,47 @@ Examples:<br> ...@@ -4751,6 +4758,47 @@ Examples:<br>
</div> </div>
<div class="sect2"> <div class="sect2">
<h3 id="_v1_volumedevice">v1.VolumeDevice</h3>
<div class="paragraph">
<p>volumeDevice describes a mapping of a raw block device within a container.</p>
</div>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Name</th>
<th class="tableblock halign-left valign-top">Description</th>
<th class="tableblock halign-left valign-top">Required</th>
<th class="tableblock halign-left valign-top">Schema</th>
<th class="tableblock halign-left valign-top">Default</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">name</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">name must match the name of a persistentVolumeClaim in the pod</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">devicePath</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">devicePath is the path inside of the container that the device will be mapped to.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody>
</table>
</div>
<div class="sect2">
<h3 id="_v1_nodeselectorrequirement">v1.NodeSelectorRequirement</h3> <h3 id="_v1_nodeselectorrequirement">v1.NodeSelectorRequirement</h3>
<div class="paragraph"> <div class="paragraph">
<p>A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.</p> <p>A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.</p>
......
...@@ -6351,6 +6351,13 @@ Both these may change in the future. Incoming requests are matched against the h ...@@ -6351,6 +6351,13 @@ Both these may change in the future. Incoming requests are matched against the h
<td class="tableblock halign-left valign-top"></td> <td class="tableblock halign-left valign-top"></td>
</tr> </tr>
<tr> <tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">volumeDevices</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">volumeDevices is the list of block devices to be used by the container. This is an alpha feature and may change in the future.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1_volumedevice">v1.VolumeDevice</a> array</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">livenessProbe</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">livenessProbe</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: <a href="https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes">https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes</a></p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: <a href="https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes">https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes</a></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
...@@ -6758,6 +6765,47 @@ Both these may change in the future. Incoming requests are matched against the h ...@@ -6758,6 +6765,47 @@ Both these may change in the future. Incoming requests are matched against the h
</div> </div>
<div class="sect2"> <div class="sect2">
<h3 id="_v1_volumedevice">v1.VolumeDevice</h3>
<div class="paragraph">
<p>volumeDevice describes a mapping of a raw block device within a container.</p>
</div>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Name</th>
<th class="tableblock halign-left valign-top">Description</th>
<th class="tableblock halign-left valign-top">Required</th>
<th class="tableblock halign-left valign-top">Schema</th>
<th class="tableblock halign-left valign-top">Default</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">name</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">name must match the name of a persistentVolumeClaim in the pod</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">devicePath</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">devicePath is the path inside of the container that the device will be mapped to.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody>
</table>
</div>
<div class="sect2">
<h3 id="_v1_nodeselectorrequirement">v1.NodeSelectorRequirement</h3> <h3 id="_v1_nodeselectorrequirement">v1.NodeSelectorRequirement</h3>
<div class="paragraph"> <div class="paragraph">
<p>A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.</p> <p>A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.</p>
......
...@@ -1129,6 +1129,13 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; } ...@@ -1129,6 +1129,13 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td> <td class="tableblock halign-left valign-top"></td>
</tr> </tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">volumeMode</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec. This is an alpha feature and may change in the future.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1_persistentvolumemode">v1.PersistentVolumeMode</a></p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody> </tbody>
</table> </table>
...@@ -4458,6 +4465,10 @@ The resulting set of endpoints can be viewed as:<br> ...@@ -4458,6 +4465,10 @@ The resulting set of endpoints can be viewed as:<br>
</div> </div>
<div class="sect2"> <div class="sect2">
<h3 id="_v1_persistentvolumemode">v1.PersistentVolumeMode</h3>
</div>
<div class="sect2">
<h3 id="_v1_deleteoptions">v1.DeleteOptions</h3> <h3 id="_v1_deleteoptions">v1.DeleteOptions</h3>
<div class="paragraph"> <div class="paragraph">
<p>DeleteOptions may be provided when deleting an API object.</p> <p>DeleteOptions may be provided when deleting an API object.</p>
...@@ -7478,6 +7489,13 @@ Examples:<br> ...@@ -7478,6 +7489,13 @@ Examples:<br>
<td class="tableblock halign-left valign-top"></td> <td class="tableblock halign-left valign-top"></td>
</tr> </tr>
<tr> <tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">volumeDevices</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">volumeDevices is the list of block devices to be used by the container. This is an alpha feature and may change in the future.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1_volumedevice">v1.VolumeDevice</a> array</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">livenessProbe</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">livenessProbe</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: <a href="https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes">https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes</a></p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: <a href="https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes">https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes</a></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
...@@ -7834,6 +7852,13 @@ Examples:<br> ...@@ -7834,6 +7852,13 @@ Examples:<br>
<td class="tableblock halign-left valign-top"><p class="tableblock">string array</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">string array</p></td>
<td class="tableblock halign-left valign-top"></td> <td class="tableblock halign-left valign-top"></td>
</tr> </tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">volumeMode</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">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 an alpha feature and may change in the future.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1_persistentvolumemode">v1.PersistentVolumeMode</a></p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody> </tbody>
</table> </table>
...@@ -8311,6 +8336,47 @@ Examples:<br> ...@@ -8311,6 +8336,47 @@ Examples:<br>
</div> </div>
<div class="sect2"> <div class="sect2">
<h3 id="_v1_volumedevice">v1.VolumeDevice</h3>
<div class="paragraph">
<p>volumeDevice describes a mapping of a raw block device within a container.</p>
</div>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Name</th>
<th class="tableblock halign-left valign-top">Description</th>
<th class="tableblock halign-left valign-top">Required</th>
<th class="tableblock halign-left valign-top">Schema</th>
<th class="tableblock halign-left valign-top">Default</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">name</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">name must match the name of a persistentVolumeClaim in the pod</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">devicePath</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">devicePath is the path inside of the container that the device will be mapped to.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody>
</table>
</div>
<div class="sect2">
<h3 id="_v1_nodeselectorrequirement">v1.NodeSelectorRequirement</h3> <h3 id="_v1_nodeselectorrequirement">v1.NodeSelectorRequirement</h3>
<div class="paragraph"> <div class="paragraph">
<p>A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.</p> <p>A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.</p>
......
- baseImportPath: "./pkg/apis/core/" - baseImportPath: "./pkg/apis/core/"
allowedImports: allowedImports:
- k8s.io/apimachinery - k8s.io/apimachinery
- k8s.io/apiserver/pkg/util/feature
- k8s.io/kubernetes/pkg/apis/core - k8s.io/kubernetes/pkg/apis/core
- k8s.io/kubernetes/pkg/features
- k8s.io/kubernetes/pkg/util - k8s.io/kubernetes/pkg/util
- k8s.io/api/core/v1 - k8s.io/api/core/v1
......
...@@ -15,6 +15,7 @@ filegroup( ...@@ -15,6 +15,7 @@ filegroup(
"//pkg/api/events:all-srcs", "//pkg/api/events:all-srcs",
"//pkg/api/legacyscheme:all-srcs", "//pkg/api/legacyscheme:all-srcs",
"//pkg/api/persistentvolume:all-srcs", "//pkg/api/persistentvolume:all-srcs",
"//pkg/api/persistentvolumeclaim:all-srcs",
"//pkg/api/pod:all-srcs", "//pkg/api/pod:all-srcs",
"//pkg/api/ref:all-srcs", "//pkg/api/ref:all-srcs",
"//pkg/api/resource:all-srcs", "//pkg/api/resource:all-srcs",
......
...@@ -10,7 +10,11 @@ go_library( ...@@ -10,7 +10,11 @@ go_library(
name = "go_default_library", name = "go_default_library",
srcs = ["util.go"], srcs = ["util.go"],
importpath = "k8s.io/kubernetes/pkg/api/persistentvolume", importpath = "k8s.io/kubernetes/pkg/api/persistentvolume",
deps = ["//pkg/apis/core:go_default_library"], deps = [
"//pkg/apis/core:go_default_library",
"//pkg/features:go_default_library",
"//vendor/k8s.io/apiserver/pkg/util/feature:go_default_library",
],
) )
filegroup( filegroup(
...@@ -33,7 +37,9 @@ go_test( ...@@ -33,7 +37,9 @@ go_test(
library = ":go_default_library", library = ":go_default_library",
deps = [ deps = [
"//pkg/apis/core:go_default_library", "//pkg/apis/core:go_default_library",
"//pkg/features:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/util/validation/field:go_default_library", "//vendor/k8s.io/apimachinery/pkg/util/validation/field:go_default_library",
"//vendor/k8s.io/apiserver/pkg/util/feature:go_default_library",
], ],
) )
...@@ -17,7 +17,9 @@ limitations under the License. ...@@ -17,7 +17,9 @@ limitations under the License.
package persistentvolume package persistentvolume
import ( import (
utilfeature "k8s.io/apiserver/pkg/util/feature"
api "k8s.io/kubernetes/pkg/apis/core" api "k8s.io/kubernetes/pkg/apis/core"
"k8s.io/kubernetes/pkg/features"
) )
func getClaimRefNamespace(pv *api.PersistentVolume) string { func getClaimRefNamespace(pv *api.PersistentVolume) string {
...@@ -96,3 +98,11 @@ func VisitPVSecretNames(pv *api.PersistentVolume, visitor Visitor) bool { ...@@ -96,3 +98,11 @@ func VisitPVSecretNames(pv *api.PersistentVolume, visitor Visitor) bool {
} }
return true return true
} }
// DropDisabledAlphaFields removes disabled fields from the pv spec.
// This should be called from PrepareForCreate/PrepareForUpdate for all resources containing a pv spec.
func DropDisabledAlphaFields(pvSpec *api.PersistentVolumeSpec) {
if !utilfeature.DefaultFeatureGate.Enabled(features.BlockVolume) {
pvSpec.VolumeMode = nil
}
}
...@@ -24,7 +24,9 @@ import ( ...@@ -24,7 +24,9 @@ import (
"k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/sets"
"k8s.io/apimachinery/pkg/util/validation/field" "k8s.io/apimachinery/pkg/util/validation/field"
utilfeature "k8s.io/apiserver/pkg/util/feature"
api "k8s.io/kubernetes/pkg/apis/core" api "k8s.io/kubernetes/pkg/apis/core"
"k8s.io/kubernetes/pkg/features"
) )
func TestPVSecrets(t *testing.T) { func TestPVSecrets(t *testing.T) {
...@@ -204,3 +206,62 @@ func collectSecretPaths(t *testing.T, path *field.Path, name string, tp reflect. ...@@ -204,3 +206,62 @@ func collectSecretPaths(t *testing.T, path *field.Path, name string, tp reflect.
return secretPaths return secretPaths
} }
func newHostPathType(pathType string) *api.HostPathType {
hostPathType := new(api.HostPathType)
*hostPathType = api.HostPathType(pathType)
return hostPathType
}
func TestDropAlphaPVVolumeMode(t *testing.T) {
vmode := api.PersistentVolumeFilesystem
// PersistentVolume with VolumeMode set
pv := api.PersistentVolume{
Spec: api.PersistentVolumeSpec{
AccessModes: []api.PersistentVolumeAccessMode{api.ReadWriteOnce},
PersistentVolumeSource: api.PersistentVolumeSource{
HostPath: &api.HostPathVolumeSource{
Path: "/foo",
Type: newHostPathType(string(api.HostPathDirectory)),
},
},
StorageClassName: "test-storage-class",
VolumeMode: &vmode,
},
}
// Enable alpha feature BlockVolume
err1 := utilfeature.DefaultFeatureGate.Set("BlockVolume=true")
if err1 != nil {
t.Fatalf("Failed to enable feature gate for BlockVolume: %v", err1)
}
// now test dropping the fields - should not be dropped
DropDisabledAlphaFields(&pv.Spec)
// check to make sure VolumeDevices is still present
// if featureset is set to true
if utilfeature.DefaultFeatureGate.Enabled(features.BlockVolume) {
if pv.Spec.VolumeMode == nil {
t.Error("VolumeMode in pv.Spec should not have been dropped based on feature-gate")
}
}
// Disable alpha feature BlockVolume
err := utilfeature.DefaultFeatureGate.Set("BlockVolume=false")
if err != nil {
t.Fatalf("Failed to disable feature gate for BlockVolume: %v", err)
}
// now test dropping the fields
DropDisabledAlphaFields(&pv.Spec)
// check to make sure VolumeDevices is nil
// if featureset is set to false
if !utilfeature.DefaultFeatureGate.Enabled(features.BlockVolume) {
if pv.Spec.VolumeMode != nil {
t.Error("DropDisabledAlphaFields VolumeMode for pv.Spec failed")
}
}
}
package(default_visibility = ["//visibility:public"])
load(
"@io_bazel_rules_go//go:def.bzl",
"go_library",
"go_test",
)
go_library(
name = "go_default_library",
srcs = ["util.go"],
importpath = "k8s.io/kubernetes/pkg/api/persistentvolumeclaim",
deps = [
"//pkg/apis/core:go_default_library",
"//pkg/features:go_default_library",
"//vendor/k8s.io/apiserver/pkg/util/feature:go_default_library",
],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
)
go_test(
name = "go_default_test",
srcs = ["util_test.go"],
importpath = "k8s.io/kubernetes/pkg/api/persistentvolumeclaim",
library = ":go_default_library",
deps = [
"//pkg/apis/core:go_default_library",
"//pkg/features:go_default_library",
"//vendor/k8s.io/apiserver/pkg/util/feature:go_default_library",
],
)
reviewers:
- smarterclayton
- jsafrane
- david-mcmahon
/*
Copyright 2017 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package persistentvolumeclaim
import (
utilfeature "k8s.io/apiserver/pkg/util/feature"
"k8s.io/kubernetes/pkg/apis/core"
"k8s.io/kubernetes/pkg/features"
)
// DropDisabledAlphaFields removes disabled fields from the pvc spec.
// This should be called from PrepareForCreate/PrepareForUpdate for all resources containing a pvc spec.
func DropDisabledAlphaFields(pvcSpec *core.PersistentVolumeClaimSpec) {
if !utilfeature.DefaultFeatureGate.Enabled(features.BlockVolume) {
pvcSpec.VolumeMode = nil
}
}
/*
Copyright 2017 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package persistentvolumeclaim
import (
"testing"
utilfeature "k8s.io/apiserver/pkg/util/feature"
"k8s.io/kubernetes/pkg/apis/core"
"k8s.io/kubernetes/pkg/features"
)
func TestDropAlphaPVCVolumeMode(t *testing.T) {
vmode := core.PersistentVolumeFilesystem
// PersistentVolume with VolumeMode set
pvc := core.PersistentVolumeClaim{
Spec: core.PersistentVolumeClaimSpec{
AccessModes: []core.PersistentVolumeAccessMode{core.ReadWriteOnce},
VolumeMode: &vmode,
},
}
// Enable alpha feature BlockVolume
err1 := utilfeature.DefaultFeatureGate.Set("BlockVolume=true")
if err1 != nil {
t.Fatalf("Failed to enable feature gate for BlockVolume: %v", err1)
}
// now test dropping the fields - should not be dropped
DropDisabledAlphaFields(&pvc.Spec)
// check to make sure VolumeDevices is still present
// if featureset is set to true
if utilfeature.DefaultFeatureGate.Enabled(features.BlockVolume) {
if pvc.Spec.VolumeMode == nil {
t.Error("VolumeMode in pvc.Spec should not have been dropped based on feature-gate")
}
}
// Disable alpha feature BlockVolume
err := utilfeature.DefaultFeatureGate.Set("BlockVolume=false")
if err != nil {
t.Fatalf("Failed to disable feature gate for BlockVolume: %v", err)
}
// now test dropping the fields
DropDisabledAlphaFields(&pvc.Spec)
// check to make sure VolumeDevices is nil
// if featureset is set to false
if !utilfeature.DefaultFeatureGate.Enabled(features.BlockVolume) {
if pvc.Spec.VolumeMode != nil {
t.Error("DropDisabledAlphaFields VolumeMode for pvc.Spec failed")
}
}
}
...@@ -38,7 +38,9 @@ go_test( ...@@ -38,7 +38,9 @@ go_test(
library = ":go_default_library", library = ":go_default_library",
deps = [ deps = [
"//pkg/apis/core:go_default_library", "//pkg/apis/core:go_default_library",
"//pkg/features:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/util/validation/field:go_default_library", "//vendor/k8s.io/apimachinery/pkg/util/validation/field:go_default_library",
"//vendor/k8s.io/apiserver/pkg/util/feature:go_default_library",
], ],
) )
...@@ -243,12 +243,15 @@ func DropDisabledAlphaFields(podSpec *api.PodSpec) { ...@@ -243,12 +243,15 @@ func DropDisabledAlphaFields(podSpec *api.PodSpec) {
} }
} }
} }
for i := range podSpec.Containers { for i := range podSpec.Containers {
DropDisabledVolumeMountsAlphaFields(podSpec.Containers[i].VolumeMounts) DropDisabledVolumeMountsAlphaFields(podSpec.Containers[i].VolumeMounts)
} }
for i := range podSpec.InitContainers { for i := range podSpec.InitContainers {
DropDisabledVolumeMountsAlphaFields(podSpec.InitContainers[i].VolumeMounts) DropDisabledVolumeMountsAlphaFields(podSpec.InitContainers[i].VolumeMounts)
} }
DropDisabledVolumeDevicesAlphaFields(podSpec)
} }
// DropDisabledVolumeMountsAlphaFields removes disabled fields from []VolumeMount. // DropDisabledVolumeMountsAlphaFields removes disabled fields from []VolumeMount.
...@@ -260,3 +263,16 @@ func DropDisabledVolumeMountsAlphaFields(volumeMounts []api.VolumeMount) { ...@@ -260,3 +263,16 @@ func DropDisabledVolumeMountsAlphaFields(volumeMounts []api.VolumeMount) {
} }
} }
} }
// DropDisabledVolumeDevicesAlphaFields removes disabled fields from []VolumeDevice.
// This should be called from PrepareForCreate/PrepareForUpdate for all resources containing a VolumeDevice
func DropDisabledVolumeDevicesAlphaFields(podSpec *api.PodSpec) {
if !utilfeature.DefaultFeatureGate.Enabled(features.BlockVolume) {
for i := range podSpec.Containers {
podSpec.Containers[i].VolumeDevices = nil
}
for i := range podSpec.InitContainers {
podSpec.InitContainers[i].VolumeDevices = nil
}
}
}
...@@ -24,7 +24,9 @@ import ( ...@@ -24,7 +24,9 @@ import (
"k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/sets"
"k8s.io/apimachinery/pkg/util/validation/field" "k8s.io/apimachinery/pkg/util/validation/field"
utilfeature "k8s.io/apiserver/pkg/util/feature"
api "k8s.io/kubernetes/pkg/apis/core" api "k8s.io/kubernetes/pkg/apis/core"
"k8s.io/kubernetes/pkg/features"
) )
func TestPodSecrets(t *testing.T) { func TestPodSecrets(t *testing.T) {
...@@ -254,3 +256,85 @@ func TestPodConfigmaps(t *testing.T) { ...@@ -254,3 +256,85 @@ func TestPodConfigmaps(t *testing.T) {
t.Error("Extra names extracted. Verify VisitPodConfigmapNames() is correctly extracting resource names") t.Error("Extra names extracted. Verify VisitPodConfigmapNames() is correctly extracting resource names")
} }
} }
func TestDropAlphaVolumeDevices(t *testing.T) {
testPod := api.Pod{
Spec: api.PodSpec{
RestartPolicy: api.RestartPolicyNever,
Containers: []api.Container{
{
Name: "container1",
Image: "testimage",
VolumeDevices: []api.VolumeDevice{
{
Name: "myvolume",
DevicePath: "/usr/test",
},
},
},
},
InitContainers: []api.Container{
{
Name: "container1",
Image: "testimage",
VolumeDevices: []api.VolumeDevice{
{
Name: "myvolume",
DevicePath: "/usr/test",
},
},
},
},
Volumes: []api.Volume{
{
Name: "myvolume",
VolumeSource: api.VolumeSource{
HostPath: &api.HostPathVolumeSource{
Path: "/dev/xvdc",
},
},
},
},
},
}
// Enable alpha feature BlockVolume
err1 := utilfeature.DefaultFeatureGate.Set("BlockVolume=true")
if err1 != nil {
t.Fatalf("Failed to enable feature gate for BlockVolume: %v", err1)
}
// now test dropping the fields - should not be dropped
DropDisabledAlphaFields(&testPod.Spec)
// check to make sure VolumeDevices is still present
// if featureset is set to true
if utilfeature.DefaultFeatureGate.Enabled(features.BlockVolume) {
if testPod.Spec.Containers[0].VolumeDevices == nil {
t.Error("VolumeDevices in Container should not have been dropped based on feature-gate")
}
if testPod.Spec.InitContainers[0].VolumeDevices == nil {
t.Error("VolumeDevices in Container should not have been dropped based on feature-gate")
}
}
// Disable alpha feature BlockVolume
err := utilfeature.DefaultFeatureGate.Set("BlockVolume=false")
if err != nil {
t.Fatalf("Failed to disable feature gate for BlockVolume: %v", err)
}
// now test dropping the fields
DropDisabledAlphaFields(&testPod.Spec)
// check to make sure VolumeDevices is nil
// if featureset is set to false
if !utilfeature.DefaultFeatureGate.Enabled(features.BlockVolume) {
if testPod.Spec.Containers[0].VolumeDevices != nil {
t.Error("DropDisabledAlphaFields for Containers failed")
}
if testPod.Spec.InitContainers[0].VolumeDevices != nil {
t.Error("DropDisabledAlphaFields for InitContainers failed")
}
}
}
...@@ -462,6 +462,11 @@ type PersistentVolumeSpec struct { ...@@ -462,6 +462,11 @@ type PersistentVolumeSpec struct {
// simply fail if one is invalid. // simply fail if one is invalid.
// +optional // +optional
MountOptions []string MountOptions []string
// 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 an alpha feature and may change in the future.
// +optional
VolumeMode *PersistentVolumeMode
} }
// PersistentVolumeReclaimPolicy describes a policy for end-of-life maintenance of persistent volumes // PersistentVolumeReclaimPolicy describes a policy for end-of-life maintenance of persistent volumes
...@@ -479,6 +484,16 @@ const ( ...@@ -479,6 +484,16 @@ const (
PersistentVolumeReclaimRetain PersistentVolumeReclaimPolicy = "Retain" PersistentVolumeReclaimRetain PersistentVolumeReclaimPolicy = "Retain"
) )
// PersistentVolumeMode describes how a volume is intended to be consumed, either Block or Filesystem.
type PersistentVolumeMode string
const (
// PersistentVolumeBlock means the volume will not be formatted with a filesystem and will remain a raw block device.
PersistentVolumeBlock PersistentVolumeMode = "Block"
// PersistentVolumeFilesystem means the volume will be or is formatted with a filesystem.
PersistentVolumeFilesystem PersistentVolumeMode = "Filesystem"
)
type PersistentVolumeStatus struct { type PersistentVolumeStatus struct {
// Phase indicates if a volume is available, bound to a claim, or released by a claim // Phase indicates if a volume is available, bound to a claim, or released by a claim
// +optional // +optional
...@@ -548,6 +563,11 @@ type PersistentVolumeClaimSpec struct { ...@@ -548,6 +563,11 @@ type PersistentVolumeClaimSpec struct {
// More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#class-1 // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#class-1
// +optional // +optional
StorageClassName *string StorageClassName *string
// volumeMode defines what type of volume is required by the claim.
// Value of Filesystem is implied when not included in claim spec.
// This is an alpha feature and may change in the future.
// +optional
VolumeMode *PersistentVolumeMode
} }
type PersistentVolumeClaimConditionType string type PersistentVolumeClaimConditionType string
...@@ -1586,6 +1606,14 @@ const ( ...@@ -1586,6 +1606,14 @@ const (
MountPropagationBidirectional MountPropagationMode = "Bidirectional" MountPropagationBidirectional MountPropagationMode = "Bidirectional"
) )
// VolumeDevice describes a mapping of a raw block device within a container.
type VolumeDevice struct {
// name must match the name of a persistentVolumeClaim in the pod
Name string
// devicePath is the path inside of the container that the device will be mapped to.
DevicePath string
}
// EnvVar represents an environment variable present in a Container. // EnvVar represents an environment variable present in a Container.
type EnvVar struct { type EnvVar struct {
// Required: This must be a C_IDENTIFIER. // Required: This must be a C_IDENTIFIER.
...@@ -1879,6 +1907,10 @@ type Container struct { ...@@ -1879,6 +1907,10 @@ type Container struct {
Resources ResourceRequirements Resources ResourceRequirements
// +optional // +optional
VolumeMounts []VolumeMount VolumeMounts []VolumeMount
// volumeDevices is the list of block devices to be used by the container.
// This is an alpha feature and may change in the future.
// +optional
VolumeDevices []VolumeDevice
// +optional // +optional
LivenessProbe *Probe LivenessProbe *Probe
// +optional // +optional
......
...@@ -15,6 +15,7 @@ go_library( ...@@ -15,6 +15,7 @@ go_library(
deps = [ deps = [
"//pkg/apis/core:go_default_library", "//pkg/apis/core:go_default_library",
"//pkg/apis/extensions:go_default_library", "//pkg/apis/extensions:go_default_library",
"//pkg/features:go_default_library",
"//pkg/util/parsers:go_default_library", "//pkg/util/parsers:go_default_library",
"//pkg/util/pointer:go_default_library", "//pkg/util/pointer:go_default_library",
"//vendor/k8s.io/api/core/v1:go_default_library", "//vendor/k8s.io/api/core/v1:go_default_library",
...@@ -26,6 +27,7 @@ go_library( ...@@ -26,6 +27,7 @@ go_library(
"//vendor/k8s.io/apimachinery/pkg/types:go_default_library", "//vendor/k8s.io/apimachinery/pkg/types:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library", "//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/util/validation/field:go_default_library", "//vendor/k8s.io/apimachinery/pkg/util/validation/field:go_default_library",
"//vendor/k8s.io/apiserver/pkg/util/feature:go_default_library",
], ],
) )
...@@ -54,6 +56,7 @@ go_test( ...@@ -54,6 +56,7 @@ go_test(
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/util/diff:go_default_library", "//vendor/k8s.io/apimachinery/pkg/util/diff:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library", "//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library",
"//vendor/k8s.io/apiserver/pkg/util/feature:go_default_library",
], ],
) )
......
...@@ -20,6 +20,8 @@ import ( ...@@ -20,6 +20,8 @@ import (
"k8s.io/api/core/v1" "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/util/intstr" "k8s.io/apimachinery/pkg/util/intstr"
utilfeature "k8s.io/apiserver/pkg/util/feature"
"k8s.io/kubernetes/pkg/features"
"k8s.io/kubernetes/pkg/util/parsers" "k8s.io/kubernetes/pkg/util/parsers"
utilpointer "k8s.io/kubernetes/pkg/util/pointer" utilpointer "k8s.io/kubernetes/pkg/util/pointer"
) )
...@@ -228,11 +230,19 @@ func SetDefaults_PersistentVolume(obj *v1.PersistentVolume) { ...@@ -228,11 +230,19 @@ func SetDefaults_PersistentVolume(obj *v1.PersistentVolume) {
if obj.Spec.PersistentVolumeReclaimPolicy == "" { if obj.Spec.PersistentVolumeReclaimPolicy == "" {
obj.Spec.PersistentVolumeReclaimPolicy = v1.PersistentVolumeReclaimRetain obj.Spec.PersistentVolumeReclaimPolicy = v1.PersistentVolumeReclaimRetain
} }
if obj.Spec.VolumeMode == nil && utilfeature.DefaultFeatureGate.Enabled(features.BlockVolume) {
obj.Spec.VolumeMode = new(v1.PersistentVolumeMode)
*obj.Spec.VolumeMode = v1.PersistentVolumeFilesystem
}
} }
func SetDefaults_PersistentVolumeClaim(obj *v1.PersistentVolumeClaim) { func SetDefaults_PersistentVolumeClaim(obj *v1.PersistentVolumeClaim) {
if obj.Status.Phase == "" { if obj.Status.Phase == "" {
obj.Status.Phase = v1.ClaimPending obj.Status.Phase = v1.ClaimPending
} }
if obj.Spec.VolumeMode == nil && utilfeature.DefaultFeatureGate.Enabled(features.BlockVolume) {
obj.Spec.VolumeMode = new(v1.PersistentVolumeMode)
*obj.Spec.VolumeMode = v1.PersistentVolumeFilesystem
}
} }
func SetDefaults_ISCSIVolumeSource(obj *v1.ISCSIVolumeSource) { func SetDefaults_ISCSIVolumeSource(obj *v1.ISCSIVolumeSource) {
if obj.ISCSIInterface == "" { if obj.ISCSIInterface == "" {
......
...@@ -26,6 +26,7 @@ import ( ...@@ -26,6 +26,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/util/intstr" "k8s.io/apimachinery/pkg/util/intstr"
utilfeature "k8s.io/apiserver/pkg/util/feature"
"k8s.io/kubernetes/pkg/api/legacyscheme" "k8s.io/kubernetes/pkg/api/legacyscheme"
corev1 "k8s.io/kubernetes/pkg/apis/core/v1" corev1 "k8s.io/kubernetes/pkg/apis/core/v1"
...@@ -817,6 +818,33 @@ func TestSetDefaultPersistentVolume(t *testing.T) { ...@@ -817,6 +818,33 @@ func TestSetDefaultPersistentVolume(t *testing.T) {
if pv2.Spec.PersistentVolumeReclaimPolicy != v1.PersistentVolumeReclaimRetain { if pv2.Spec.PersistentVolumeReclaimPolicy != v1.PersistentVolumeReclaimRetain {
t.Errorf("Expected pv reclaim policy %v, got %v", v1.PersistentVolumeReclaimRetain, pv2.Spec.PersistentVolumeReclaimPolicy) t.Errorf("Expected pv reclaim policy %v, got %v", v1.PersistentVolumeReclaimRetain, pv2.Spec.PersistentVolumeReclaimPolicy)
} }
// When feature gate is disabled, field should not be defaulted
defaultMode := v1.PersistentVolumeFilesystem
outputMode := pv2.Spec.VolumeMode
if outputMode != nil {
t.Errorf("Expected VolumeMode to not be defaulted, got: %+v", outputMode)
}
// When feature gate is enabled, field should be defaulted
err := utilfeature.DefaultFeatureGate.Set("BlockVolume=true")
if err != nil {
t.Fatalf("Failed to enable feature gate for BlockVolume: %v", err)
}
obj3 := roundTrip(t, runtime.Object(pv)).(*v1.PersistentVolume)
outputMode3 := obj3.Spec.VolumeMode
if outputMode3 == nil {
t.Errorf("Expected VolumeMode to be defaulted to: %+v, got: nil", defaultMode)
} else if *outputMode3 != defaultMode {
t.Errorf("Expected VolumeMode to be defaulted to: %+v, got: %+v", defaultMode, outputMode3)
}
err = utilfeature.DefaultFeatureGate.Set("BlockVolume=false")
if err != nil {
t.Fatalf("Failed to disable feature gate for BlockVolume: %v", err)
}
} }
func TestSetDefaultPersistentVolumeClaim(t *testing.T) { func TestSetDefaultPersistentVolumeClaim(t *testing.T) {
...@@ -827,6 +855,32 @@ func TestSetDefaultPersistentVolumeClaim(t *testing.T) { ...@@ -827,6 +855,32 @@ func TestSetDefaultPersistentVolumeClaim(t *testing.T) {
if pvc2.Status.Phase != v1.ClaimPending { if pvc2.Status.Phase != v1.ClaimPending {
t.Errorf("Expected claim phase %v, got %v", v1.ClaimPending, pvc2.Status.Phase) t.Errorf("Expected claim phase %v, got %v", v1.ClaimPending, pvc2.Status.Phase)
} }
// When feature gate is disabled, field should not be defaulted
defaultMode := v1.PersistentVolumeFilesystem
outputMode := pvc2.Spec.VolumeMode
if outputMode != nil {
t.Errorf("Expected VolumeMode to not be defaulted, got: %+v", outputMode)
}
// When feature gate is enabled, field should be defaulted
err := utilfeature.DefaultFeatureGate.Set("BlockVolume=true")
if err != nil {
t.Fatalf("Failed to enable feature gate for BlockVolume: %v", err)
}
obj3 := roundTrip(t, runtime.Object(pvc)).(*v1.PersistentVolumeClaim)
outputMode3 := obj3.Spec.VolumeMode
if outputMode3 == nil {
t.Errorf("Expected VolumeMode to be defaulted to: %+v, got: nil", defaultMode)
} else if *outputMode3 != defaultMode {
t.Errorf("Expected VolumeMode to be defaulted to: %+v, got: %+v", defaultMode, outputMode3)
}
err = utilfeature.DefaultFeatureGate.Set("BlockVolume=false")
if err != nil {
t.Fatalf("Failed to disable feature gate for BlockVolume: %v", err)
}
} }
func TestSetDefaulEndpointsProtocol(t *testing.T) { func TestSetDefaulEndpointsProtocol(t *testing.T) {
......
...@@ -391,6 +391,8 @@ func RegisterConversions(scheme *runtime.Scheme) error { ...@@ -391,6 +391,8 @@ func RegisterConversions(scheme *runtime.Scheme) error {
Convert_core_Toleration_To_v1_Toleration, Convert_core_Toleration_To_v1_Toleration,
Convert_v1_Volume_To_core_Volume, Convert_v1_Volume_To_core_Volume,
Convert_core_Volume_To_v1_Volume, Convert_core_Volume_To_v1_Volume,
Convert_v1_VolumeDevice_To_core_VolumeDevice,
Convert_core_VolumeDevice_To_v1_VolumeDevice,
Convert_v1_VolumeMount_To_core_VolumeMount, Convert_v1_VolumeMount_To_core_VolumeMount,
Convert_core_VolumeMount_To_v1_VolumeMount, Convert_core_VolumeMount_To_v1_VolumeMount,
Convert_v1_VolumeProjection_To_core_VolumeProjection, Convert_v1_VolumeProjection_To_core_VolumeProjection,
...@@ -991,6 +993,7 @@ func autoConvert_v1_Container_To_core_Container(in *v1.Container, out *core.Cont ...@@ -991,6 +993,7 @@ func autoConvert_v1_Container_To_core_Container(in *v1.Container, out *core.Cont
return err return err
} }
out.VolumeMounts = *(*[]core.VolumeMount)(unsafe.Pointer(&in.VolumeMounts)) out.VolumeMounts = *(*[]core.VolumeMount)(unsafe.Pointer(&in.VolumeMounts))
out.VolumeDevices = *(*[]core.VolumeDevice)(unsafe.Pointer(&in.VolumeDevices))
out.LivenessProbe = (*core.Probe)(unsafe.Pointer(in.LivenessProbe)) out.LivenessProbe = (*core.Probe)(unsafe.Pointer(in.LivenessProbe))
out.ReadinessProbe = (*core.Probe)(unsafe.Pointer(in.ReadinessProbe)) out.ReadinessProbe = (*core.Probe)(unsafe.Pointer(in.ReadinessProbe))
out.Lifecycle = (*core.Lifecycle)(unsafe.Pointer(in.Lifecycle)) out.Lifecycle = (*core.Lifecycle)(unsafe.Pointer(in.Lifecycle))
...@@ -1030,6 +1033,7 @@ func autoConvert_core_Container_To_v1_Container(in *core.Container, out *v1.Cont ...@@ -1030,6 +1033,7 @@ func autoConvert_core_Container_To_v1_Container(in *core.Container, out *v1.Cont
return err return err
} }
out.VolumeMounts = *(*[]v1.VolumeMount)(unsafe.Pointer(&in.VolumeMounts)) out.VolumeMounts = *(*[]v1.VolumeMount)(unsafe.Pointer(&in.VolumeMounts))
out.VolumeDevices = *(*[]v1.VolumeDevice)(unsafe.Pointer(&in.VolumeDevices))
out.LivenessProbe = (*v1.Probe)(unsafe.Pointer(in.LivenessProbe)) out.LivenessProbe = (*v1.Probe)(unsafe.Pointer(in.LivenessProbe))
out.ReadinessProbe = (*v1.Probe)(unsafe.Pointer(in.ReadinessProbe)) out.ReadinessProbe = (*v1.Probe)(unsafe.Pointer(in.ReadinessProbe))
out.Lifecycle = (*v1.Lifecycle)(unsafe.Pointer(in.Lifecycle)) out.Lifecycle = (*v1.Lifecycle)(unsafe.Pointer(in.Lifecycle))
...@@ -3034,6 +3038,7 @@ func autoConvert_v1_PersistentVolumeClaimSpec_To_core_PersistentVolumeClaimSpec( ...@@ -3034,6 +3038,7 @@ func autoConvert_v1_PersistentVolumeClaimSpec_To_core_PersistentVolumeClaimSpec(
} }
out.VolumeName = in.VolumeName out.VolumeName = in.VolumeName
out.StorageClassName = (*string)(unsafe.Pointer(in.StorageClassName)) out.StorageClassName = (*string)(unsafe.Pointer(in.StorageClassName))
out.VolumeMode = (*core.PersistentVolumeMode)(unsafe.Pointer(in.VolumeMode))
return nil return nil
} }
...@@ -3050,6 +3055,7 @@ func autoConvert_core_PersistentVolumeClaimSpec_To_v1_PersistentVolumeClaimSpec( ...@@ -3050,6 +3055,7 @@ func autoConvert_core_PersistentVolumeClaimSpec_To_v1_PersistentVolumeClaimSpec(
} }
out.VolumeName = in.VolumeName out.VolumeName = in.VolumeName
out.StorageClassName = (*string)(unsafe.Pointer(in.StorageClassName)) out.StorageClassName = (*string)(unsafe.Pointer(in.StorageClassName))
out.VolumeMode = (*v1.PersistentVolumeMode)(unsafe.Pointer(in.VolumeMode))
return nil return nil
} }
...@@ -3220,6 +3226,7 @@ func autoConvert_v1_PersistentVolumeSpec_To_core_PersistentVolumeSpec(in *v1.Per ...@@ -3220,6 +3226,7 @@ func autoConvert_v1_PersistentVolumeSpec_To_core_PersistentVolumeSpec(in *v1.Per
out.PersistentVolumeReclaimPolicy = core.PersistentVolumeReclaimPolicy(in.PersistentVolumeReclaimPolicy) out.PersistentVolumeReclaimPolicy = core.PersistentVolumeReclaimPolicy(in.PersistentVolumeReclaimPolicy)
out.StorageClassName = in.StorageClassName out.StorageClassName = in.StorageClassName
out.MountOptions = *(*[]string)(unsafe.Pointer(&in.MountOptions)) out.MountOptions = *(*[]string)(unsafe.Pointer(&in.MountOptions))
out.VolumeMode = (*core.PersistentVolumeMode)(unsafe.Pointer(in.VolumeMode))
return nil return nil
} }
...@@ -3238,6 +3245,7 @@ func autoConvert_core_PersistentVolumeSpec_To_v1_PersistentVolumeSpec(in *core.P ...@@ -3238,6 +3245,7 @@ func autoConvert_core_PersistentVolumeSpec_To_v1_PersistentVolumeSpec(in *core.P
out.PersistentVolumeReclaimPolicy = v1.PersistentVolumeReclaimPolicy(in.PersistentVolumeReclaimPolicy) out.PersistentVolumeReclaimPolicy = v1.PersistentVolumeReclaimPolicy(in.PersistentVolumeReclaimPolicy)
out.StorageClassName = in.StorageClassName out.StorageClassName = in.StorageClassName
out.MountOptions = *(*[]string)(unsafe.Pointer(&in.MountOptions)) out.MountOptions = *(*[]string)(unsafe.Pointer(&in.MountOptions))
out.VolumeMode = (*v1.PersistentVolumeMode)(unsafe.Pointer(in.VolumeMode))
return nil return nil
} }
...@@ -5281,6 +5289,28 @@ func Convert_core_Volume_To_v1_Volume(in *core.Volume, out *v1.Volume, s convers ...@@ -5281,6 +5289,28 @@ func Convert_core_Volume_To_v1_Volume(in *core.Volume, out *v1.Volume, s convers
return autoConvert_core_Volume_To_v1_Volume(in, out, s) return autoConvert_core_Volume_To_v1_Volume(in, out, s)
} }
func autoConvert_v1_VolumeDevice_To_core_VolumeDevice(in *v1.VolumeDevice, out *core.VolumeDevice, s conversion.Scope) error {
out.Name = in.Name
out.DevicePath = in.DevicePath
return nil
}
// Convert_v1_VolumeDevice_To_core_VolumeDevice is an autogenerated conversion function.
func Convert_v1_VolumeDevice_To_core_VolumeDevice(in *v1.VolumeDevice, out *core.VolumeDevice, s conversion.Scope) error {
return autoConvert_v1_VolumeDevice_To_core_VolumeDevice(in, out, s)
}
func autoConvert_core_VolumeDevice_To_v1_VolumeDevice(in *core.VolumeDevice, out *v1.VolumeDevice, s conversion.Scope) error {
out.Name = in.Name
out.DevicePath = in.DevicePath
return nil
}
// Convert_core_VolumeDevice_To_v1_VolumeDevice is an autogenerated conversion function.
func Convert_core_VolumeDevice_To_v1_VolumeDevice(in *core.VolumeDevice, out *v1.VolumeDevice, s conversion.Scope) error {
return autoConvert_core_VolumeDevice_To_v1_VolumeDevice(in, out, s)
}
func autoConvert_v1_VolumeMount_To_core_VolumeMount(in *v1.VolumeMount, out *core.VolumeMount, s conversion.Scope) error { func autoConvert_v1_VolumeMount_To_core_VolumeMount(in *v1.VolumeMount, out *core.VolumeMount, s conversion.Scope) error {
out.Name = in.Name out.Name = in.Name
out.ReadOnly = in.ReadOnly out.ReadOnly = in.ReadOnly
......
...@@ -61,7 +61,6 @@ go_test( ...@@ -61,7 +61,6 @@ go_test(
"//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library", "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library", "//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/util/validation:go_default_library", "//vendor/k8s.io/apimachinery/pkg/util/validation:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/util/validation/field:go_default_library", "//vendor/k8s.io/apimachinery/pkg/util/validation/field:go_default_library",
"//vendor/k8s.io/apiserver/pkg/util/feature:go_default_library", "//vendor/k8s.io/apiserver/pkg/util/feature:go_default_library",
......
...@@ -706,6 +706,11 @@ func (in *Container) DeepCopyInto(out *Container) { ...@@ -706,6 +706,11 @@ func (in *Container) DeepCopyInto(out *Container) {
(*in)[i].DeepCopyInto(&(*out)[i]) (*in)[i].DeepCopyInto(&(*out)[i])
} }
} }
if in.VolumeDevices != nil {
in, out := &in.VolumeDevices, &out.VolumeDevices
*out = make([]VolumeDevice, len(*in))
copy(*out, *in)
}
if in.LivenessProbe != nil { if in.LivenessProbe != nil {
in, out := &in.LivenessProbe, &out.LivenessProbe in, out := &in.LivenessProbe, &out.LivenessProbe
if *in == nil { if *in == nil {
...@@ -2885,6 +2890,15 @@ func (in *PersistentVolumeClaimSpec) DeepCopyInto(out *PersistentVolumeClaimSpec ...@@ -2885,6 +2890,15 @@ func (in *PersistentVolumeClaimSpec) DeepCopyInto(out *PersistentVolumeClaimSpec
**out = **in **out = **in
} }
} }
if in.VolumeMode != nil {
in, out := &in.VolumeMode, &out.VolumeMode
if *in == nil {
*out = nil
} else {
*out = new(PersistentVolumeMode)
**out = **in
}
}
return return
} }
...@@ -3227,6 +3241,15 @@ func (in *PersistentVolumeSpec) DeepCopyInto(out *PersistentVolumeSpec) { ...@@ -3227,6 +3241,15 @@ func (in *PersistentVolumeSpec) DeepCopyInto(out *PersistentVolumeSpec) {
*out = make([]string, len(*in)) *out = make([]string, len(*in))
copy(*out, *in) copy(*out, *in)
} }
if in.VolumeMode != nil {
in, out := &in.VolumeMode, &out.VolumeMode
if *in == nil {
*out = nil
} else {
*out = new(PersistentVolumeMode)
**out = **in
}
}
return return
} }
...@@ -5321,6 +5344,22 @@ func (in *Volume) DeepCopy() *Volume { ...@@ -5321,6 +5344,22 @@ func (in *Volume) DeepCopy() *Volume {
} }
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *VolumeDevice) DeepCopyInto(out *VolumeDevice) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeDevice.
func (in *VolumeDevice) DeepCopy() *VolumeDevice {
if in == nil {
return nil
}
out := new(VolumeDevice)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *VolumeMount) DeepCopyInto(out *VolumeMount) { func (in *VolumeMount) DeepCopyInto(out *VolumeMount) {
*out = *in *out = *in
if in.MountPropagation != nil { if in.MountPropagation != nil {
......
...@@ -43,11 +43,11 @@ func ValidatePodPresetSpec(spec *settings.PodPresetSpec, fldPath *field.Path) fi ...@@ -43,11 +43,11 @@ func ValidatePodPresetSpec(spec *settings.PodPresetSpec, fldPath *field.Path) fi
allErrs = append(allErrs, field.Required(fldPath.Child("volumes", "env", "envFrom", "volumeMounts"), "must specify at least one")) allErrs = append(allErrs, field.Required(fldPath.Child("volumes", "env", "envFrom", "volumeMounts"), "must specify at least one"))
} }
volumes, vErrs := apivalidation.ValidateVolumes(spec.Volumes, fldPath.Child("volumes")) vols, vErrs := apivalidation.ValidateVolumes(spec.Volumes, fldPath.Child("volumes"))
allErrs = append(allErrs, vErrs...) allErrs = append(allErrs, vErrs...)
allErrs = append(allErrs, apivalidation.ValidateEnv(spec.Env, fldPath.Child("env"))...) allErrs = append(allErrs, apivalidation.ValidateEnv(spec.Env, fldPath.Child("env"))...)
allErrs = append(allErrs, apivalidation.ValidateEnvFrom(spec.EnvFrom, fldPath.Child("envFrom"))...) allErrs = append(allErrs, apivalidation.ValidateEnvFrom(spec.EnvFrom, fldPath.Child("envFrom"))...)
allErrs = append(allErrs, apivalidation.ValidateVolumeMounts(spec.VolumeMounts, volumes, nil, fldPath.Child("volumeMounts"))...) allErrs = append(allErrs, apivalidation.ValidateVolumeMounts(spec.VolumeMounts, nil, vols, nil, fldPath.Child("volumeMounts"))...)
return allErrs return allErrs
} }
......
...@@ -187,6 +187,12 @@ const ( ...@@ -187,6 +187,12 @@ const (
// //
// Enable mount/attachment of Container Storage Interface (CSI) backed PVs // Enable mount/attachment of Container Storage Interface (CSI) backed PVs
CSIPersistentVolume utilfeature.Feature = "CSIPersistentVolume" CSIPersistentVolume utilfeature.Feature = "CSIPersistentVolume"
// owner: @screeley44
// alpha: v1.9
//
// Enable Block volume support in containers.
BlockVolume utilfeature.Feature = "BlockVolume"
) )
func init() { func init() {
...@@ -222,6 +228,7 @@ var defaultKubernetesFeatureGates = map[utilfeature.Feature]utilfeature.FeatureS ...@@ -222,6 +228,7 @@ var defaultKubernetesFeatureGates = map[utilfeature.Feature]utilfeature.FeatureS
MountContainers: {Default: false, PreRelease: utilfeature.Alpha}, MountContainers: {Default: false, PreRelease: utilfeature.Alpha},
VolumeScheduling: {Default: false, PreRelease: utilfeature.Alpha}, VolumeScheduling: {Default: false, PreRelease: utilfeature.Alpha},
CSIPersistentVolume: {Default: false, PreRelease: utilfeature.Alpha}, CSIPersistentVolume: {Default: false, PreRelease: utilfeature.Alpha},
BlockVolume: {Default: false, PreRelease: utilfeature.Alpha},
// inherited features from generic apiserver, relisted here to get a conflict if it is changed // inherited features from generic apiserver, relisted here to get a conflict if it is changed
// unintentionally on either side: // unintentionally on either side:
......
...@@ -15,6 +15,7 @@ go_library( ...@@ -15,6 +15,7 @@ go_library(
importpath = "k8s.io/kubernetes/pkg/registry/core/persistentvolume", importpath = "k8s.io/kubernetes/pkg/registry/core/persistentvolume",
deps = [ deps = [
"//pkg/api/legacyscheme:go_default_library", "//pkg/api/legacyscheme:go_default_library",
"//pkg/api/persistentvolume:go_default_library",
"//pkg/apis/core:go_default_library", "//pkg/apis/core:go_default_library",
"//pkg/apis/core/validation:go_default_library", "//pkg/apis/core/validation:go_default_library",
"//pkg/volume/validation:go_default_library", "//pkg/volume/validation:go_default_library",
......
...@@ -28,6 +28,7 @@ import ( ...@@ -28,6 +28,7 @@ import (
"k8s.io/apiserver/pkg/storage" "k8s.io/apiserver/pkg/storage"
"k8s.io/apiserver/pkg/storage/names" "k8s.io/apiserver/pkg/storage/names"
"k8s.io/kubernetes/pkg/api/legacyscheme" "k8s.io/kubernetes/pkg/api/legacyscheme"
pvutil "k8s.io/kubernetes/pkg/api/persistentvolume"
api "k8s.io/kubernetes/pkg/apis/core" api "k8s.io/kubernetes/pkg/apis/core"
"k8s.io/kubernetes/pkg/apis/core/validation" "k8s.io/kubernetes/pkg/apis/core/validation"
volumevalidation "k8s.io/kubernetes/pkg/volume/validation" volumevalidation "k8s.io/kubernetes/pkg/volume/validation"
...@@ -51,6 +52,8 @@ func (persistentvolumeStrategy) NamespaceScoped() bool { ...@@ -51,6 +52,8 @@ func (persistentvolumeStrategy) NamespaceScoped() bool {
func (persistentvolumeStrategy) PrepareForCreate(ctx genericapirequest.Context, obj runtime.Object) { func (persistentvolumeStrategy) PrepareForCreate(ctx genericapirequest.Context, obj runtime.Object) {
pv := obj.(*api.PersistentVolume) pv := obj.(*api.PersistentVolume)
pv.Status = api.PersistentVolumeStatus{} pv.Status = api.PersistentVolumeStatus{}
pvutil.DropDisabledAlphaFields(&pv.Spec)
} }
func (persistentvolumeStrategy) Validate(ctx genericapirequest.Context, obj runtime.Object) field.ErrorList { func (persistentvolumeStrategy) Validate(ctx genericapirequest.Context, obj runtime.Object) field.ErrorList {
...@@ -72,6 +75,9 @@ func (persistentvolumeStrategy) PrepareForUpdate(ctx genericapirequest.Context, ...@@ -72,6 +75,9 @@ func (persistentvolumeStrategy) PrepareForUpdate(ctx genericapirequest.Context,
newPv := obj.(*api.PersistentVolume) newPv := obj.(*api.PersistentVolume)
oldPv := old.(*api.PersistentVolume) oldPv := old.(*api.PersistentVolume)
newPv.Status = oldPv.Status newPv.Status = oldPv.Status
pvutil.DropDisabledAlphaFields(&newPv.Spec)
pvutil.DropDisabledAlphaFields(&oldPv.Spec)
} }
func (persistentvolumeStrategy) ValidateUpdate(ctx genericapirequest.Context, obj, old runtime.Object) field.ErrorList { func (persistentvolumeStrategy) ValidateUpdate(ctx genericapirequest.Context, obj, old runtime.Object) field.ErrorList {
......
...@@ -15,6 +15,7 @@ go_library( ...@@ -15,6 +15,7 @@ go_library(
importpath = "k8s.io/kubernetes/pkg/registry/core/persistentvolumeclaim", importpath = "k8s.io/kubernetes/pkg/registry/core/persistentvolumeclaim",
deps = [ deps = [
"//pkg/api/legacyscheme:go_default_library", "//pkg/api/legacyscheme:go_default_library",
"//pkg/api/persistentvolumeclaim:go_default_library",
"//pkg/apis/core:go_default_library", "//pkg/apis/core:go_default_library",
"//pkg/apis/core/validation:go_default_library", "//pkg/apis/core/validation:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/fields:go_default_library", "//vendor/k8s.io/apimachinery/pkg/fields:go_default_library",
......
...@@ -28,6 +28,7 @@ import ( ...@@ -28,6 +28,7 @@ import (
"k8s.io/apiserver/pkg/storage" "k8s.io/apiserver/pkg/storage"
"k8s.io/apiserver/pkg/storage/names" "k8s.io/apiserver/pkg/storage/names"
"k8s.io/kubernetes/pkg/api/legacyscheme" "k8s.io/kubernetes/pkg/api/legacyscheme"
pvcutil "k8s.io/kubernetes/pkg/api/persistentvolumeclaim"
api "k8s.io/kubernetes/pkg/apis/core" api "k8s.io/kubernetes/pkg/apis/core"
"k8s.io/kubernetes/pkg/apis/core/validation" "k8s.io/kubernetes/pkg/apis/core/validation"
) )
...@@ -48,8 +49,10 @@ func (persistentvolumeclaimStrategy) NamespaceScoped() bool { ...@@ -48,8 +49,10 @@ func (persistentvolumeclaimStrategy) NamespaceScoped() bool {
// PrepareForCreate clears the Status field which is not allowed to be set by end users on creation. // PrepareForCreate clears the Status field which is not allowed to be set by end users on creation.
func (persistentvolumeclaimStrategy) PrepareForCreate(ctx genericapirequest.Context, obj runtime.Object) { func (persistentvolumeclaimStrategy) PrepareForCreate(ctx genericapirequest.Context, obj runtime.Object) {
pv := obj.(*api.PersistentVolumeClaim) pvc := obj.(*api.PersistentVolumeClaim)
pv.Status = api.PersistentVolumeClaimStatus{} pvc.Status = api.PersistentVolumeClaimStatus{}
pvcutil.DropDisabledAlphaFields(&pvc.Spec)
} }
func (persistentvolumeclaimStrategy) Validate(ctx genericapirequest.Context, obj runtime.Object) field.ErrorList { func (persistentvolumeclaimStrategy) Validate(ctx genericapirequest.Context, obj runtime.Object) field.ErrorList {
...@@ -70,6 +73,9 @@ func (persistentvolumeclaimStrategy) PrepareForUpdate(ctx genericapirequest.Cont ...@@ -70,6 +73,9 @@ func (persistentvolumeclaimStrategy) PrepareForUpdate(ctx genericapirequest.Cont
newPvc := obj.(*api.PersistentVolumeClaim) newPvc := obj.(*api.PersistentVolumeClaim)
oldPvc := old.(*api.PersistentVolumeClaim) oldPvc := old.(*api.PersistentVolumeClaim)
newPvc.Status = oldPvc.Status newPvc.Status = oldPvc.Status
pvcutil.DropDisabledAlphaFields(&newPvc.Spec)
pvcutil.DropDisabledAlphaFields(&oldPvc.Spec)
} }
func (persistentvolumeclaimStrategy) ValidateUpdate(ctx genericapirequest.Context, obj, old runtime.Object) field.ErrorList { func (persistentvolumeclaimStrategy) ValidateUpdate(ctx genericapirequest.Context, obj, old runtime.Object) field.ErrorList {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -533,6 +533,13 @@ message Container { ...@@ -533,6 +533,13 @@ message Container {
// +patchStrategy=merge // +patchStrategy=merge
repeated VolumeMount volumeMounts = 9; repeated VolumeMount volumeMounts = 9;
// volumeDevices is the list of block devices to be used by the container.
// This is an alpha feature and may change in the future.
// +patchMergeKey=devicePath
// +patchStrategy=merge
// +optional
repeated VolumeDevice volumeDevices = 21;
// Periodic probe of container liveness. // Periodic probe of container liveness.
// Container will be restarted if the probe fails. // Container will be restarted if the probe fails.
// Cannot be updated. // Cannot be updated.
...@@ -2219,6 +2226,12 @@ message PersistentVolumeClaimSpec { ...@@ -2219,6 +2226,12 @@ message PersistentVolumeClaimSpec {
// More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1
// +optional // +optional
optional string storageClassName = 5; optional string storageClassName = 5;
// volumeMode defines what type of volume is required by the claim.
// Value of Filesystem is implied when not included in claim spec.
// This is an alpha feature and may change in the future.
// +optional
optional string volumeMode = 6;
} }
// PersistentVolumeClaimStatus is the current status of a persistent volume claim. // PersistentVolumeClaimStatus is the current status of a persistent volume claim.
...@@ -2418,6 +2431,12 @@ message PersistentVolumeSpec { ...@@ -2418,6 +2431,12 @@ message PersistentVolumeSpec {
// More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options
// +optional // +optional
repeated string mountOptions = 7; repeated string mountOptions = 7;
// 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 an alpha feature and may change in the future.
// +optional
optional string volumeMode = 8;
} }
// PersistentVolumeStatus is the current status of a persistent volume. // PersistentVolumeStatus is the current status of a persistent volume.
...@@ -4205,6 +4224,15 @@ message Volume { ...@@ -4205,6 +4224,15 @@ message Volume {
optional VolumeSource volumeSource = 2; optional VolumeSource volumeSource = 2;
} }
// volumeDevice describes a mapping of a raw block device within a container.
message VolumeDevice {
// name must match the name of a persistentVolumeClaim in the pod
optional string name = 1;
// devicePath is the path inside of the container that the device will be mapped to.
optional string devicePath = 2;
}
// VolumeMount describes a mounting of a Volume within a container. // VolumeMount describes a mounting of a Volume within a container.
message VolumeMount { message VolumeMount {
// This must match the Name of a Volume. // This must match the Name of a Volume.
......
...@@ -527,6 +527,11 @@ type PersistentVolumeSpec struct { ...@@ -527,6 +527,11 @@ type PersistentVolumeSpec struct {
// More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options
// +optional // +optional
MountOptions []string `json:"mountOptions,omitempty" protobuf:"bytes,7,opt,name=mountOptions"` MountOptions []string `json:"mountOptions,omitempty" protobuf:"bytes,7,opt,name=mountOptions"`
// 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 an alpha feature and may change in the future.
// +optional
VolumeMode *PersistentVolumeMode `json:"volumeMode,omitempty" protobuf:"bytes,8,opt,name=volumeMode,casttype=PersistentVolumeMode"`
} }
// PersistentVolumeReclaimPolicy describes a policy for end-of-life maintenance of persistent volumes. // PersistentVolumeReclaimPolicy describes a policy for end-of-life maintenance of persistent volumes.
...@@ -544,6 +549,16 @@ const ( ...@@ -544,6 +549,16 @@ const (
PersistentVolumeReclaimRetain PersistentVolumeReclaimPolicy = "Retain" PersistentVolumeReclaimRetain PersistentVolumeReclaimPolicy = "Retain"
) )
// PersistentVolumeMode describes how a volume is intended to be consumed, either Block or Filesystem.
type PersistentVolumeMode string
const (
// PersistentVolumeBlock means the volume will not be formatted with a filesystem and will remain a raw block device.
PersistentVolumeBlock PersistentVolumeMode = "Block"
// PersistentVolumeFilesystem means the volume will be or is formatted with a filesystem.
PersistentVolumeFilesystem PersistentVolumeMode = "Filesystem"
)
// PersistentVolumeStatus is the current status of a persistent volume. // PersistentVolumeStatus is the current status of a persistent volume.
type PersistentVolumeStatus struct { type PersistentVolumeStatus struct {
// Phase indicates if a volume is available, bound to a claim, or released by a claim. // Phase indicates if a volume is available, bound to a claim, or released by a claim.
...@@ -631,6 +646,11 @@ type PersistentVolumeClaimSpec struct { ...@@ -631,6 +646,11 @@ type PersistentVolumeClaimSpec struct {
// More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1
// +optional // +optional
StorageClassName *string `json:"storageClassName,omitempty" protobuf:"bytes,5,opt,name=storageClassName"` StorageClassName *string `json:"storageClassName,omitempty" protobuf:"bytes,5,opt,name=storageClassName"`
// volumeMode defines what type of volume is required by the claim.
// Value of Filesystem is implied when not included in claim spec.
// This is an alpha feature and may change in the future.
// +optional
VolumeMode *PersistentVolumeMode `json:"volumeMode,omitempty" protobuf:"bytes,6,opt,name=volumeMode,casttype=PersistentVolumeMode"`
} }
// PersistentVolumeClaimConditionType is a valid value of PersistentVolumeClaimCondition.Type // PersistentVolumeClaimConditionType is a valid value of PersistentVolumeClaimCondition.Type
...@@ -1709,6 +1729,14 @@ const ( ...@@ -1709,6 +1729,14 @@ const (
MountPropagationBidirectional MountPropagationMode = "Bidirectional" MountPropagationBidirectional MountPropagationMode = "Bidirectional"
) )
// volumeDevice describes a mapping of a raw block device within a container.
type VolumeDevice struct {
// name must match the name of a persistentVolumeClaim in the pod
Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
// devicePath is the path inside of the container that the device will be mapped to.
DevicePath string `json:"devicePath" protobuf:"bytes,2,opt,name=devicePath"`
}
// EnvVar represents an environment variable present in a Container. // EnvVar represents an environment variable present in a Container.
type EnvVar struct { type EnvVar struct {
// Name of the environment variable. Must be a C_IDENTIFIER. // Name of the environment variable. Must be a C_IDENTIFIER.
...@@ -2052,6 +2080,12 @@ type Container struct { ...@@ -2052,6 +2080,12 @@ type Container struct {
// +patchMergeKey=mountPath // +patchMergeKey=mountPath
// +patchStrategy=merge // +patchStrategy=merge
VolumeMounts []VolumeMount `json:"volumeMounts,omitempty" patchStrategy:"merge" patchMergeKey:"mountPath" protobuf:"bytes,9,rep,name=volumeMounts"` VolumeMounts []VolumeMount `json:"volumeMounts,omitempty" patchStrategy:"merge" patchMergeKey:"mountPath" protobuf:"bytes,9,rep,name=volumeMounts"`
// volumeDevices is the list of block devices to be used by the container.
// This is an alpha feature and may change in the future.
// +patchMergeKey=devicePath
// +patchStrategy=merge
// +optional
VolumeDevices []VolumeDevice `json:"volumeDevices,omitempty" patchStrategy:"merge" patchMergeKey:"devicePath" protobuf:"bytes,21,rep,name=volumeDevices"`
// Periodic probe of container liveness. // Periodic probe of container liveness.
// Container will be restarted if the probe fails. // Container will be restarted if the probe fails.
// Cannot be updated. // Cannot be updated.
......
...@@ -289,6 +289,7 @@ var map_Container = map[string]string{ ...@@ -289,6 +289,7 @@ var map_Container = map[string]string{
"env": "List of environment variables to set in the container. Cannot be updated.", "env": "List of environment variables to set in the container. Cannot be updated.",
"resources": "Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources", "resources": "Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources",
"volumeMounts": "Pod volumes to mount into the container's filesystem. Cannot be updated.", "volumeMounts": "Pod volumes to mount into the container's filesystem. Cannot be updated.",
"volumeDevices": "volumeDevices is the list of block devices to be used by the container. This is an alpha feature and may change in the future.",
"livenessProbe": "Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", "livenessProbe": "Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes",
"readinessProbe": "Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", "readinessProbe": "Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes",
"lifecycle": "Actions that the management system should take in response to container lifecycle events. Cannot be updated.", "lifecycle": "Actions that the management system should take in response to container lifecycle events. Cannot be updated.",
...@@ -1162,6 +1163,7 @@ var map_PersistentVolumeClaimSpec = map[string]string{ ...@@ -1162,6 +1163,7 @@ var map_PersistentVolumeClaimSpec = map[string]string{
"resources": "Resources represents the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources", "resources": "Resources represents the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources",
"volumeName": "VolumeName is the binding reference to the PersistentVolume backing this claim.", "volumeName": "VolumeName is the binding reference to the PersistentVolume backing this claim.",
"storageClassName": "Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1", "storageClassName": "Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1",
"volumeMode": "volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec. This is an alpha feature and may change in the future.",
} }
func (PersistentVolumeClaimSpec) SwaggerDoc() map[string]string { func (PersistentVolumeClaimSpec) SwaggerDoc() map[string]string {
...@@ -1238,6 +1240,7 @@ var map_PersistentVolumeSpec = map[string]string{ ...@@ -1238,6 +1240,7 @@ var map_PersistentVolumeSpec = map[string]string{
"persistentVolumeReclaimPolicy": "What happens to a persistent volume when released from its claim. Valid options are Retain (default) and Recycle. Recycling must be supported by the volume plugin underlying this persistent volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming", "persistentVolumeReclaimPolicy": "What happens to a persistent volume when released from its claim. Valid options are Retain (default) and Recycle. Recycling must be supported by the volume plugin underlying this persistent volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming",
"storageClassName": "Name of StorageClass to which this persistent volume belongs. Empty value means that this volume does not belong to any StorageClass.", "storageClassName": "Name of StorageClass to which this persistent volume belongs. Empty value means that this volume does not belong to any StorageClass.",
"mountOptions": "A list of mount options, e.g. [\"ro\", \"soft\"]. Not validated - mount will simply fail if one is invalid. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options", "mountOptions": "A list of mount options, e.g. [\"ro\", \"soft\"]. Not validated - mount will simply fail if one is invalid. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options",
"volumeMode": "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 an alpha feature and may change in the future.",
} }
func (PersistentVolumeSpec) SwaggerDoc() map[string]string { func (PersistentVolumeSpec) SwaggerDoc() map[string]string {
...@@ -2077,6 +2080,16 @@ func (Volume) SwaggerDoc() map[string]string { ...@@ -2077,6 +2080,16 @@ func (Volume) SwaggerDoc() map[string]string {
return map_Volume return map_Volume
} }
var map_VolumeDevice = map[string]string{
"": "volumeDevice describes a mapping of a raw block device within a container.",
"name": "name must match the name of a persistentVolumeClaim in the pod",
"devicePath": "devicePath is the path inside of the container that the device will be mapped to.",
}
func (VolumeDevice) SwaggerDoc() map[string]string {
return map_VolumeDevice
}
var map_VolumeMount = map[string]string{ var map_VolumeMount = map[string]string{
"": "VolumeMount describes a mounting of a Volume within a container.", "": "VolumeMount describes a mounting of a Volume within a container.",
"name": "This must match the Name of a Volume.", "name": "This must match the Name of a Volume.",
......
...@@ -706,6 +706,11 @@ func (in *Container) DeepCopyInto(out *Container) { ...@@ -706,6 +706,11 @@ func (in *Container) DeepCopyInto(out *Container) {
(*in)[i].DeepCopyInto(&(*out)[i]) (*in)[i].DeepCopyInto(&(*out)[i])
} }
} }
if in.VolumeDevices != nil {
in, out := &in.VolumeDevices, &out.VolumeDevices
*out = make([]VolumeDevice, len(*in))
copy(*out, *in)
}
if in.LivenessProbe != nil { if in.LivenessProbe != nil {
in, out := &in.LivenessProbe, &out.LivenessProbe in, out := &in.LivenessProbe, &out.LivenessProbe
if *in == nil { if *in == nil {
...@@ -2871,6 +2876,15 @@ func (in *PersistentVolumeClaimSpec) DeepCopyInto(out *PersistentVolumeClaimSpec ...@@ -2871,6 +2876,15 @@ func (in *PersistentVolumeClaimSpec) DeepCopyInto(out *PersistentVolumeClaimSpec
**out = **in **out = **in
} }
} }
if in.VolumeMode != nil {
in, out := &in.VolumeMode, &out.VolumeMode
if *in == nil {
*out = nil
} else {
*out = new(PersistentVolumeMode)
**out = **in
}
}
return return
} }
...@@ -3213,6 +3227,15 @@ func (in *PersistentVolumeSpec) DeepCopyInto(out *PersistentVolumeSpec) { ...@@ -3213,6 +3227,15 @@ func (in *PersistentVolumeSpec) DeepCopyInto(out *PersistentVolumeSpec) {
*out = make([]string, len(*in)) *out = make([]string, len(*in))
copy(*out, *in) copy(*out, *in)
} }
if in.VolumeMode != nil {
in, out := &in.VolumeMode, &out.VolumeMode
if *in == nil {
*out = nil
} else {
*out = new(PersistentVolumeMode)
**out = **in
}
}
return return
} }
...@@ -5323,6 +5346,22 @@ func (in *Volume) DeepCopy() *Volume { ...@@ -5323,6 +5346,22 @@ func (in *Volume) DeepCopy() *Volume {
} }
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *VolumeDevice) DeepCopyInto(out *VolumeDevice) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeDevice.
func (in *VolumeDevice) DeepCopy() *VolumeDevice {
if in == nil {
return nil
}
out := new(VolumeDevice)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *VolumeMount) DeepCopyInto(out *VolumeMount) { func (in *VolumeMount) DeepCopyInto(out *VolumeMount) {
*out = *in *out = *in
if in.MountPropagation != nil { if in.MountPropagation != nil {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment