Skip to content

Commit

Permalink
chore(docs): Add quickstart guide and helm chart update (#46)
Browse files Browse the repository at this point in the history
- Added docs/quickstart.md
- Reworked helm chart README.md and NOTES.txt
- Added `enabled: true` helm chart parameter for hostpath and device StorageClasses.
- Added new 'only hostpath' use case in quickstart.

Signed-off-by: Niladri Halder <[email protected]>
  • Loading branch information
niladrih authored May 2, 2021
1 parent aa46f93 commit 9dcf2b6
Show file tree
Hide file tree
Showing 8 changed files with 303 additions and 29 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ differences include:

## Install

Please refer to our documentation at [OpenEBS Documentation](http://docs.openebs.io/).
Please refer to our [Quickstart](https://github.com/openebs/dynamic-localpv-provisioner/blob/develop/docs/quickstart.md) and the [OpenEBS Documentation](http://docs.openebs.io/).

## Contributing

Expand Down
2 changes: 1 addition & 1 deletion deploy/helm/charts/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Helm chart for OpenEBS Dynamic Local PV. For instructions to instal
type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 2.8.0
version: 2.8.1
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: 2.8.0
Expand Down
49 changes: 35 additions & 14 deletions deploy/helm/charts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Please visit the [link](https://openebs.github.io/dynamic-localpv-provisioner/)

```console
# Helm
$ helm install [RELEASE_NAME] openebs-localpv/localpv-provisioner
helm install [RELEASE_NAME] openebs-localpv/localpv-provisioner --namespace [NAMESPACE] --create-namespace
```

_See [configuration](#configuration) below._
Expand All @@ -48,6 +48,8 @@ By default this chart installs additional, dependent charts:
|------------|------|---------|
| https://openebs.github.io/node-disk-manager | openebs-ndm | 1.4.0 |

**Note:** Find detailed Node Disk Manager Helm chart configuration options [here](https://github.com/openebs/node-disk-manager/blob/master/deploy/helm/charts/README.md).


To disable the dependency during installation, set `openebsNDM.enabled` to `false`.

Expand All @@ -57,7 +59,7 @@ _See [helm dependency](https://helm.sh/docs/helm/helm_dependency/) for command d

```console
# Helm
$ helm uninstall [RELEASE_NAME]
helm uninstall [RELEASE_NAME] --namespace [NAMESPACE]
```

This removes all the Kubernetes components associated with the chart and deletes the release.
Expand All @@ -68,19 +70,45 @@ _See [helm uninstall](https://helm.sh/docs/helm/helm_uninstall/) for command doc

```console
# Helm
$ helm upgrade [RELEASE_NAME] [CHART] --install
helm upgrade [RELEASE_NAME] [CHART] --install --namespace [NAMESPACE]
```


## Configuration

The following table lists the configurable parameters of the OpenEBS LocalPV Provisioner chart and their default values.
The following table lists the configurable parameters of the OpenEBS Dynamic LocalPV Provisioner chart and their default values.

You can modify different parameters by specifying the desired value in the `helm install` command by using the `--set` and/or the `--set-string` flag(s). You can modify the parameters of the [Node Disk Manager chart](https://openebs.github.io/node-disk-manager) by adding `openebs-ndm` before the desired parameter in the `helm install` command.

In the following sample command we modify `deviceClass.fsType` from the localpv-provisioner chart and `ndm.nodeSelector` from the openebs-ndm chart to only schedule openebs-ndm DaemonSet pods on nodes labelled with `openebs.io/data-plane=true`. We also enable the 'Use OS-disk' feature gate using the `featureGates.UseOSDisk.enabled` parameter from the openebs-ndm chart.


```console
helm install openebs-localpv openebs-localpv/localpv-provisioner --namespace openebs --create-namespace \
--set-string deviceClass.fsType="xfs" \
--set-string openebs-ndm.ndm.nodeSelector."openebs\.io/data-plane"=true \
--set openebs-ndm.featureGates.UseOSDisk.enabled=true
```

| Parameter | Description | Default |
| ------------------------------------------- | --------------------------------------------- | ----------------------------------------- |
| `release.version` | LocalPV Provisioner release version | `2.8.0` |
| `analytics.enabled` | Enable sending stats to Google Analytics | `true` |
| `analytics.pingInterval` | Duration(hours) between sending ping stat | `24h` |
| `deviceClass.blockDeviceTag` | Value of `openebs.io/block-device-tag` BD label | `""` |
| `deviceClass.enabled` | Enables creation of default Device StorageClass | `true` |
| `deviceClass.fsType` | Filesystem type for openebs-device StorageClass | `"ext4"` |
| `deviceClass.isDefaultClass` | Make openebs-device the default StorageClass | `"false"` |
| `deviceClass.reclaimPolicy` | ReclaimPolicy for Device PVs | `"Delete"` |
| `helperPod.image.registry` | Registry for helper image | `""` |
| `helperPod.image.repository` | Image for helper pod | `"openebs/linux-utils"` |
| `helperPod.image.pullPolicy` | Pull policy for helper pod | `"IfNotPresent"` |
| `helperPod.image.tag` | Image tag for helper image | `2.8.0` |
| `hostpathClass.basePath` | BasePath for openebs-hostpath StorageClass | `"/var/openebs/local"` |
| `hostpathClass.enabled` | Enables creation of default Hostpath StorageClass | `true` |
| `hostpathClass.isDefaultClass` | Make openebs-hostpath the default StorageClass | `"false"` |
| `hostpathClass.nodeAffinityLabel` | Custom node label key to uniquely identify nodes. `kubernetes.io/hostname` is the default label key for node selection. | `""` |
| `hostpathClass.reclaimPolicy` | ReclaimPolicy for Hostpath PVs | `"Delete"` |
| `imagePullSecrets` | Provides image pull secrect | `""` |
| `localpv.enabled` | Enable LocalPV Provisioner | `true` |
| `localpv.image.registry` | Registry for LocalPV Provisioner image | `""` |
Expand All @@ -100,23 +128,16 @@ The following table lists the configurable parameters of the OpenEBS LocalPV Pro
| `localpv.healthCheck.periodSeconds` | How often to perform the liveness probe | `60` |
| `localpv.replicas` | No. of LocalPV Provisioner replica | `1` |
| `localpv.enableLeaderElection` | Enable leader election | `true` |
| `localpv.basePath` | BasePath for hostPath volumes on Nodes | `"/var/openebs/local"` |
| `localpv.affinity` | LocalPV Provisioner pod affinity | `{}` |
| `helperPod.image.registry` | Registry for helper image | `""` |
| `helperPod.image.repository` | Image for helper pod | `"openebs/linux-utils"` |
| `helperPod.image.pullPolicy` | Pull policy for helper pod | `"IfNotPresent"` |
| `helperPod.image.tag` | Image tag for helper image | `2.8.0` |
| `openebsNDM.enabled` | Install openebs NDM dependency | `true` |
| `rbac.create` | Enable RBAC Resources | `true` |
| `rbac.pspEnabled` | Create pod security policy resources | `false` |
| `openebsNDM.enabled` | Install openebs NDM dependency | `true` |


Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`.

Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,
A YAML file that specifies the values for the parameters can be provided while installing the chart. For example,

```bash
helm install <release-name> -f values.yaml --namespace openebs localpv-provisioner
helm install <release-name> -f values.yaml --namespace openebs openebs-localpv/localpv-provisioner
```

> **Tip**: You can use the default [values.yaml](values.yaml)
10 changes: 7 additions & 3 deletions deploy/helm/charts/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
The OpenEBS localPV Provisioner has been installed check its status by running:
The OpenEBS Dynamic LocalPV Provisioner has been installed.
Check its status by running:
$ kubectl get pods -n {{ .Release.Namespace }}

Use `kubectl get bd -n {{ .Release.Namespace }} ` to see the list of
Use `kubectl get bd -n {{ .Release.Namespace }}` to list the
blockdevices attached to the Kubernetes cluster nodes.

Get started with the Dynamic LocalPV Provisioner Quickstart guide at:
https://github.com/openebs/dynamic-localpv-provisioner/blob/develop/docs/quickstart.md

For more information, visit our Slack at https://openebs.io/community or view
the documentation online at http://docs.openebs.io/.
the OpenEBS documentation online at https://docs.openebs.io.
6 changes: 3 additions & 3 deletions deploy/helm/charts/templates/device-class.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
{{- if .Values.deviceClass.enabled }}
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: {{ .Values.deviceClass.name }}
annotations:
openebs.io/cas-type: local
cas.openebs.io/config: |
{{- if .Values.deviceClass.fsType }}
- name: StorageType
value: {{ .Values.deviceClass.storageType }}
{{- end }}
value: "device"
{{- if .Values.deviceClass.fsType }}
- name: FSType
value: {{ .Values.deviceClass.fsType }}
Expand All @@ -23,3 +22,4 @@ metadata:
provisioner: openebs.io/local
volumeBindingMode: WaitForFirstConsumer
reclaimPolicy: {{ .Values.deviceClass.reclaimPolicy }}
{{- end }}
6 changes: 3 additions & 3 deletions deploy/helm/charts/templates/hostpath-class.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
{{- if .Values.hostpathClass.enabled }}
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: {{ .Values.hostpathClass.name }}
annotations:
openebs.io/cas-type: local
cas.openebs.io/config: |
{{- if .Values.hostpathClass.storageType }}
- name: StorageType
value: {{ .Values.hostpathClass.storageType }}
{{- end }}
value: "hostpath"
{{- if .Values.hostpathClass.basePath }}
- name: BasePath
value: {{ .Values.hostpathClass.basePath }}
Expand All @@ -23,3 +22,4 @@ metadata:
provisioner: openebs.io/local
volumeBindingMode: WaitForFirstConsumer
reclaimPolicy: {{ .Values.hostpathClass.reclaimPolicy }}
{{- end }}
12 changes: 8 additions & 4 deletions deploy/helm/charts/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,14 @@ serviceAccount:
name:

deviceClass:
# Defines name of storage class.
# Name of default device StorageClass.
name: openebs-device
# If true, enables creation of the openebs-device StorageClass
enabled: true
# Available reclaim policies: Delete/Retain, defaults: Delete.
reclaimPolicy: Delete
# set as default class
# If true, sets the openebs-device StorageClass as the default StorageClass
isDefaultClass: false
storageType: "device"
fsType: "ext4"
# Label block devices in the cluster that you would like the openEBS localPV
# Provisioner to pick up those specific block devices available on the node.
Expand All @@ -90,11 +91,14 @@ deviceClass:
blockDeviceTag: ""

hostpathClass:
# Name of the default hostpath StorageClass
name: openebs-hostpath
# If true, enables creation of the openebs-hostpath StorageClass
enabled: true
# Available reclaim policies: Delete/Retain, defaults: Delete.
reclaimPolicy: Delete
# If true, sets the openebs-hostpath StorageClass as the default StorageClass
isDefaultClass: false
storageType: "hostpath"
# Path on the host where local volumes of this storage class are mounted under.
basePath: "/var/openebs/local"
# Custom node affinity label for example "openebs.io/node-affinity-value" that will be
Expand Down
Loading

0 comments on commit 9dcf2b6

Please sign in to comment.