Skip to content

Commit 15ae850

Browse files
authored
Merge pull request #2174 from andyzhangx/bin-path-mount
[release-1.26] fix(proxy_installer): add necessary mounts for cos, gardenlinux bin paths
2 parents eb14c1a + 9ab16eb commit 15ae850

File tree

4 files changed

+47
-8
lines changed

4 files changed

+47
-8
lines changed
215 Bytes
Binary file not shown.

charts/latest/blob-csi-driver/templates/csi-blob-node.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,23 @@ spec:
109109
- name: ALLOW_PACKAGE_INSTALL_DOWNGRADE
110110
value: "{{ .Values.node.blobfuseProxy.allowPackageInstallDowngrade }}"
111111
volumeMounts:
112+
{{- if eq .Values.linux.distro "cos" }}
113+
- name: host-home-kubernetes-bin
114+
mountPath: /host/home/kubernetes/bin
115+
{{- end }}
116+
{{- if eq .Values.linux.distro "gardenlinux" }}
117+
- name: host-var-bin
118+
mountPath: /host/var/bin
119+
{{- end }}
112120
- name: host-usr
113121
mountPath: /host/usr
114122
- name: host-usr-local
115123
mountPath: /host/usr/local
116124
- name: host-etc
117125
mountPath: /host/etc
126+
{{- if .Values.node.additionalVolumeMounts }}
127+
{{- toYaml .Values.node.additionalVolumeMounts | nindent 12 }}
128+
{{- end }}
118129
containers:
119130
- name: liveness-probe
120131
imagePullPolicy: {{ .Values.image.livenessProbe.pullPolicy }}
@@ -286,6 +297,16 @@ spec:
286297
name: mountpoint-dir
287298
{{- end }}
288299
volumes:
300+
{{- if eq .Values.linux.distro "cos" }}
301+
- name: host-home-kubernetes-bin
302+
hostPath:
303+
path: /home/kubernetes/bin
304+
{{- end }}
305+
{{- if eq .Values.linux.distro "gardenlinux" }}
306+
- name: host-var-bin
307+
hostPath:
308+
path: /var/bin
309+
{{- end }}
289310
- name: host-usr
290311
hostPath:
291312
path: /usr
@@ -334,6 +355,9 @@ spec:
334355
path: /lib/modules
335356
type: DirectoryOrCreate
336357
{{- end }}
358+
{{- if .Values.node.additionalVolumes }}
359+
{{- toYaml .Values.node.additionalVolumes | nindent 8 }}
360+
{{- end }}
337361
{{- if .Values.securityContext }}
338362
securityContext: {{- toYaml .Values.securityContext | nindent 8 }}
339363
{{- end }}

charts/latest/blob-csi-driver/values.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,21 @@ node:
163163
tolerations:
164164
- operator: "Exists"
165165
enableAznfsMount: true
166+
# Additional volumes to be added to the DaemonSet
167+
additionalVolumes: []
168+
# - name: custom-config
169+
# configMap:
170+
# name: my-config
171+
# - name: custom-secret
172+
# secret:
173+
# secretName: my-secret
174+
# Additional volume mounts to be added to the init container
175+
additionalVolumeMounts: []
176+
# - name: custom-config
177+
# mountPath: /etc/custom-config
178+
# - name: custom-secret
179+
# mountPath: /etc/custom-secret
180+
# readOnly: true
166181

167182
feature:
168183
fsGroupPolicy: ReadWriteOnceWithFSType

pkg/blobfuse-proxy/install-proxy-rhcos.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ fi
3434
updateBlobfuse2="true"
3535
if [ "${INSTALL_BLOBFUSE}" = "true" ] || [ "${INSTALL_BLOBFUSE2}" = "true" ]
3636
then
37-
if [ -f "/host/${BIN_PATH}/blobfuse2" ];then
38-
old=$(sha256sum /host/${BIN_PATH}/blobfuse2 | awk '{print $1}')
37+
if [ -f "/host${BIN_PATH}/blobfuse2" ];then
38+
old=$(sha256sum /host${BIN_PATH}/blobfuse2 | awk '{print $1}')
3939
new=$(sha256sum /usr/bin/blobfuse2 | awk '{print $1}')
4040
if [ "$old" = "$new" ];then
4141
updateBlobfuse2="false"
@@ -48,15 +48,15 @@ else
4848
fi
4949
if [ "$updateBlobfuse2" = "true" ];then
5050
echo "copy blobfuse2...."
51-
cp /usr/bin/blobfuse2 /host/${BIN_PATH}/blobfuse2 --force
52-
chmod 755 /host/${BIN_PATH}/blobfuse2
51+
cp /usr/bin/blobfuse2 /host${BIN_PATH}/blobfuse2 --force
52+
chmod 755 /host${BIN_PATH}/blobfuse2
5353
fi
5454

5555
if [ "${INSTALL_BLOBFUSE_PROXY}" = "true" ];then
5656
# install blobfuse-proxy
5757
updateBlobfuseProxy="true"
58-
if [ -f "/host/${BIN_PATH}/blobfuse-proxy" ];then
59-
old=$(sha256sum /host/${BIN_PATH}/blobfuse-proxy | awk '{print $1}')
58+
if [ -f "/host${BIN_PATH}/blobfuse-proxy" ];then
59+
old=$(sha256sum /host${BIN_PATH}/blobfuse-proxy | awk '{print $1}')
6060
new=$(sha256sum /blobfuse-proxy/blobfuse-proxy | awk '{print $1}')
6161
if [ "$old" = "$new" ];then
6262
updateBlobfuseProxy="false"
@@ -66,8 +66,8 @@ if [ "${INSTALL_BLOBFUSE_PROXY}" = "true" ];then
6666
if [ "$updateBlobfuseProxy" = "true" ];then
6767
echo "copy blobfuse-proxy...."
6868
rm -rf /host/${KUBELET_PATH}/plugins/blob.csi.azure.com/blobfuse-proxy.sock
69-
cp /blobfuse-proxy/blobfuse-proxy /host/${BIN_PATH}/blobfuse-proxy --force
70-
chmod 755 /host/${BIN_PATH}/blobfuse-proxy
69+
cp /blobfuse-proxy/blobfuse-proxy /host${BIN_PATH}/blobfuse-proxy --force
70+
chmod 755 /host${BIN_PATH}/blobfuse-proxy
7171
fi
7272

7373
updateService="true"

0 commit comments

Comments
 (0)