Skip to content

v2.4.0

Compare
Choose a tag to compare
@akhilerm akhilerm released this 13 Dec 18:11
0e57532
feat(hostpath): allow custom node affinity label (#15)

Ref: https://github.com/openebs/openebs/issues/2875

provide a feature for administrators to configure a
custom node affinity label in place of hostnames.

This will help in scenarios, where hostnames can change
when node are removed and added back to the cluster with
the underlying disks intact.

cluster admin can setup custom labels to the nodes and
provide this information to Local PV hostpath provisioner
to use via StorageClass config key called `NodeAffinityLabel`

```
+ //Example: Local PV device StorageClass for using a custom
+ //node label as: openebs.io/node-affinity-value
+ //will be as follows
+ //
+ // kind: StorageClass
+ // metadata:
+ //   name: openebs-hostpath
+ //   annotations:
+ //     openebs.io/cas-type: local
+ //     cas.openebs.io/config: |
+ //       - name: StorageType
+ //         value: "device"
+ //       - name: NodeAffinityLabel
+ //         value: "openebs.io/node-affinity-value"
+ // provisioner: openebs.io/local
+ // volumeBindingMode: WaitForFirstConsumer
+ // reclaimPolicy: Delete
+ //
```


Signed-off-by: kmova <[email protected]>