Skip to content

Commit 77de225

Browse files
authored
fix: volumemount mountpath comparision (#87)
fixes the volumemount mountpath comparision: if a volumemount with mountpath `/runner/` is specified in the pod template, creation of the default volumemount with mountpath `/runner` won´t be skipped
1 parent ff49777 commit 77de225

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/spec/spec.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ func CreateRunnerVolumeMount(pod *corev1.Pod, runnerContainerName string) error
223223
for _, volMounts := range container.VolumeMounts {
224224
// Volumemount paths e.g. /runner and /runner/ are threated equal
225225
// The last one in the pod spec will take precedence, which can lead to unexpected behavior
226-
if volMounts.MountPath == filepath.Clean(runnerVolumeMountPath) {
226+
if filepath.Clean(volMounts.MountPath) == runnerVolumeMountPath {
227227
return nil
228228
}
229229
}

0 commit comments

Comments
 (0)