See: https://github.com/heathcliff26/predictable-path-provisioner
4.4K
A Kubernetes external dynamic provisioner that creates local PersistentVolumes under human-readable folder paths.
ReadWriteOnce and ReadWriteOncePod is supported.P3 helm charts are released via oci repos and can be installed with:
helm install p3 oci://ghcr.io/heathcliff26/manifests/predictable-path-provisioner --version <version>
Please use the latest version from the releases page.
An example deployment can be found here.
To deploy it to your cluster, run:
kubectl apply -f https://raw.githubusercontent.com/heathcliff26/predictable-path-provisioner/main/examples/p3.yaml
This will deploy the app to your cluster into the namespace p3.
By default P3 uses the provisioner name heathcliff.eu/predictable-path-provisioner.
It's behaviour can be configured via the StorageClass parameters. The following parameters are supported:
| Parameter | Default | Description |
|---|---|---|
basePath | /var/lib/predictable-path-provisioner | The base directory on the host under which the volumes will be created. Needs to be an absolute path. |
pathTemplate | {{pvc.namespace}}/{{pvc.name}} | The template for the volume folder. It accepts the following templates (case sensitive): pvc.name, pvc.namespace, pvc.uid |
---
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: "p3"
annotations:
storageclass.kubernetes.io/is-default-class: "true"
provisioner: heathcliff.eu/predictable-path-provisioner
reclaimPolicy: Delete
volumeBindingMode: Immediate
This would result in the Persistent Volume for the Claim default/test being created under /var/lib/predictable-path-provisioner/default/test.
---
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: "p3"
annotations:
storageclass.kubernetes.io/is-default-class: "true"
provisioner: heathcliff.eu/predictable-path-provisioner
parameters:
basePath: /data/p3
pathTemplate: pvc-{{pvc.uid}}
reclaimPolicy: Delete
volumeBindingMode: Immediate
This would result in the Persistent Volume being created under /data/p3/pvc-<some-uid>
| Container Registry | Image |
|---|---|
| Github Container | ghcr.io/heathcliff26/p3 |
| Docker Hub | docker.io/heathcliff26/p3 |
| Quay.io | quay.io/heathcliff26/p3 |
There are different flavors of the image:
| Tag(s) | Description |
|---|---|
| latest | Last released version of the image |
| rolling | Rolling update of the image, always build from main branch. |
| vX.Y.Z | Released version of the image |
Content type
Image
Digest
sha256:f04afcf59…
Size
10.3 MB
Last updated
5 days ago
docker pull heathcliff26/p3