diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-11-16 01:45:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-16 01:45:27 +0100 |
commit | be681ab5189dea3eef73082d0b494699072e66aa (patch) | |
tree | 8ade1d5a1a0dd359af68d6c22ff7fd860e589a3c /pkg/specgenutil/specgen.go | |
parent | 45d28c2219b64d81323b7a15fef589b11b6c63b3 (diff) | |
parent | 014cc4b9d9a15db6e61331a3be37a98235db8301 (diff) | |
download | podman-be681ab5189dea3eef73082d0b494699072e66aa.tar.gz podman-be681ab5189dea3eef73082d0b494699072e66aa.tar.bz2 podman-be681ab5189dea3eef73082d0b494699072e66aa.zip |
Merge pull request #12294 from flouthoc/secret-mount-target
secret: honor custom `target=` for secrets with `type=mount` for ctr.
Diffstat (limited to 'pkg/specgenutil/specgen.go')
-rw-r--r-- | pkg/specgenutil/specgen.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/pkg/specgenutil/specgen.go b/pkg/specgenutil/specgen.go index 04d3add32..91f5165f2 100644 --- a/pkg/specgenutil/specgen.go +++ b/pkg/specgenutil/specgen.go @@ -874,6 +874,7 @@ func parseSecrets(secrets []string) ([]specgen.Secret, map[string]string, error) if len(split) == 1 { mountSecret := specgen.Secret{ Source: val, + Target: target, UID: uid, GID: gid, Mode: mode, @@ -939,11 +940,9 @@ func parseSecrets(secrets []string) ([]specgen.Secret, map[string]string, error) return nil, nil, errors.Wrapf(secretParseError, "no source found %s", val) } if secretType == "mount" { - if target != "" { - return nil, nil, errors.Wrapf(secretParseError, "target option is invalid for mounted secrets") - } mountSecret := specgen.Secret{ Source: source, + Target: target, UID: uid, GID: gid, Mode: mode, |