From b13ae2b6dce38b9f4daa97ff9151ed3e9427195d Mon Sep 17 00:00:00 2001 From: "Christopher J. Ruwe" Date: Wed, 9 Dec 2020 09:09:01 +0100 Subject: make podman play use ENVs from image fixes #8608. Signed-off-by: Christopher J. Ruwe --- pkg/specgen/generate/kube/kube.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'pkg/specgen/generate/kube') diff --git a/pkg/specgen/generate/kube/kube.go b/pkg/specgen/generate/kube/kube.go index 5f72d28bb..5cc7891ac 100644 --- a/pkg/specgen/generate/kube/kube.go +++ b/pkg/specgen/generate/kube/kube.go @@ -148,6 +148,11 @@ func ToSpecGen(ctx context.Context, containerYAML v1.Container, iid string, newI // Environment Variables envs := map[string]string{} + for _, env := range imageData.Config.Env { + keyval := strings.Split(env, "=") + envs[keyval[0]] = keyval[1] + } + for _, env := range containerYAML.Env { value := envVarValue(env, configMaps) -- cgit v1.2.3-54-g00ecf