summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
author荒野無燈 <ttys3.rust@gmail.com>2021-12-18 08:37:24 +0800
committer荒野無燈 <ttys3.rust@gmail.com>2021-12-18 09:25:37 +0800
commitaf6bcd086794668889a2695e02ea89cff966ae35 (patch)
tree75679d9f07be0a8fdbd1b215e0cf291a981198e2 /libpod
parent59766ebe76fe5bdd15256f5d39d063c95304989f (diff)
downloadpodman-af6bcd086794668889a2695e02ea89cff966ae35.tar.gz
podman-af6bcd086794668889a2695e02ea89cff966ae35.tar.bz2
podman-af6bcd086794668889a2695e02ea89cff966ae35.zip
fix(generate): fix up podman generate kube missing env field bug
the logic is: if the process env vars key exists in podman default or in image defined, and the value is equal, skip the env var key. the typo make it compare to itself -_- so, here comes the simple fixup. Signed-off-by: 荒野無燈 <ttys3.rust@gmail.com>
Diffstat (limited to 'libpod')
-rw-r--r--libpod/kube.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/libpod/kube.go b/libpod/kube.go
index 4e61b5377..d667616d0 100644
--- a/libpod/kube.go
+++ b/libpod/kube.go
@@ -747,7 +747,7 @@ func libpodEnvVarsToKubeEnvVars(envs []string, imageEnvs []string) ([]v1.EnvVar,
defaultEnv := env.DefaultEnvVariables()
envVars := make([]v1.EnvVar, 0, len(envs))
imageMap := make(map[string]string, len(imageEnvs))
- for _, ie := range envs {
+ for _, ie := range imageEnvs {
split := strings.SplitN(ie, "=", 2)
imageMap[split[0]] = split[1]
}