Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(localpv): ensure kubeletDir trailing slash #297

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions deploy/helm/charts/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -136,3 +136,10 @@ Create the name of the priority class for csi controller plugin
{{- printf "%s" .Values.lvmController.priorityClass.name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}

{{/*
Ensure that the path to kubelet ends with a slash
*/}}
{{- define "lvmlocalpv.lvmNode.kubeletDir" -}}
{{- printf "%s/" (.Values.lvmNode.kubeletDir | trimSuffix "/") -}}
{{- end }}
10 changes: 5 additions & 5 deletions deploy/helm/charts/templates/lvm-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ spec:
- name: ADDRESS
value: /plugin/csi.sock
- name: DRIVER_REG_SOCK_PATH
value: {{ .Values.lvmNode.kubeletDir }}plugins/lvm-localpv/csi.sock
value: {{ printf "%s%s" (include "lvmlocalpv.lvmNode.kubeletDir" .) "plugins/lvm-localpv/csi.sock" | quote }}
- name: KUBE_NODE_NAME
valueFrom:
fieldRef:
Expand Down Expand Up @@ -117,7 +117,7 @@ spec:
- name: device-dir
mountPath: /dev
- name: pods-mount-dir
mountPath: {{ .Values.lvmNode.kubeletDir }}
mountPath: {{ include "lvmlocalpv.lvmNode.kubeletDir" . | quote }}
# 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.lvmNode.kubeletDir }}plugins_registry/
path: {{ printf "%s%s" (include "lvmlocalpv.lvmNode.kubeletDir" .) "plugins_registry/" | quote }}
type: DirectoryOrCreate
- name: plugin-dir
hostPath:
path: {{ .Values.lvmNode.kubeletDir }}plugins/lvm-localpv/
path: {{ printf "%s%s" (include "lvmlocalpv.lvmNode.kubeletDir" .) "plugins/lvm-localpv/" | quote }}
type: DirectoryOrCreate
- name: pods-mount-dir
hostPath:
path: {{ .Values.lvmNode.kubeletDir }}
path: {{ include "lvmlocalpv.lvmNode.kubeletDir" . | quote }}
type: Directory
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
Expand Down
Loading