aboutsummaryrefslogtreecommitdiff
path: root/pkg/specgen
diff options
context:
space:
mode:
authorcdoern <cbdoer23@g.holycross.edu>2022-05-13 16:04:13 -0400
committercdoern <cdoern@redhat.com>2022-06-01 12:45:00 -0400
commitf728b7b5a7585cef7f8d612ccf54481c3c6eb556 (patch)
treec505ebb3863b09be256075b0b0c03d4a2d8e8427 /pkg/specgen
parentd069ad108246a15b57481afd12ef7ffd5667e1d2 (diff)
downloadpodman-f728b7b5a7585cef7f8d612ccf54481c3c6eb556.tar.gz
podman-f728b7b5a7585cef7f8d612ccf54481c3c6eb556.tar.bz2
podman-f728b7b5a7585cef7f8d612ccf54481c3c6eb556.zip
podman pod create --uidmap patch
podmans remote API does not marshal infra's spec due to the fact that if it did, all of those options would be available to the users on the command line. This means we need to manually map "backwards" some container spec items -> pod spec items before calling PodCreate, this was one of them that was forgotten resolves #14233 Signed-off-by: cdoern <cbdoer23@g.holycross.edu> Signed-off-by: cdoern <cdoern@redhat.com>
Diffstat (limited to 'pkg/specgen')
-rw-r--r--pkg/specgen/podspecgen.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkg/specgen/podspecgen.go b/pkg/specgen/podspecgen.go
index 603506241..777097ac5 100644
--- a/pkg/specgen/podspecgen.go
+++ b/pkg/specgen/podspecgen.go
@@ -4,6 +4,7 @@ import (
"net"
"github.com/containers/common/libnetwork/types"
+ storageTypes "github.com/containers/storage/types"
spec "github.com/opencontainers/runtime-spec/specs-go"
)
@@ -222,6 +223,10 @@ type PodResourceConfig struct {
type PodSecurityConfig struct {
SecurityOpt []string `json:"security_opt,omitempty"`
+ // IDMappings are UID and GID mappings that will be used by user
+ // namespaces.
+ // Required if UserNS is private.
+ IDMappings *storageTypes.IDMappingOptions `json:"idmappings,omitempty"`
}
// NewPodSpecGenerator creates a new pod spec