zfs-localpv/deploy/helm/charts/templates/configmap.yaml
Travis Athougies 95428184cc
feat(helm): Allow specifying path to zfs binary (#383)
* Allow specifying path to zfs binary

Some linux/UNIX distributions, do not follow standard path conventions. The driver currently assumes the zfs binary is in /sbin or /usr/sbin, but on NixOS, for example, it's in /run/current-system/sw/bin.

This adds an option to specify the directory manually.

* Bump chart version


Signed-off-by: Travis Athougies <travis@athougies.net>
2021-09-15 18:23:50 +05:30

17 lines
476 B
YAML

kind: ConfigMap
apiVersion: v1
metadata:
name: openebs-zfspv-bin
namespace: {{ .Release.Namespace }} # should be the same namespace where it is getting mounted
labels:
{{- include "zfslocalpv.zfsNode.labels" . | nindent 4 }}
data:
zfs: |
#!/bin/sh
if [ -x /host/sbin/zfs ]; then
chroot /host /sbin/zfs "$@"
elif [ -x /host/usr/sbin/zfs ]; then
chroot /host /usr/sbin/zfs "$@"
else
chroot /host "{{ .Values.zfs.bin }}" "$@"
fi