Skip to content

Commit b21ab69

Browse files
authored
Merge pull request #2176 from andyzhangx/fix-bin-path-mount-1.27
[release-1.27] fix(proxy_installer): add necessary mounts for cos,gardenlinux bin paths
2 parents 293e5f9 + e47ed58 commit b21ab69

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
@@ -107,12 +107,23 @@ spec:
107107
- name: ALLOW_PACKAGE_INSTALL_DOWNGRADE
108108
value: "{{ .Values.node.blobfuseProxy.allowPackageInstallDowngrade }}"
109109
volumeMounts:
110+
{{- if eq .Values.linux.distro "cos" }}
111+
- name: host-home-kubernetes-bin
112+
mountPath: /host/home/kubernetes/bin
113+
{{- end }}
114+
{{- if eq .Values.linux.distro "gardenlinux" }}
115+
- name: host-var-bin
116+
mountPath: /host/var/bin
117+
{{- end }}
110118
- name: host-usr
111119
mountPath: /host/usr
112120
- name: host-usr-local
113121
mountPath: /host/usr/local
114122
- name: host-etc
115123
mountPath: /host/etc
124+
{{- if .Values.node.additionalVolumeMounts }}
125+
{{- toYaml .Values.node.additionalVolumeMounts | nindent 12 }}
126+
{{- end }}
116127
containers:
117128
- name: liveness-probe
118129
imagePullPolicy: {{ .Values.image.livenessProbe.pullPolicy }}
@@ -284,6 +295,16 @@ spec:
284295
name: mountpoint-dir
285296
{{- end }}
286297
volumes:
298+
{{- if eq .Values.linux.distro "cos" }}
299+
- name: host-home-kubernetes-bin
300+
hostPath:
301+
path: /home/kubernetes/bin
302+
{{- end }}
303+
{{- if eq .Values.linux.distro "gardenlinux" }}
304+
- name: host-var-bin
305+
hostPath:
306+
path: /var/bin
307+
{{- end }}
287308
- name: host-usr
288309
hostPath:
289310
path: /usr
@@ -332,6 +353,9 @@ spec:
332353
path: /lib/modules
333354
type: DirectoryOrCreate
334355
{{- end }}
356+
{{- if .Values.node.additionalVolumes }}
357+
{{- toYaml .Values.node.additionalVolumes | nindent 8 }}
358+
{{- end }}
335359
{{- if .Values.securityContext }}
336360
securityContext: {{- toYaml .Values.securityContext | nindent 8 }}
337361
{{- end }}

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

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

166181
feature:
167182
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)