Skip to content

Commit

Permalink
Updating documentation / changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
JaylonmcShan03 committed Dec 9, 2024
1 parent da07bf8 commit f1129a3
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .changelog/2644.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
Added support for the `data_source` field in the PersistentVolumeClaim resource.
```
35 changes: 34 additions & 1 deletion docs/resources/persistent_volume_claim_v1.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Required:
- `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))

Optional:

- `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))
- `selector` (Block List, Max: 1) A label query over volumes to consider for binding. (see [below for nested schema](#nestedblock--spec--selector))
- `storage_class_name` (String) Name of the storage class requested by the claim
- `volume_mode` (String) Defines what type of volume is required by the claim.
Expand All @@ -67,6 +67,19 @@ Optional:
- `limits` (Map of String) Map describing the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
- `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/

<a id="nestedblock--spec--data_source"></a>
### Nested Schema for `spec.data_source`

Optional:

- `persistent_volume_claim` (Block List, Max: 1) Details of the source PersistentVolumeClaim. (see [below for nested schema](#nestedblock--spec--data_source--persistent_volume_claim))

<a id="nestedblock--spec--data_source--persistent_volume_claim"></a>
### Nested Schema for `spec.data_source.persistent_volume_claim`

Required:

- `claim_name` (String) The name of the source PersistentVolumeClaim.

<a id="nestedblock--spec--selector"></a>
### Nested Schema for `spec.selector`
Expand Down Expand Up @@ -132,6 +145,26 @@ resource "kubernetes_persistent_volume_v1" "example" {
}
}
}
resource "kubernetes_persistent_volume_claim_v1" "example_clone" {
metadata {
name = "example-clone-pvc"
}
spec {
access_modes = ["ReadWriteOnce"]
resources {
requests = {
storage = "1Gi"
}
}
data_source {
persistent_volume_claim {
claim_name = "example-source-pvc"
}
}
}
}
```

## Import
Expand Down

0 comments on commit f1129a3

Please sign in to comment.