From 25bea0c3608d65f0d741e4d05bd47643a0d08398 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Sarker Date: Tue, 18 Nov 2025 12:40:29 +0600 Subject: [PATCH 1/3] update condition Signed-off-by: Fazle Rabbi Sarker --- core/v1/kubernetes.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/v1/kubernetes.go b/core/v1/kubernetes.go index 1b7ed9e41..a5b3dd846 100644 --- a/core/v1/kubernetes.go +++ b/core/v1/kubernetes.go @@ -260,7 +260,7 @@ func GetVolumeMountByName(volumeMounts []core.VolumeMount, name string) *core.Vo func UpsertVolumeMount(mounts []core.VolumeMount, nv ...core.VolumeMount) []core.VolumeMount { upsert := func(m core.VolumeMount) { for i, vol := range mounts { - if vol.Name == m.Name { + if vol.Name == m.Name && (vol.SubPathExpr != "" && vol.SubPathExpr == m.SubPathExpr) { mounts[i] = m return } From b4287f25cfbbd8bd0ceedc8a77587936a4078dee Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Sarker Date: Tue, 9 Dec 2025 12:57:24 +0600 Subject: [PATCH 2/3] update Condition Signed-off-by: Fazle Rabbi Sarker --- core/v1/kubernetes.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/v1/kubernetes.go b/core/v1/kubernetes.go index a5b3dd846..40fe2c8e5 100644 --- a/core/v1/kubernetes.go +++ b/core/v1/kubernetes.go @@ -260,7 +260,7 @@ func GetVolumeMountByName(volumeMounts []core.VolumeMount, name string) *core.Vo func UpsertVolumeMount(mounts []core.VolumeMount, nv ...core.VolumeMount) []core.VolumeMount { upsert := func(m core.VolumeMount) { for i, vol := range mounts { - if vol.Name == m.Name && (vol.SubPathExpr != "" && vol.SubPathExpr == m.SubPathExpr) { + if vol.Name == m.Name && vol.MountPath == m.MountPath { mounts[i] = m return } From 2c84e7275eb7f538347d22b60082700cd12caacd Mon Sep 17 00:00:00 2001 From: Tamal Saha Date: Tue, 9 Dec 2025 21:09:45 +0600 Subject: [PATCH 3/3] fix Signed-off-by: Tamal Saha --- core/v1/kubernetes.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/v1/kubernetes.go b/core/v1/kubernetes.go index 40fe2c8e5..9a5c5ef10 100644 --- a/core/v1/kubernetes.go +++ b/core/v1/kubernetes.go @@ -260,7 +260,7 @@ func GetVolumeMountByName(volumeMounts []core.VolumeMount, name string) *core.Vo func UpsertVolumeMount(mounts []core.VolumeMount, nv ...core.VolumeMount) []core.VolumeMount { upsert := func(m core.VolumeMount) { for i, vol := range mounts { - if vol.Name == m.Name && vol.MountPath == m.MountPath { + if vol.MountPath == m.MountPath { mounts[i] = m return }