mirror of
https://github.com/containers/podman.git
synced 2025-06-19 08:09:12 +08:00
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>
This commit is contained in:
@ -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]
|
||||
}
|
||||
|
Reference in New Issue
Block a user