Skip to content

Commit 299de2f

Browse files
authored
Add sub_path_expr to volume mount options (#2622)
1 parent d68711a commit 299de2f

20 files changed

+131
-1
lines changed

.changelog/2622.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:enhancement
2+
Add `sub_path_expr` to volume mount options pod spec
3+
```

docs/data-sources/pod.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -802,6 +802,7 @@ Read-Only:
802802
- `name` (String)
803803
- `read_only` (Boolean)
804804
- `sub_path` (String)
805+
- `sub_path_expr` (String)
805806

806807

807808

@@ -1321,6 +1322,7 @@ Read-Only:
13211322
- `name` (String)
13221323
- `read_only` (Boolean)
13231324
- `sub_path` (String)
1325+
- `sub_path_expr` (String)
13241326

13251327

13261328

docs/data-sources/pod_v1.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -802,6 +802,7 @@ Read-Only:
802802
- `name` (String)
803803
- `read_only` (Boolean)
804804
- `sub_path` (String)
805+
- `sub_path_expr` (String)
805806

806807

807808

@@ -1321,6 +1322,7 @@ Read-Only:
13211322
- `name` (String)
13221323
- `read_only` (Boolean)
13231324
- `sub_path` (String)
1325+
- `sub_path_expr` (String)
13241326

13251327

13261328

docs/resources/cron_job.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -951,6 +951,7 @@ Optional:
951951
- `mount_propagation` (String) Mount propagation mode. mount_propagation determines how mounts are propagated from the host to container and the other way around. Valid values are None (default), HostToContainer and Bidirectional.
952952
- `read_only` (Boolean) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.
953953
- `sub_path` (String) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root).
954+
- `sub_path_expr` (String) Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to "" (volume's root).
954955

955956
<a id="nestedblock--spec--job_template--spec--template--spec--container--volume_device"></a>
956957
### Nested Schema for `spec.job_template.spec.template.spec.container.volume_device`
@@ -1512,6 +1513,7 @@ Optional:
15121513
- `mount_propagation` (String) Mount propagation mode. mount_propagation determines how mounts are propagated from the host to container and the other way around. Valid values are None (default), HostToContainer and Bidirectional.
15131514
- `read_only` (Boolean) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.
15141515
- `sub_path` (String) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root).
1516+
- `sub_path_expr` (String) Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to "" (volume's root).
15151517

15161518
<a id="nestedblock--spec--job_template--spec--template--spec--init_container--volume_device"></a>
15171519
### Nested Schema for `spec.job_template.spec.template.spec.init_container.volume_device`
@@ -2389,4 +2391,4 @@ resource "kubernetes_cron_job" "demo" {
23892391

23902392
```
23912393
$ terraform import kubernetes_cron_job_v1/example default/example
2392-
```
2394+
```

docs/resources/cron_job_v1.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -946,6 +946,7 @@ Optional:
946946
- `mount_propagation` (String) Mount propagation mode. mount_propagation determines how mounts are propagated from the host to container and the other way around. Valid values are None (default), HostToContainer and Bidirectional.
947947
- `read_only` (Boolean) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.
948948
- `sub_path` (String) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root).
949+
- `sub_path_expr` (String) Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to "" (volume's root).
949950

950951
<a id="nestedblock--spec--job_template--spec--template--spec--container--volume_device"></a>
951952
### Nested Schema for `spec.job_template.spec.template.spec.container.volume_device`
@@ -1507,6 +1508,7 @@ Optional:
15071508
- `mount_propagation` (String) Mount propagation mode. mount_propagation determines how mounts are propagated from the host to container and the other way around. Valid values are None (default), HostToContainer and Bidirectional.
15081509
- `read_only` (Boolean) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.
15091510
- `sub_path` (String) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root).
1511+
- `sub_path_expr` (String) Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to "" (volume's root).
15101512

15111513
<a id="nestedblock--spec--job_template--spec--template--spec--init_container--volume_device"></a>
15121514
### Nested Schema for `spec.job_template.spec.template.spec.init_container.volume_device`

docs/resources/daemon_set_v1.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -898,6 +898,7 @@ Optional:
898898
- `mount_propagation` (String) Mount propagation mode. mount_propagation determines how mounts are propagated from the host to container and the other way around. Valid values are None (default), HostToContainer and Bidirectional.
899899
- `read_only` (Boolean) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.
900900
- `sub_path` (String) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root).
901+
- `sub_path_expr` (String) Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to "" (volume's root).
901902

902903
<a id="nestedblock--spec--template--spec--container--volume_device"></a>
903904
### Nested Schema for `spec.template.spec.container.volume_device`
@@ -1458,6 +1459,7 @@ Optional:
14581459
- `mount_propagation` (String) Mount propagation mode. mount_propagation determines how mounts are propagated from the host to container and the other way around. Valid values are None (default), HostToContainer and Bidirectional.
14591460
- `read_only` (Boolean) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.
14601461
- `sub_path` (String) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root).
1462+
- `sub_path_expr` (String) Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to "" (volume's root).
14611463

14621464
<a id="nestedblock--spec--template--spec--init_container--volume_device"></a>
14631465
### Nested Schema for `spec.template.spec.init_container.volume_device`

docs/resources/daemonset.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -898,6 +898,7 @@ Optional:
898898
- `mount_propagation` (String) Mount propagation mode. mount_propagation determines how mounts are propagated from the host to container and the other way around. Valid values are None (default), HostToContainer and Bidirectional.
899899
- `read_only` (Boolean) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.
900900
- `sub_path` (String) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root).
901+
- `sub_path_expr` (String) Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to "" (volume's root).
901902

902903
<a id="nestedblock--spec--template--spec--container--volume_device"></a>
903904
### Nested Schema for `spec.template.spec.container.volume_device`
@@ -1458,6 +1459,7 @@ Optional:
14581459
- `mount_propagation` (String) Mount propagation mode. mount_propagation determines how mounts are propagated from the host to container and the other way around. Valid values are None (default), HostToContainer and Bidirectional.
14591460
- `read_only` (Boolean) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.
14601461
- `sub_path` (String) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root).
1462+
- `sub_path_expr` (String) Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to "" (volume's root).
14611463

14621464
<a id="nestedblock--spec--template--spec--init_container--volume_device"></a>
14631465
### Nested Schema for `spec.template.spec.init_container.volume_device`

docs/resources/deployment.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -898,6 +898,7 @@ Optional:
898898
- `mount_propagation` (String) Mount propagation mode. mount_propagation determines how mounts are propagated from the host to container and the other way around. Valid values are None (default), HostToContainer and Bidirectional.
899899
- `read_only` (Boolean) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.
900900
- `sub_path` (String) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root).
901+
- `sub_path_expr` (String) Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to "" (volume's root).
901902

902903
<a id="nestedblock--spec--template--spec--container--volume_device"></a>
903904
### Nested Schema for `spec.template.spec.container.volume_device`
@@ -1458,6 +1459,7 @@ Optional:
14581459
- `mount_propagation` (String) Mount propagation mode. mount_propagation determines how mounts are propagated from the host to container and the other way around. Valid values are None (default), HostToContainer and Bidirectional.
14591460
- `read_only` (Boolean) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.
14601461
- `sub_path` (String) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root).
1462+
- `sub_path_expr` (String) Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to "" (volume's root).
14611463

14621464
<a id="nestedblock--spec--template--spec--init_container--volume_device"></a>
14631465
### Nested Schema for `spec.template.spec.init_container.volume_device`

docs/resources/deployment_v1.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -906,6 +906,7 @@ Optional:
906906
- `mount_propagation` (String) Mount propagation mode. mount_propagation determines how mounts are propagated from the host to container and the other way around. Valid values are None (default), HostToContainer and Bidirectional.
907907
- `read_only` (Boolean) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.
908908
- `sub_path` (String) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root).
909+
- `sub_path_expr` (String) Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to "" (volume's root).
909910

910911
<a id="nestedblock--spec--template--spec--container--volume_device"></a>
911912
### Nested Schema for `spec.template.spec.container.volume_device`
@@ -1466,6 +1467,7 @@ Optional:
14661467
- `mount_propagation` (String) Mount propagation mode. mount_propagation determines how mounts are propagated from the host to container and the other way around. Valid values are None (default), HostToContainer and Bidirectional.
14671468
- `read_only` (Boolean) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.
14681469
- `sub_path` (String) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root).
1470+
- `sub_path_expr` (String) Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to "" (volume's root).
14691471

14701472
<a id="nestedblock--spec--template--spec--init_container--volume_device"></a>
14711473
### Nested Schema for `spec.template.spec.init_container.volume_device`

docs/resources/job.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -906,6 +906,7 @@ Optional:
906906
- `mount_propagation` (String) Mount propagation mode. mount_propagation determines how mounts are propagated from the host to container and the other way around. Valid values are None (default), HostToContainer and Bidirectional.
907907
- `read_only` (Boolean) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.
908908
- `sub_path` (String) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root).
909+
- `sub_path_expr` (String) Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to "" (volume's root).
909910

910911
<a id="nestedblock--spec--template--spec--container--volume_device"></a>
911912
### Nested Schema for `spec.template.spec.container.volume_device`
@@ -1466,6 +1467,7 @@ Optional:
14661467
- `mount_propagation` (String) Mount propagation mode. mount_propagation determines how mounts are propagated from the host to container and the other way around. Valid values are None (default), HostToContainer and Bidirectional.
14671468
- `read_only` (Boolean) Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.
14681469
- `sub_path` (String) Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root).
1470+
- `sub_path_expr` (String) Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to "" (volume's root).
14691471

14701472
<a id="nestedblock--spec--template--spec--init_container--volume_device"></a>
14711473
### Nested Schema for `spec.template.spec.init_container.volume_device`

0 commit comments

Comments
 (0)