Skip to content

Commit 507da66

Browse files
jirislavBBBmau
andauthored
Add VolumeDevices to PodSpec (#2572) (#2573)
* Add VolumeDevices to PodSpec (#2572) * Update changelog to include schema_container --------- Co-authored-by: Mauricio Alvarez Leon <[email protected]>
1 parent afd774d commit 507da66

19 files changed

+1788
-3
lines changed

.changelog/2573.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:enhancement
2+
`schema_container.go`: Add VolumeDevices
3+
```

docs/resources/cron_job.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,7 @@ Optional:
466466
- `termination_message_policy` (String) Optional: Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.
467467
- `tty` (Boolean) Whether this container should allocate a TTY for itself
468468
- `volume_mount` (Block List) Pod volumes to mount into the container's filesystem. Cannot be updated. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--volume_mount))
469+
- `volume_device` (Block List) Raw volume devices to attach into the container's filesystem as raw block devices. Cannot be updated. More info: https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#volumes-1 (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--volume_device))
469470
- `working_dir` (String) Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated.
470471

471472
<a id="nestedblock--spec--job_template--spec--template--spec--container--env"></a>
@@ -949,6 +950,14 @@ Optional:
949950
- `read_only` (Boolean) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.
950951
- `sub_path` (String) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root).
951952

953+
<a id="nestedblock--spec--job_template--spec--template--spec--container--volume_device"></a>
954+
### Nested Schema for `spec.job_template.spec.template.spec.container.volume_device`
955+
956+
Required:
957+
958+
- `device_path` (String) Path within the container at which the volume device should be attached. For example '/dev/xvda'.
959+
- `name` (String) This must match the Name of a PersistentVolumeClaim.
960+
952961

953962

954963
<a id="nestedblock--spec--job_template--spec--template--spec--dns_config"></a>
@@ -1018,6 +1027,7 @@ Optional:
10181027
- `termination_message_policy` (String) Optional: Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.
10191028
- `tty` (Boolean) Whether this container should allocate a TTY for itself
10201029
- `volume_mount` (Block List) Pod volumes to mount into the container's filesystem. Cannot be updated. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--volume_mount))
1030+
- `volume_device` (Block List) Raw volume devices to attach into the container's filesystem as raw block devices. Cannot be updated. More info: https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#volumes-1 (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--volume_device))
10211031
- `working_dir` (String) Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated.
10221032

10231033
<a id="nestedblock--spec--job_template--spec--template--spec--init_container--env"></a>
@@ -1501,6 +1511,14 @@ Optional:
15011511
- `read_only` (Boolean) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.
15021512
- `sub_path` (String) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root).
15031513

1514+
<a id="nestedblock--spec--job_template--spec--template--spec--init_container--volume_device"></a>
1515+
### Nested Schema for `spec.job_template.spec.template.spec.init_container.volume_device`
1516+
1517+
Required:
1518+
1519+
- `device_path` (String) Path within the container at which the volume device should be attached. For example '/dev/xvda'.
1520+
- `name` (String) This must match the Name of a PersistentVolumeClaim.
1521+
15041522

15051523

15061524
<a id="nestedblock--spec--job_template--spec--template--spec--os"></a>

docs/resources/cron_job_v1.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,7 @@ Optional:
461461
- `termination_message_policy` (String) Optional: Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.
462462
- `tty` (Boolean) Whether this container should allocate a TTY for itself
463463
- `volume_mount` (Block List) Pod volumes to mount into the container's filesystem. Cannot be updated. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--volume_mount))
464+
- `volume_device` (Block List) Raw volume devices to attach into the container's filesystem as raw block devices. Cannot be updated. More info: https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#volumes-1 (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--container--volume_device))
464465
- `working_dir` (String) Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated.
465466

466467
<a id="nestedblock--spec--job_template--spec--template--spec--container--env"></a>
@@ -944,6 +945,14 @@ Optional:
944945
- `read_only` (Boolean) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.
945946
- `sub_path` (String) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root).
946947

948+
<a id="nestedblock--spec--job_template--spec--template--spec--container--volume_device"></a>
949+
### Nested Schema for `spec.job_template.spec.template.spec.container.volume_device`
950+
951+
Required:
952+
953+
- `device_path` (String) Path within the container at which the volume device should be attached. For example '/dev/xvda'.
954+
- `name` (String) This must match the Name of a PersistentVolumeClaim.
955+
947956

948957

949958
<a id="nestedblock--spec--job_template--spec--template--spec--dns_config"></a>
@@ -1013,6 +1022,7 @@ Optional:
10131022
- `termination_message_policy` (String) Optional: Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.
10141023
- `tty` (Boolean) Whether this container should allocate a TTY for itself
10151024
- `volume_mount` (Block List) Pod volumes to mount into the container's filesystem. Cannot be updated. (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--volume_mount))
1025+
- `volume_device` (Block List) Raw volume devices to attach into the container's filesystem as raw block devices. Cannot be updated. More info: https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#volumes-1 (see [below for nested schema](#nestedblock--spec--job_template--spec--template--spec--init_container--volume_device))
10161026
- `working_dir` (String) Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated.
10171027

10181028
<a id="nestedblock--spec--job_template--spec--template--spec--init_container--env"></a>
@@ -1496,6 +1506,14 @@ Optional:
14961506
- `read_only` (Boolean) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.
14971507
- `sub_path` (String) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root).
14981508

1509+
<a id="nestedblock--spec--job_template--spec--template--spec--init_container--volume_device"></a>
1510+
### Nested Schema for `spec.job_template.spec.template.spec.init_container.volume_device`
1511+
1512+
Required:
1513+
1514+
- `device_path` (String) Path within the container at which the volume device should be attached. For example '/dev/xvda'.
1515+
- `name` (String) This must match the Name of a PersistentVolumeClaim.
1516+
14991517

15001518

15011519
<a id="nestedblock--spec--job_template--spec--template--spec--os"></a>

docs/resources/daemon_set_v1.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,7 @@ Optional:
415415
- `termination_message_policy` (String) Optional: Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.
416416
- `tty` (Boolean) Whether this container should allocate a TTY for itself
417417
- `volume_mount` (Block List) Pod volumes to mount into the container's filesystem. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--container--volume_mount))
418+
- `volume_device` (Block List) Raw volume devices to attach into the container's filesystem as raw block devices. Cannot be updated. More info: https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#volumes-1 (see [below for nested schema](#nestedblock--spec--template--spec--container--volume_device))
418419
- `working_dir` (String) Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated.
419420

420421
<a id="nestedblock--spec--template--spec--container--env"></a>
@@ -898,6 +899,13 @@ Optional:
898899
- `read_only` (Boolean) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.
899900
- `sub_path` (String) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root).
900901

902+
<a id="nestedblock--spec--template--spec--container--volume_device"></a>
903+
### Nested Schema for `spec.template.spec.container.volume_device`
904+
905+
Required:
906+
907+
- `device_path` (String) Path within the container at which the volume device should be attached. For example '/dev/xvda'.
908+
- `name` (String) This must match the Name of a PersistentVolumeClaim.
901909

902910

903911
<a id="nestedblock--spec--template--spec--dns_config"></a>
@@ -967,6 +975,7 @@ Optional:
967975
- `termination_message_policy` (String) Optional: Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.
968976
- `tty` (Boolean) Whether this container should allocate a TTY for itself
969977
- `volume_mount` (Block List) Pod volumes to mount into the container's filesystem. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--volume_mount))
978+
- `volume_device` (Block List) Raw volume devices to attach into the container's filesystem as raw block devices. Cannot be updated. More info: https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#volumes-1 (see [below for nested schema](#nestedblock--spec--template--spec--init_container--volume_device))
970979
- `working_dir` (String) Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated.
971980

972981
<a id="nestedblock--spec--template--spec--init_container--env"></a>
@@ -1450,6 +1459,13 @@ Optional:
14501459
- `read_only` (Boolean) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.
14511460
- `sub_path` (String) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root).
14521461

1462+
<a id="nestedblock--spec--template--spec--init_container--volume_device"></a>
1463+
### Nested Schema for `spec.template.spec.init_container.volume_device`
1464+
1465+
Required:
1466+
1467+
- `device_path` (String) Path within the container at which the volume device should be attached. For example '/dev/xvda'.
1468+
- `name` (String) This must match the Name of a PersistentVolumeClaim.
14531469

14541470

14551471
<a id="nestedblock--spec--template--spec--os"></a>

docs/resources/daemonset.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,7 @@ Optional:
415415
- `termination_message_policy` (String) Optional: Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.
416416
- `tty` (Boolean) Whether this container should allocate a TTY for itself
417417
- `volume_mount` (Block List) Pod volumes to mount into the container's filesystem. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--container--volume_mount))
418+
- `volume_device` (Block List) Raw volume devices to attach into the container's filesystem as raw block devices. Cannot be updated. More info: https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#volumes-1 (see [below for nested schema](#nestedblock--spec--template--spec--container--volume_device))
418419
- `working_dir` (String) Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated.
419420

420421
<a id="nestedblock--spec--template--spec--container--env"></a>
@@ -898,6 +899,13 @@ Optional:
898899
- `read_only` (Boolean) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.
899900
- `sub_path` (String) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root).
900901

902+
<a id="nestedblock--spec--template--spec--container--volume_device"></a>
903+
### Nested Schema for `spec.template.spec.container.volume_device`
904+
905+
Required:
906+
907+
- `device_path` (String) Path within the container at which the volume device should be attached. For example '/dev/xvda'.
908+
- `name` (String) This must match the Name of a PersistentVolumeClaim.
901909

902910

903911
<a id="nestedblock--spec--template--spec--dns_config"></a>
@@ -967,6 +975,7 @@ Optional:
967975
- `termination_message_policy` (String) Optional: Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.
968976
- `tty` (Boolean) Whether this container should allocate a TTY for itself
969977
- `volume_mount` (Block List) Pod volumes to mount into the container's filesystem. Cannot be updated. (see [below for nested schema](#nestedblock--spec--template--spec--init_container--volume_mount))
978+
- `volume_device` (Block List) Raw volume devices to attach into the container's filesystem as raw block devices. Cannot be updated. More info: https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#volumes-1 (see [below for nested schema](#nestedblock--spec--template--spec--init_container--volume_device))
970979
- `working_dir` (String) Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated.
971980

972981
<a id="nestedblock--spec--template--spec--init_container--env"></a>
@@ -1450,6 +1459,13 @@ Optional:
14501459
- `read_only` (Boolean) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.
14511460
- `sub_path` (String) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root).
14521461

1462+
<a id="nestedblock--spec--template--spec--init_container--volume_device"></a>
1463+
### Nested Schema for `spec.template.spec.init_container.volume_device`
1464+
1465+
Required:
1466+
1467+
- `device_path` (String) Path within the container at which the volume device should be attached. For example '/dev/xvda'.
1468+
- `name` (String) This must match the Name of a PersistentVolumeClaim.
14531469

14541470

14551471
<a id="nestedblock--spec--template--spec--os"></a>

0 commit comments

Comments
 (0)