|
|
@@ -12,6 +12,7 @@ import (
|
|
|
"github.com/porter-dev/porter/cli/cmd/config"
|
|
|
"github.com/porter-dev/porter/cli/cmd/deploy"
|
|
|
"github.com/porter-dev/porter/cli/cmd/utils"
|
|
|
+ templaterUtils "github.com/porter-dev/porter/internal/templater/utils"
|
|
|
"github.com/spf13/cobra"
|
|
|
"k8s.io/client-go/util/homedir"
|
|
|
)
|
|
|
@@ -637,6 +638,18 @@ func updateUpgradeWithAgent(updateAgent *deploy.DeployAgent) error {
|
|
|
return err
|
|
|
}
|
|
|
|
|
|
+ env, err := updateAgent.GetBuildEnv(&deploy.GetBuildEnvOpts{UseNewConfig: false})
|
|
|
+
|
|
|
+ if err == nil && len(env) > 0 {
|
|
|
+ valuesObj = templaterUtils.CoalesceValues(valuesObj, map[string]interface{}{
|
|
|
+ "container": map[string]interface{}{
|
|
|
+ "env": map[string]interface{}{
|
|
|
+ "normal": env,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
err = updateAgent.UpdateImageAndValues(valuesObj)
|
|
|
|
|
|
if err != nil {
|