Skip to content

Commit

Permalink
fix(path): handle trailing slash (/) in kubelet directory
Browse files Browse the repository at this point in the history
Signed-off-by: w3aman <[email protected]>
  • Loading branch information
w3aman committed May 2, 2024
1 parent 698536f commit 1495898
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions deploy/helm/charts/templates/zfs-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: {{ if hasSuffix .Values.zfsNode.kubeletDir "/" }}{{ .Values.zfsNode.kubeletDir }}{{ else }}{{ .Values.zfsNode.kubeletDir }}/{{ end }}plugins/zfs-localpv/csi.sock
- name: KUBE_NODE_NAME
valueFrom:
fieldRef:
Expand Down Expand Up @@ -107,7 +107,7 @@ spec:
mountPropagation: "HostToContainer"
readOnly: true
- name: pods-mount-dir
mountPath: {{ .Values.zfsNode.kubeletDir }}
mountPath: {{ if hasSuffix .Values.zfsNode.kubeletDir "/" }}{{ .Values.zfsNode.kubeletDir }}{{ else }}{{ .Values.zfsNode.kubeletDir }}/{{ end }}
# needed so that any mounts setup inside this container are
# propagated back to the host machine.
mountPropagation: "Bidirectional"
Expand All @@ -130,15 +130,15 @@ spec:
type: Directory
- name: registration-dir
hostPath:
path: {{ .Values.zfsNode.kubeletDir }}plugins_registry/
path: {{ if hasSuffix .Values.zfsNode.kubeletDir "/" }}{{ .Values.zfsNode.kubeletDir }}{{ else }}{{ .Values.zfsNode.kubeletDir }}/{{ end }}plugins_registry/
type: DirectoryOrCreate
- name: plugin-dir
hostPath:
path: {{ .Values.zfsNode.kubeletDir }}plugins/zfs-localpv/
path: {{ if hasSuffix .Values.zfsNode.kubeletDir "/" }}{{ .Values.zfsNode.kubeletDir }}{{ else }}{{ .Values.zfsNode.kubeletDir }}/{{ end }}plugins/zfs-localpv/
type: DirectoryOrCreate
- name: pods-mount-dir
hostPath:
path: {{ .Values.zfsNode.kubeletDir }}
path: {{ if hasSuffix .Values.zfsNode.kubeletDir "/" }}{{ .Values.zfsNode.kubeletDir }}{{ else }}{{ .Values.zfsNode.kubeletDir }}/{{ end }}
type: Directory
{{- if .Values.zfsNode.additionalVolumes }}
{{- range $name, $config := .Values.zfsNode.additionalVolumes }}
Expand Down

0 comments on commit 1495898

Please sign in to comment.