Sign inSign up

heathcliff26/p3

By heathcliff26

Updated 5 days ago

See: https://github.com/heathcliff26/predictable-path-provisioner

Image
Databases & storage
0

4.4K

heathcliff26/p3 repository overview

CI Coverage Status Editorconfig Check Generate go test cover report Renovate

P3 (Predictable Path Provisioner)

A Kubernetes external dynamic provisioner that creates local PersistentVolumes under human-readable folder paths.

Table of Contents

Important considerations

  • There is mechanism to prevent path collisions. Use custom name templates at your own risk.
  • This is mostly a hobby project, intended for my own use. Use at your own risk.
  • Only AccessModes ReadWriteOnce and ReadWriteOncePod is supported.

Installation

Using helm

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.

Using kubectl

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.

Usage

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:

ParameterDefaultDescription
basePath/var/lib/predictable-path-provisionerThe 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
Example storage classes
With defaults:
---
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.

With custom basePath and pathTemplate:
---
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 Images

Image location
Container RegistryImage
Github Containerghcr.io/heathcliff26/p3
Docker Hubdocker.io/heathcliff26/p3
Quay.ioquay.io/heathcliff26/p3
Tags

There are different flavors of the image:

Tag(s)Description
latestLast released version of the image
rollingRolling update of the image, always build from main branch.
vX.Y.ZReleased version of the image

Tag summary

Content type

Image

Digest

sha256:f04afcf59

Size

10.3 MB

Last updated

5 days ago

docker pull heathcliff26/p3