summaryrefslogtreecommitdiff
path: root/libpod/container_internal.go
diff options
context:
space:
mode:
Diffstat (limited to 'libpod/container_internal.go')
-rw-r--r--libpod/container_internal.go14
1 files changed, 3 insertions, 11 deletions
diff --git a/libpod/container_internal.go b/libpod/container_internal.go
index 32f8d2aec..62960fa0f 100644
--- a/libpod/container_internal.go
+++ b/libpod/container_internal.go
@@ -754,8 +754,7 @@ func (c *Container) makeBindMounts() error {
}
// Add Secret Mounts
- secretMounts := c.getSecretMounts(secrets.OverrideMountsFile)
- secretMounts = append(secretMounts, c.getSecretMounts(secrets.DefaultMountsFile)...)
+ secretMounts := secrets.SecretMounts(c.config.MountLabel, c.state.RunDir)
for _, mount := range secretMounts {
if _, ok := c.state.BindMounts[mount.Destination]; !ok {
c.state.BindMounts[mount.Destination] = mount.Source
@@ -765,15 +764,6 @@ func (c *Container) makeBindMounts() error {
return nil
}
-// addSecrets mounts the secrets from the override and/or default mounts file
-func (c *Container) getSecretMounts(mountFile string) (secretMounts []spec.Mount) {
- secretMounts, err := secrets.SecretMounts(mountFile, c.config.MountLabel, c.state.RunDir)
- if err != nil {
- logrus.Warn("error mounting secrets, skipping...")
- }
- return secretMounts
-}
-
// writeStringToRundir copies the provided file to the runtimedir
func (c *Container) writeStringToRundir(destFile, output string) (string, error) {
destFileName := filepath.Join(c.state.RunDir, destFile)
@@ -932,6 +922,8 @@ func (c *Container) generateSpec(ctx context.Context) (*spec.Spec, error) {
}
if !MountExists(g.Mounts(), dstPath) {
g.AddMount(newMount)
+ } else {
+ logrus.Warnf("User mount overriding libpod mount at %q", dstPath)
}
}