/polyaxon-nfs-provisioner

Polyaxon in-cluster NFS provisioner to simplify the creation of ReadWriteMany and ReadOnlyMany volumes.

Primary LanguageSmartyMIT LicenseMIT

polyaxon-nfs-provisioner

Polyaxon in-cluster NFS provisioner to simplify the creation of ReadWriteMany and ReadOnlyMany volumes.

Description

This repo aims to provide a stable Helm chart, maintained and supported by Polyaxon, to easily deploy and spin NFS-volumes to use with Polyaxon.

The chart provides the possibility to easily create 5 volumes: data, outputs, repos, logs, and upload.

By default the volumes are disabled, and the chart can be used to create as many volumes.

Warning: While installing in the default configuration will work, any data stored on the dynamic volumes provisioned by this chart will not be persistent!

Install

Setup Helm

To install the nfs-provisioner, make sure you have helm installed, please see this guide.

Namespace

If you are using this chart with Polyaxon, please install the chart on the same namespace where you installed Polyaxon.

$ kubectl create namespace polyaxon

namespace "polyaxon" created

Polyaxon's charts repo

You can add the Polyaxon helm repository to your helm, so you can install Polyaxon and other charts provided by Polyaxon from it. This makes it easy to refer to the chart without having to use a long URL each time.

$ helm repo add polyaxon https://charts.polyaxon.com
$ helm repo update

Install the nfs provisioner

helm install polyaxon/nfs-provisioner --name=plxnfs --namespace=polyaxon

Configuration

The helm chart provides a simple interface for creating volumes. By default these volumes are disabled, to enable them:

logs:
  enabled: true

repos:
  enabled: true

upload:
  enabled: true

data:
  enabled: true

outputs:
  enabled: true

You can also enable only one or some of the volumes.

N.B.1 Each volume has a default name prefixed by polyaxon-pvc, you can change that easily.

N.B.2 The chart will create a provisioner with a storageClass named: polyaxon-nfs.

Customize the nfs provisioner

To customize the nfs provisioner take a look at the available configuration options. E.g.:

nfs-server-provisioner:
  persistence:
    enabled: true
    storageClass: standard
    size: 100Gi
  storageClass:
    reclaimPolicy: Retain

Creating other volumes than those provided in values

You can create as many volumes as you once the provisioner is deployed on your cluster, you just need to provide a PVC name, storage size, and an access Mode:

kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: polyaxon-pvc-foo
spec:
  accessModes:
    - ReadOnlyMany
  resources:
    requests:
      storage: 100Gi
  storageClassName: "polyaxon-nfs" 

Reference

Polyaxon provides options to enable a built-in nfs provisioner to create some of the persistence storage needed or all of them. In order to use this provisioner.

logs:

logs:
  size: 10Gi
  enabled: true
Parameter Description Default
logs.name Name of the PVC to create polyaxon-pvc-logs
logs.size Size of data volume 5Gi
logs.accessMode Use volume as ReadOnly or ReadWrite ReadWriteOnce ReadWriteMany

repos:

repos:
  size: 50Gi
  enabled: true
Parameter Description Default
repos.name Name of the PVC to create polyaxon-pvc-repos
repos.size Size of data volume 10Gi
repos.accessMode Use volume as ReadOnly or ReadWrite ReadWriteOnce ReadWriteMany

upload:

upload:
  size: 50Gi
  enabled: true
Parameter Description Default
upload.name Name of the PVC to create polyaxon-pvc-upload
upload.size Size of data volume 50Gi
upload.accessMode Use volume as ReadOnly or ReadWrite ReadWriteOnce ReadWriteMany

data:

data:
  size: 50Gi
  enabled: true
Parameter Description Default
data.name Name of the PVC to create polyaxon-pvc-data
data.size Size of data volume 10Gi
data.accessMode Use volume as ReadOnly or ReadWrite ReadWriteOnce ReadWriteMany

outputs:

outputs:
  size: 50Gi
  enabled: true
Parameter Description Default
outputs.name Name of the PVC to create polyaxon-pvc-outputs
outputs.size Size of data volume 10Gi
outputs.accessMode Use volume as ReadOnly or ReadWrite ReadWriteOnce ReadWriteMany