mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 07:49:41 +02:00
Merge changes from release 2.2 (#4930)
* fix windows build * fix(endpoints): show correct values of security settings (#4889) * fix(app): EndpointProvider fallback on URL EndpointID when no endpoint is selected (#4892) * fix(templates): App templates not loading with error in browser console (#4895) * fix(kube/config): show used key warning when needed (#4890) fix [CE-469] - recalculate duplcate keys when they are changed - show used warning on duplicate keys * fix(k8s): CE-471 variables from configuration showing on environment variables section on application edit screen (#4896) * fix(k8s): CE-471 variables from configuration showing on environment variables section on application edit screen * 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. Co-authored-by: Simon Meng <simon.meng@portainer.io> Co-authored-by: Dmitry Salakhov <to@dimasalakhov.com> Co-authored-by: Chaim Lev-Ari <chiptus@users.noreply.github.com> Co-authored-by: LP B <xAt0mZ@users.noreply.github.com> Co-authored-by: Maxime Bajeux <max.bajeux@gmail.com> Co-authored-by: cong meng <mcpacino@gmail.com> Co-authored-by: Simon Meng <simon.meng@portainer.io>
This commit is contained in:
parent
239e434522
commit
572b64b68e
7 changed files with 65 additions and 23 deletions
|
@ -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;
|
||||
|
@ -123,6 +127,9 @@ class KubernetesApplicationHelper {
|
|||
|
||||
static generateEnvVariablesFromEnv(env) {
|
||||
const envVariables = _.map(env, (item) => {
|
||||
if (item.valueFrom) {
|
||||
return;
|
||||
}
|
||||
const res = new KubernetesApplicationEnvironmentVariableFormValue();
|
||||
res.Name = item.name;
|
||||
res.Value = item.value;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue