From 054b44a8dd3b14960404c4ad7348ab7b267026de Mon Sep 17 00:00:00 2001 From: Mateusz Kwasniewski Date: Mon, 1 Jul 2024 15:45:13 +0200 Subject: [PATCH] feat: allow enterprise override for constraint values limit (#7502) --- src/lib/create-config.ts | 2 +- src/lib/types/option.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/create-config.ts b/src/lib/create-config.ts index cad1a4e651..0942da29f7 100644 --- a/src/lib/create-config.ts +++ b/src/lib/create-config.ts @@ -655,7 +655,7 @@ export function createConfig(options: IUnleashOptions): IUnleashConfig { ), constraintValues: parseEnvVarNumber( process.env.UNLEASH_CONSTRAINT_VALUES_LIMIT, - 250, + options?.resourceLimits?.constraintValues || 250, ), environments: parseEnvVarNumber( process.env.UNLEASH_ENVIRONMENTS_LIMIT, diff --git a/src/lib/types/option.ts b/src/lib/types/option.ts index b8d499ad45..fc476fed8e 100644 --- a/src/lib/types/option.ts +++ b/src/lib/types/option.ts @@ -141,6 +141,7 @@ export interface IUnleashOptions { metricsRateLimiting?: Partial; dailyMetricsStorageDays?: number; rateLimiting?: Partial; + resourceLimits?: Partial>; } export interface IEmailOption {