mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-20 06:26:57 +00:00
Make secrets global and init on first use.
This allows all containers to use any secret declared anywhere in their placeholders but they will not be generated and written to the configuration until they are used. Signed-off-by: Alan Savage <3028205+asavageiv@users.noreply.github.com>
This commit is contained in:
parent
e4c2f44d81
commit
29c093afae
4 changed files with 15 additions and 27 deletions
|
|
@ -239,9 +239,12 @@ readonly class ContainerDefinitionFetcher {
|
|||
$internalPort = $entry['internal_port'];
|
||||
}
|
||||
|
||||
$secrets = [];
|
||||
if (isset($entry['secrets'])) {
|
||||
$secrets = $entry['secrets'];
|
||||
// All secrets are registered with the configuration when they
|
||||
// are discovered so they can be later generated at time-of-use.
|
||||
foreach ($entry['secrets'] as $secret) {
|
||||
$this->configurationManager->RegisterSecret($secret);
|
||||
}
|
||||
}
|
||||
|
||||
$uiSecret = '';
|
||||
|
|
@ -320,7 +323,6 @@ readonly class ContainerDefinitionFetcher {
|
|||
$volumes,
|
||||
$variables,
|
||||
$dependsOn,
|
||||
$secrets,
|
||||
$uiSecret,
|
||||
$devices,
|
||||
$enableNvidiaGpu,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue