@@ -10633,12 +10633,16 @@ var e = new RegExp("^[A-Za-z_]{1}[A-Za-z0-9_]*$");
10633
10633
m.hasInvalidEnvVars = _.some(m.secret.data, function(t, n) {
10634
10634
return !e.test(n);
10635
10635
});
10636
- }, m.$postLink = function() {
10636
+ };
10637
+ var g = function(e) {
10638
+ return m.attachAllContainers || m.attachContainers[e.name];
10639
+ };
10640
+ m.$postLink = function() {
10637
10641
t.$watch(function() {
10638
10642
return m.application;
10639
10643
}, function() {
10640
10644
var e = _.get(m.application, "spec.template");
10641
- m.existingMountPaths = i.getMountPaths(e);
10645
+ m.existingMountPaths = i.getMountPaths(e), m.attachAllContainers = !0 ;
10642
10646
});
10643
10647
}, m.addToApplication = function() {
10644
10648
var t = angular.copy(m.application), i = _.get(t, "spec.template");
@@ -10649,7 +10653,7 @@ name: m.secret.metadata.name
10649
10653
}
10650
10654
};
10651
10655
_.each(i.spec.containers, function(e) {
10652
- e .envFrom = e.envFrom || [], e.envFrom.push(s);
10656
+ g(e) && (e .envFrom = e.envFrom || [], e.envFrom.push(s) );
10653
10657
});
10654
10658
} else {
10655
10659
var c = e("generateName")(m.secret.metadata.name + "-"), l = {
@@ -10658,7 +10662,7 @@ mountPath: m.mountVolume,
10658
10662
readOnly: !0
10659
10663
};
10660
10664
_.each(i.spec.containers, function(e) {
10661
- e .volumeMounts = e.volumeMounts || [], e.volumeMounts.push(l);
10665
+ g(e) && (e .volumeMounts = e.volumeMounts || [], e.volumeMounts.push(l) );
10662
10666
});
10663
10667
var u = {
10664
10668
name: c,
@@ -10668,10 +10672,10 @@ secretName: m.secret.metadata.name
10668
10672
};
10669
10673
i.spec.volumes = i.spec.volumes || [], i.spec.volumes.push(u);
10670
10674
}
10671
- var d = e("humanizeKind"), p = d(m.secret.kind), f = d(t.kind), g = {
10675
+ var d = e("humanizeKind"), p = d(m.secret.kind), f = d(t.kind), h = {
10672
10676
namespace: m.project.metadata.name
10673
10677
};
10674
- a.update(n.kindToResource(t.kind), t.metadata.name, t, g ).then(function() {
10678
+ a.update(n.kindToResource(t.kind), t.metadata.name, t, h ).then(function() {
10675
10679
o.addNotification({
10676
10680
type: "success",
10677
10681
message: "Successfully added " + p + " " + m.secret.metadata.name + " to " + f + " " + t.metadata.name + ".",
0 commit comments