Skip to content

Commit

Permalink
Merge pull request #2175 from neogopher/backport/v0.19/pr-2169
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Kosiewski authored Sep 24, 2024
2 parents 3f6db98 + be10b86 commit 7eaf2ed
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/controllers/resources/pods/translate/hostpath.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ const (
func (t *translator) ensureMountPropagation(pPod *corev1.Pod) {
for i, container := range pPod.Spec.Containers {
for j, volumeMount := range container.VolumeMounts {
// handle scenarios where path ends with a /
volumeMount.MountPath = strings.TrimSuffix(volumeMount.MountPath, "/")

if volumeMount.MountPath == PodLoggingHostPath ||
volumeMount.MountPath == KubeletPodPath ||
volumeMount.MountPath == LogHostPath {
Expand Down

0 comments on commit 7eaf2ed

Please sign in to comment.