hostpath-provisioner
by rimusz
hostpath-provisioner is an automatic provisioner creating Persistent Volumes from the hostpath.
About this chart
Hostpath Provisioner
This chart bootstraps a hostpath-provisioner deployment on a Kubernetes, which dynamically provisions Kubernetes HostPath Volumes, it is particularly handy to use on single-node Kubernetes cluster as kind.
Installing the Chart
To install the chart with the release name hostpath-provisioner:
$ helm upgrade --install hostpath-provisioner -n hostpath-provisioner rimusz/hostpath-provisioner
Note: On kind please delete the default storage class:
kubectl delete storageclass standard
The command deploys hostpath-provisioner on the Kubernetes cluster in the default configuration. The configuration section lists the parameters that can be configured during installation.
Deploying your own PersistentVolumeClaim
To deploy your own PVC, make sure that you have the correct storage-class as indicated by your values.yaml file.
For example:
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: test-dynamic-volume-claim
spec:
storageClassName: hostpath
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100Mi
Uninstalling the Chart
To uninstall/delete the hostpath-provisioner deployment:
$ helm delete hostpath-provisioner
The command removes all the Kubernetes components associated with the chart and deletes the release.
Configuration
The following table lists the configurable parameters of the hostpath-provisioner chart and their default values.
| Parameter | Description | Default |
|---|---|---|
strategyType | Pod recreation type | Recreate |
image.repository | The image repository to pull from | quay.io/rimusz/hostpath-provisioner |
image.tag | The image tag to use | `` |
image.pullPolicy | Image pull policy | IfNotPresent |
storageClass.create | Enable creation of a StorageClass to consume this hostpath-provisioner instance | true |
storageClass.defaultClass | Enable as default storage class | true |
storageClass.name | The name to assign the created StorageClass | hostpath |
provisionerName | The name to assign the created Provisioner | hostpath |
nodeHostPath | Set the local HostPath to be used on the node | /mnt/hostpath |
reclaimPolicy | Set the reclaimPolicy | Delete |
rbac.create | Enable RABC | true |
rbac.serviceAccountName | Service account name | default |
resources | Resource limits for hostpath-provisioner pod | {} |
nodeSelector | Node Selector | {} |
tolerations | Tolerations for pod assignment | [] |
affinity | Affinity for pod assignment | {} |
$ helm upgrade -install hostpath-provisioner -n hostpath-provisioner rimusz/hostpath-provisioner \
--set resources.limits.cpu=200m
Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example,
$ helm upgrade -install hostpath-provisioner -n hostpath-provisioner rimusz/hostpath-provisioner -f values.yaml
Tip: You can use the default values.yaml as an example
Deploy hostpath-provisioner with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has hostpath-provisioner on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the charthostpath-provisioner is pinned at v0.2.13 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply