mirror of https://github.com/containers/podman.git
secrets: parse only one mounts configuration file
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
parent
c737d01937
commit
45a92f8357
|
@ -147,11 +147,14 @@ func SecretMountsWithUIDGID(mountLabel, containerWorkingDir, mountFile, mountPre
|
||||||
mountFiles = append(mountFiles, mountFile)
|
mountFiles = append(mountFiles, mountFile)
|
||||||
}
|
}
|
||||||
for _, file := range mountFiles {
|
for _, file := range mountFiles {
|
||||||
|
if _, err := os.Stat(file); err == nil {
|
||||||
mounts, err := addSecretsFromMountsFile(file, mountLabel, containerWorkingDir, mountPrefix, uid, gid)
|
mounts, err := addSecretsFromMountsFile(file, mountLabel, containerWorkingDir, mountPrefix, uid, gid)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logrus.Warnf("error mounting secrets, skipping: %v", err)
|
logrus.Warnf("error mounting secrets, skipping: %v", err)
|
||||||
}
|
}
|
||||||
secretMounts = append(secretMounts, mounts...)
|
secretMounts = mounts
|
||||||
|
break
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add FIPS mode secret if /etc/system-fips exists on the host
|
// Add FIPS mode secret if /etc/system-fips exists on the host
|
||||||
|
|
Loading…
Reference in New Issue