Skip to content

Commit e0180e6

Browse files
cherry-pick #552 (#591)
* docs(README): update the version in chart README Signed-off-by: Abhinandan Purkait <purkaitabhinandan@gmail.com> * feat(helm): remove anti-affinity from the zfs controller Signed-off-by: Abhinandan Purkait <purkaitabhinandan@gmail.com> * using custom template function Signed-off-by: w3aman <aman.gupta@mayadata.io> * chore: prepare charts for release 2.6.0 Signed-off-by: Abhinandan Purkait <purkaitabhinandan@gmail.com> * fix(path): handle trailing slash (/) in kubelet directory Signed-off-by: w3aman <aman.gupta@mayadata.io> * using custom template function Signed-off-by: w3aman <aman.gupta@mayadata.io> --------- Signed-off-by: Abhinandan Purkait <purkaitabhinandan@gmail.com> Signed-off-by: w3aman <aman.gupta@mayadata.io> Co-authored-by: w3aman <aman.gupta@mayadata.io>
1 parent f60052c commit e0180e6

File tree

5 files changed

+15
-18
lines changed

5 files changed

+15
-18
lines changed

deploy/helm/charts/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ The following table lists the configurable parameters of the OpenEBS ZFS Localpv
6969
| `zfsPlugin.image.registry`| Registry for openebs-zfs-plugin image| `""`|
7070
| `zfsPlugin.image.repository`| Image repository for openebs-zfs-plugin| `openebs/zfs-driver`|
7171
| `zfsPlugin.image.pullPolicy`| Image pull policy for openebs-zfs-plugin| `IfNotPresent`|
72-
| `zfsPlugin.image.tag`| Image tag for openebs-zfs-plugin| `2.6.1-prerelease`|
72+
| `zfsPlugin.image.tag`| Image tag for openebs-zfs-plugin| `2.6.2`|
7373
| `zfsNode.allowedTopologyKeys`| Custom topology keys required for provisioning| `"kubernetes.io/hostname,"`|
7474
| `zfsNode.driverRegistrar.image.registry`| Registry for csi-node-driver-registrar image| `registry.k8s.io/`|
7575
| `zfsNode.driverRegistrar.image.repository`| Image repository for csi-node-driver-registrar| `sig-storage/csi-node-driver-registrar`|

deploy/helm/charts/charts/crds/templates/_helpers.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ helm.sh/resource-policy: keep
1616
{{- with .annotations }}
1717
{{- toYaml . }}
1818
{{- end }}
19-
{{- end -}}
19+
{{- end -}}

deploy/helm/charts/templates/_helpers.tpl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,4 +151,11 @@ Enable zfsController containers leader election if replicas > 1
151151
- "--leader-election"
152152
{{- end }}
153153
{{- end }}
154-
{{- end }}
154+
{{- end }}
155+
156+
{{/*
157+
Ensure that the path to kubelet ends with a slash
158+
*/}}
159+
{{- define "zfslocalpv.zfsNode.kubeletDir" -}}
160+
{{- printf "%s/" (.Values.zfsNode.kubeletDir | trimSuffix "/") -}}
161+
{{- end }}

deploy/helm/charts/templates/zfs-controller.yaml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,6 @@ spec:
2424
{{ toYaml . | nindent 8 }}
2525
{{- end}}
2626
spec:
27-
affinity:
28-
podAntiAffinity:
29-
requiredDuringSchedulingIgnoredDuringExecution:
30-
- labelSelector:
31-
matchExpressions:
32-
- key: app
33-
operator: In
34-
values:
35-
- openebs-zfs-controller
36-
topologyKey: "kubernetes.io/hostname"
3727
{{- if .Values.zfsController.priorityClass.create }}
3828
priorityClassName: {{ template "zfslocalpv.zfsController.priorityClassName" . }}
3929
{{- end }}

deploy/helm/charts/templates/zfs-node.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ spec:
5555
- name: ADDRESS
5656
value: /plugin/csi.sock
5757
- name: DRIVER_REG_SOCK_PATH
58-
value: {{ .Values.zfsNode.kubeletDir }}plugins/zfs-localpv/csi.sock
58+
value: {{ printf "%s%s" (include "zfslocalpv.zfsNode.kubeletDir" .) "plugins/zfs-localpv/csi.sock" | quote }}
5959
- name: KUBE_NODE_NAME
6060
valueFrom:
6161
fieldRef:
@@ -107,7 +107,7 @@ spec:
107107
mountPropagation: "HostToContainer"
108108
readOnly: true
109109
- name: pods-mount-dir
110-
mountPath: {{ .Values.zfsNode.kubeletDir }}
110+
mountPath: {{ include "zfslocalpv.zfsNode.kubeletDir" . | quote }}
111111
# needed so that any mounts setup inside this container are
112112
# propagated back to the host machine.
113113
mountPropagation: "Bidirectional"
@@ -130,15 +130,15 @@ spec:
130130
type: Directory
131131
- name: registration-dir
132132
hostPath:
133-
path: {{ .Values.zfsNode.kubeletDir }}plugins_registry/
133+
path: {{ printf "%s%s" (include "zfslocalpv.zfsNode.kubeletDir" .) "plugins_registry/" | quote }}
134134
type: DirectoryOrCreate
135135
- name: plugin-dir
136136
hostPath:
137-
path: {{ .Values.zfsNode.kubeletDir }}plugins/zfs-localpv/
137+
path: {{ printf "%s%s" (include "zfslocalpv.zfsNode.kubeletDir" .) "plugins/zfs-localpv/" | quote }}
138138
type: DirectoryOrCreate
139139
- name: pods-mount-dir
140140
hostPath:
141-
path: {{ .Values.zfsNode.kubeletDir }}
141+
path: {{ include "zfslocalpv.zfsNode.kubeletDir" . | quote }}
142142
type: Directory
143143
{{- if .Values.zfsNode.additionalVolumes }}
144144
{{- range $name, $config := .Values.zfsNode.additionalVolumes }}

0 commit comments

Comments
 (0)