mirror of https://github.com/portainer/portainer
fix(service-details): fix an issue where secret target would be overwritten (#964)
parent
1168e94534
commit
4adedf9436
|
@ -222,7 +222,9 @@ function ($q, $scope, $state, Service, ServiceHelper, SecretHelper, SecretServic
|
||||||
var secrets = [];
|
var secrets = [];
|
||||||
angular.forEach(input.Secrets, function(secret) {
|
angular.forEach(input.Secrets, function(secret) {
|
||||||
if (secret.model) {
|
if (secret.model) {
|
||||||
secrets.push(SecretHelper.secretConfig(secret.model));
|
var s = SecretHelper.secretConfig(secret.model);
|
||||||
|
s.File.Name = s.SecretName;
|
||||||
|
secrets.push(s);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
config.TaskTemplate.ContainerSpec.Secrets = secrets;
|
config.TaskTemplate.ContainerSpec.Secrets = secrets;
|
||||||
|
|
|
@ -21,7 +21,7 @@ angular.module('portainer.helpers')
|
||||||
SecretID: secret.Id,
|
SecretID: secret.Id,
|
||||||
SecretName: secret.Name,
|
SecretName: secret.Name,
|
||||||
File: {
|
File: {
|
||||||
Name: secret.Name,
|
Name: secret.FileName,
|
||||||
UID: '0',
|
UID: '0',
|
||||||
GID: '0',
|
GID: '0',
|
||||||
Mode: 444
|
Mode: 444
|
||||||
|
|
Loading…
Reference in New Issue