refactor(core): Port external secrets config (no-changelog) (#10094)

This commit is contained in:
Iván Ovejero
2024-07-18 10:52:41 +02:00
committed by GitHub
parent a04c4335da
commit 1f420e0bd6
4 changed files with 20 additions and 18 deletions

View File

@@ -0,0 +1,12 @@
import { Config, Env } from '../decorators';
@Config
export class ExternalSecretsConfig {
/** How often (in seconds) to check for secret updates */
@Env('N8N_EXTERNAL_SECRETS_UPDATE_INTERVAL')
readonly updateInterval: number = 300;
/** Whether to prefer GET over LIST when fetching secrets from Hashicorp Vault */
@Env('N8N_EXTERNAL_SECRETS_PREFER_GET')
readonly preferGet: boolean = false;
}

View File

@@ -4,6 +4,7 @@ import { DatabaseConfig } from './configs/database';
import { EmailConfig } from './configs/email';
import { VersionNotificationsConfig } from './configs/version-notifications';
import { PublicApiConfig } from './configs/public-api';
import { ExternalSecretsConfig } from './configs/external-secrets';
@Config
class UserManagementConfig {
@@ -27,4 +28,7 @@ export class GlobalConfig {
@Nested
publicApi: PublicApiConfig;
@Nested
externalSecrets: ExternalSecretsConfig;
}