summaryrefslogtreecommitdiff
path: root/pkg/specgen
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-10-20 14:03:13 +0000
committerGitHub <noreply@github.com>2021-10-20 14:03:13 +0000
commit09aade7816e096550e805869f1300d7198aa8f91 (patch)
tree77ad099aae7e8189eb22bdf2afa40b4651f2384b /pkg/specgen
parentc15c1540837b25305729bc72d61372098e204151 (diff)
parent46f7d2af189530a1f81d5e0aab5244667846e181 (diff)
downloadpodman-09aade7816e096550e805869f1300d7198aa8f91.tar.gz
podman-09aade7816e096550e805869f1300d7198aa8f91.tar.bz2
podman-09aade7816e096550e805869f1300d7198aa8f91.zip
Merge pull request #12040 from mheon/341_release
Bump to v3.4.1
Diffstat (limited to 'pkg/specgen')
-rw-r--r--pkg/specgen/generate/kube/kube.go2
-rw-r--r--pkg/specgen/generate/validate.go3
2 files changed, 2 insertions, 3 deletions
diff --git a/pkg/specgen/generate/kube/kube.go b/pkg/specgen/generate/kube/kube.go
index 27a1e5a72..7072a5821 100644
--- a/pkg/specgen/generate/kube/kube.go
+++ b/pkg/specgen/generate/kube/kube.go
@@ -254,7 +254,7 @@ func ToSpecGen(ctx context.Context, opts *CtrSpecGenOptions) (*specgen.SpecGener
// Environment Variables
envs := map[string]string{}
for _, env := range imageData.Config.Env {
- keyval := strings.Split(env, "=")
+ keyval := strings.SplitN(env, "=", 2)
envs[keyval[0]] = keyval[1]
}
diff --git a/pkg/specgen/generate/validate.go b/pkg/specgen/generate/validate.go
index 50efe7fa3..b0d84825e 100644
--- a/pkg/specgen/generate/validate.go
+++ b/pkg/specgen/generate/validate.go
@@ -72,10 +72,9 @@ func verifyContainerResourcesCgroupV1(s *specgen.SpecGenerator) ([]string, error
// Pids checks
if s.ResourceLimits.Pids != nil {
- pids := s.ResourceLimits.Pids
// TODO: Should this be 0, or checking that ResourceLimits.Pids
// is set at all?
- if pids.Limit > 0 && !sysInfo.PidsLimit {
+ if s.ResourceLimits.Pids.Limit >= 0 && !sysInfo.PidsLimit {
warnings = append(warnings, "Your kernel does not support pids limit capabilities or the cgroup is not mounted. PIDs limit discarded.")
s.ResourceLimits.Pids = nil
}