summaryrefslogtreecommitdiff
path: root/pkg/specgen/generate/container_create.go
diff options
context:
space:
mode:
authoropenshift-ci[bot] <75433959+openshift-ci[bot]@users.noreply.github.com>2022-06-27 15:14:20 +0000
committerGitHub <noreply@github.com>2022-06-27 15:14:20 +0000
commit088665d2cfd488004f34dbd0804c3cd00bf94ca4 (patch)
tree0aa7d04edc4009672fcc760aca511b8d10796682 /pkg/specgen/generate/container_create.go
parent8806606ca2e2060750b3f86c6d31bb50125309de (diff)
parent2792e598c7ce1198ec8464a3119504123ae8397c (diff)
downloadpodman-088665d2cfd488004f34dbd0804c3cd00bf94ca4.tar.gz
podman-088665d2cfd488004f34dbd0804c3cd00bf94ca4.tar.bz2
podman-088665d2cfd488004f34dbd0804c3cd00bf94ca4.zip
Merge pull request #14654 from cdoern/cgroup
podman cgroup enhancement
Diffstat (limited to 'pkg/specgen/generate/container_create.go')
-rw-r--r--pkg/specgen/generate/container_create.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/pkg/specgen/generate/container_create.go b/pkg/specgen/generate/container_create.go
index 0dec943d1..6b2e90b22 100644
--- a/pkg/specgen/generate/container_create.go
+++ b/pkg/specgen/generate/container_create.go
@@ -180,10 +180,23 @@ func MakeContainer(ctx context.Context, rt *libpod.Runtime, s *specgen.SpecGener
if err != nil {
return nil, nil, nil, err
}
+ resources := runtimeSpec.Linux.Resources
+
+ // resources get overwrritten similarly to pod inheritance, manually assign here if there is a new value
+ marshalRes, err := json.Marshal(resources)
+ if err != nil {
+ return nil, nil, nil, err
+ }
+
err = json.Unmarshal(out, runtimeSpec.Linux)
if err != nil {
return nil, nil, nil, err
}
+
+ err = json.Unmarshal(marshalRes, runtimeSpec.Linux.Resources)
+ if err != nil {
+ return nil, nil, nil, err
+ }
}
if s.ResourceLimits != nil {
switch {