Skip to content

Commit fadf044

Browse files
Updating documentation / changelog
1 parent da07bf8 commit fadf044

File tree

2 files changed

+37
-1
lines changed

2 files changed

+37
-1
lines changed

.changelog/2644.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:enhancement
2+
Added support for the `data_source` field in the PersistentVolumeClaim resource.
3+
```

docs/resources/persistent_volume_claim_v1.md

+34-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Required:
5353
- `resources` (Block List, Min: 1, Max: 1) A list of the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources (see [below for nested schema](#nestedblock--spec--resources))
5454

5555
Optional:
56-
56+
- `data_source` (Block List, Max: 1) Specifies the data source for the PersistentVolumeClaim. Allows creating a PersistentVolumeClaim from another PVC, a VolumeSnapshot, or a VolumePopulator. (see [below for nested schema](#nestedblock--spec--data_source))
5757
- `selector` (Block List, Max: 1) A label query over volumes to consider for binding. (see [below for nested schema](#nestedblock--spec--selector))
5858
- `storage_class_name` (String) Name of the storage class requested by the claim
5959
- `volume_mode` (String) Defines what type of volume is required by the claim.
@@ -67,6 +67,19 @@ Optional:
6767
- `limits` (Map of String) Map describing the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
6868
- `requests` (Map of String) Map describing the minimum amount of compute resources required. If this is omitted for a container, it defaults to `limits` if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
6969

70+
<a id="nestedblock--spec--data_source"></a>
71+
### Nested Schema for `spec.data_source`
72+
73+
Optional:
74+
75+
- `persistent_volume_claim` (Block List, Max: 1) Details of the source PersistentVolumeClaim. (see [below for nested schema](#nestedblock--spec--data_source--persistent_volume_claim))
76+
77+
<a id="nestedblock--spec--data_source--persistent_volume_claim"></a>
78+
### Nested Schema for `spec.data_source.persistent_volume_claim`
79+
80+
Required:
81+
82+
- `claim_name` (String) The name of the source PersistentVolumeClaim.
7083

7184
<a id="nestedblock--spec--selector"></a>
7285
### Nested Schema for `spec.selector`
@@ -132,6 +145,26 @@ resource "kubernetes_persistent_volume_v1" "example" {
132145
}
133146
}
134147
}
148+
149+
resource "kubernetes_persistent_volume_claim_v1" "example_clone" {
150+
metadata {
151+
name = "example-clone-pvc"
152+
}
153+
spec {
154+
access_modes = ["ReadWriteOnce"]
155+
resources {
156+
requests = {
157+
storage = "1Gi"
158+
}
159+
}
160+
data_source {
161+
persistent_volume_claim {
162+
claim_name = "example-source-pvc"
163+
}
164+
}
165+
}
166+
}
167+
135168
```
136169

137170
## Import

0 commit comments

Comments
 (0)