diff --git a/charts/latest/blob-csi-driver-v0.0.0.tgz b/charts/latest/blob-csi-driver-v0.0.0.tgz index 0fb634b79..7a5f777af 100644 Binary files a/charts/latest/blob-csi-driver-v0.0.0.tgz and b/charts/latest/blob-csi-driver-v0.0.0.tgz differ diff --git a/charts/latest/blob-csi-driver/templates/csi-blob-node.yaml b/charts/latest/blob-csi-driver/templates/csi-blob-node.yaml index 2cb7d47d0..169da2522 100644 --- a/charts/latest/blob-csi-driver/templates/csi-blob-node.yaml +++ b/charts/latest/blob-csi-driver/templates/csi-blob-node.yaml @@ -106,6 +106,8 @@ spec: value: "{{ .Values.node.blobfuseProxy.migrateK8sRepo }}" - name: SET_READ_AHEAD_SIZE value: "{{ .Values.node.blobfuseProxy.setReadAheadSize }}" + - name: ALLOW_PACKAGE_INSTALL_DOWNGRADE + value: "{{ .Values.node.blobfuseProxy.allowPackageInstallDowngrade }}" volumeMounts: - name: host-usr mountPath: /host/usr diff --git a/charts/latest/blob-csi-driver/values.yaml b/charts/latest/blob-csi-driver/values.yaml index e85e69ba6..1ab2d306b 100644 --- a/charts/latest/blob-csi-driver/values.yaml +++ b/charts/latest/blob-csi-driver/values.yaml @@ -129,6 +129,7 @@ node: disableUpdateDB: true migrateK8sRepo: false setReadAheadSize: true + allowPackageInstallDowngrade: true blobfuseCachePath: /mnt appendTimeStampInCacheDir: false mountPermissions: 0777 diff --git a/deploy/csi-blob-node.yaml b/deploy/csi-blob-node.yaml index 8ebf3c885..bdcd56c7f 100644 --- a/deploy/csi-blob-node.yaml +++ b/deploy/csi-blob-node.yaml @@ -68,6 +68,8 @@ spec: value: "9000000" - name: DISABLE_UPDATEDB value: "true" + - name: ALLOW_PACKAGE_INSTALL_DOWNGRADE + value: "true" volumeMounts: - name: host-usr mountPath: /host/usr diff --git a/pkg/blobfuse-proxy/init.sh b/pkg/blobfuse-proxy/init.sh index 003d3b7e9..7beaa13dc 100755 --- a/pkg/blobfuse-proxy/init.sh +++ b/pkg/blobfuse-proxy/init.sh @@ -23,6 +23,8 @@ SET_READ_AHEAD_SIZE=${SET_READ_AHEAD_SIZE:-true} MIGRATE_K8S_REPO=${MIGRATE_K8S_REPO:-false} READ_AHEAD_KB=${READ_AHEAD_KB:-15380} KUBELET_PATH=${KUBELET_PATH:-/var/lib/kubelet} +ALLOW_PACKAGE_INSTALL_DOWNGRADE=${ALLOW_PACKAGE_INSTALL_DOWNGRADE:-true} + if [ "$KUBELET_PATH" != "/var/lib/kubelet" ];then echo "kubelet path is $KUBELET_PATH, update blobfuse-proxy.service...." sed -i "s#--blobfuse-proxy-endpoint[^ ]*#--blobfuse-proxy-endpoint=unix:/${KUBELET_PATH}/plugins/blob.csi.azure.com/blobfuse-proxy.sock#" /blobfuse-proxy/blobfuse-proxy.service diff --git a/pkg/blobfuse-proxy/install-proxy.sh b/pkg/blobfuse-proxy/install-proxy.sh index c4a4df741..6083c93fa 100644 --- a/pkg/blobfuse-proxy/install-proxy.sh +++ b/pkg/blobfuse-proxy/install-proxy.sh @@ -77,6 +77,11 @@ then fi fi + if [ "${ALLOW_PACKAGE_INSTALL_DOWNGRADE}" = "true" ]; then + echo "allow package install downgrade" + pkg_list="${pkg_list} --allow-downgrades" + fi + echo "begin to install ${pkg_list}" $HOST_CMD apt-get install -y $pkg_list || true $HOST_CMD rm -f /etc/packages-microsoft-prod.deb