Skip to content

Commit

Permalink
Short costum mount path logic
Browse files Browse the repository at this point in the history
  • Loading branch information
tomer-shefler committed Jul 9, 2023
1 parent cddca94 commit c0c0e7c
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions cbcontainers/state/components/sensor_daemon_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -495,12 +495,11 @@ func (obj *SensorDaemonSetK8sObject) mutateCndrVolumesMounts(container *coreV1.C
for name, hostPath := range cndrHostPaths {
index := commonState.EnsureAndGetVolumeMountIndexForName(container, name)
_, readOnly := cndrReadOnlyMounts[name]
if mountName, ok := cndrVolumeMounts[name]; ok {
commonState.MutateVolumeMount(container, index, mountName, readOnly)
} else {
// If not exits use the host path
commonState.MutateVolumeMount(container, index, hostPath.Path, readOnly)
mountPath, ok := cndrVolumeMounts[name]
if !ok {
mountPath = hostPath.Path
}
commonState.MutateVolumeMount(container, index, mountPath, readOnly)
}

// mutate mount for container-runtimes unix sockets files for the container tracking processor
Expand Down

0 comments on commit c0c0e7c

Please sign in to comment.