diff --git a/deploy/helm/charts/README.md b/deploy/helm/charts/README.md index 6775cfc24..51ed8ae06 100644 --- a/deploy/helm/charts/README.md +++ b/deploy/helm/charts/README.md @@ -69,7 +69,7 @@ The following table lists the configurable parameters of the OpenEBS ZFS Localpv | `zfsPlugin.image.registry`| Registry for openebs-zfs-plugin image| `""`| | `zfsPlugin.image.repository`| Image repository for openebs-zfs-plugin| `openebs/zfs-driver`| | `zfsPlugin.image.pullPolicy`| Image pull policy for openebs-zfs-plugin| `IfNotPresent`| -| `zfsPlugin.image.tag`| Image tag for openebs-zfs-plugin| `2.6.1-prerelease`| +| `zfsPlugin.image.tag`| Image tag for openebs-zfs-plugin| `2.6.2`| | `zfsNode.allowedTopologyKeys`| Custom topology keys required for provisioning| `"kubernetes.io/hostname,"`| | `zfsNode.driverRegistrar.image.registry`| Registry for csi-node-driver-registrar image| `registry.k8s.io/`| | `zfsNode.driverRegistrar.image.repository`| Image repository for csi-node-driver-registrar| `sig-storage/csi-node-driver-registrar`| diff --git a/deploy/helm/charts/charts/crds/templates/_helpers.tpl b/deploy/helm/charts/charts/crds/templates/_helpers.tpl index 68045e1c0..6b2cbf14c 100644 --- a/deploy/helm/charts/charts/crds/templates/_helpers.tpl +++ b/deploy/helm/charts/charts/crds/templates/_helpers.tpl @@ -16,4 +16,4 @@ helm.sh/resource-policy: keep {{- with .annotations }} {{- toYaml . }} {{- end }} -{{- end -}} \ No newline at end of file +{{- end -}} diff --git a/deploy/helm/charts/templates/_helpers.tpl b/deploy/helm/charts/templates/_helpers.tpl index 576ef3169..c24401a9c 100644 --- a/deploy/helm/charts/templates/_helpers.tpl +++ b/deploy/helm/charts/templates/_helpers.tpl @@ -151,4 +151,11 @@ Enable zfsController containers leader election if replicas > 1 - "--leader-election" {{- end }} {{- end }} -{{- end }} \ No newline at end of file +{{- end }} + +{{/* +Ensure that the path to kubelet ends with a slash +*/}} +{{- define "zfslocalpv.zfsNode.kubeletDir" -}} +{{- printf "%s/" (.Values.zfsNode.kubeletDir | trimSuffix "/") -}} +{{- end }} diff --git a/deploy/helm/charts/templates/zfs-controller.yaml b/deploy/helm/charts/templates/zfs-controller.yaml index 60e8a53c3..b4482edac 100644 --- a/deploy/helm/charts/templates/zfs-controller.yaml +++ b/deploy/helm/charts/templates/zfs-controller.yaml @@ -24,16 +24,6 @@ spec: {{ toYaml . | nindent 8 }} {{- end}} spec: - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchExpressions: - - key: app - operator: In - values: - - openebs-zfs-controller - topologyKey: "kubernetes.io/hostname" {{- if .Values.zfsController.priorityClass.create }} priorityClassName: {{ template "zfslocalpv.zfsController.priorityClassName" . }} {{- end }} diff --git a/deploy/helm/charts/templates/zfs-node.yaml b/deploy/helm/charts/templates/zfs-node.yaml index 74859dd7a..9755d7adb 100644 --- a/deploy/helm/charts/templates/zfs-node.yaml +++ b/deploy/helm/charts/templates/zfs-node.yaml @@ -55,7 +55,7 @@ spec: - name: ADDRESS value: /plugin/csi.sock - name: DRIVER_REG_SOCK_PATH - value: {{ .Values.zfsNode.kubeletDir }}plugins/zfs-localpv/csi.sock + value: {{ printf "%s%s" (include "zfslocalpv.zfsNode.kubeletDir" .) "plugins/zfs-localpv/csi.sock" | quote }} - name: KUBE_NODE_NAME valueFrom: fieldRef: @@ -107,7 +107,7 @@ spec: mountPropagation: "HostToContainer" readOnly: true - name: pods-mount-dir - mountPath: {{ .Values.zfsNode.kubeletDir }} + mountPath: {{ include "zfslocalpv.zfsNode.kubeletDir" . | quote }} # needed so that any mounts setup inside this container are # propagated back to the host machine. mountPropagation: "Bidirectional" @@ -130,15 +130,15 @@ spec: type: Directory - name: registration-dir hostPath: - path: {{ .Values.zfsNode.kubeletDir }}plugins_registry/ + path: {{ printf "%s%s" (include "zfslocalpv.zfsNode.kubeletDir" .) "plugins_registry/" | quote }} type: DirectoryOrCreate - name: plugin-dir hostPath: - path: {{ .Values.zfsNode.kubeletDir }}plugins/zfs-localpv/ + path: {{ printf "%s%s" (include "zfslocalpv.zfsNode.kubeletDir" .) "plugins/zfs-localpv/" | quote }} type: DirectoryOrCreate - name: pods-mount-dir hostPath: - path: {{ .Values.zfsNode.kubeletDir }} + path: {{ include "zfslocalpv.zfsNode.kubeletDir" . | quote }} type: Directory {{- if .Values.zfsNode.additionalVolumes }} {{- range $name, $config := .Values.zfsNode.additionalVolumes }}