fix(k8s): CE-471 avoid to remove value path of env when patch k8s deployment, as the value path does not exist if env variable has empty value.
This commit is contained in:
@@ -115,7 +115,11 @@ class KubernetesApplicationHelper {
|
||||
const env = _.map(envVariables, (item) => {
|
||||
const res = new KubernetesApplicationEnvPayload();
|
||||
res.name = item.Name;
|
||||
res.value = item.Value;
|
||||
if (item.Value === undefined) {
|
||||
delete res.value;
|
||||
} else {
|
||||
res.value = item.Value;
|
||||
}
|
||||
return res;
|
||||
});
|
||||
return env;
|
||||
|
||||
Reference in New Issue
Block a user