From a2df60e1fbd869815de759d36ee94b858cda7121 Mon Sep 17 00:00:00 2001 From: "anton.aleksandrov" Date: Mon, 2 Dec 2024 16:46:57 +0100 Subject: [PATCH] using const name instead of string --- controllers/common.go | 1 + main.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/controllers/common.go b/controllers/common.go index 106c9897..79822ed8 100644 --- a/controllers/common.go +++ b/controllers/common.go @@ -34,4 +34,5 @@ const ( EnableWebhooksEnvVar = "ENABLE_WEBHOOKS" ControllerSyncPeriodEnvVar = "SYNC_PERIOD" ConnectUsingPlainHTTPEnvVar = "CONNECT_USING_PLAIN_HTTP" + MaxConcurrentReconciles = "MAX_CONCURRENT_RECONCILES" ) diff --git a/main.go b/main.go index 10417de5..955660dc 100644 --- a/main.go +++ b/main.go @@ -161,7 +161,7 @@ func main() { } var maxConcurrentReconciles int - if maxConcurrentReconcilesEnvValue := getIntEnv("MAX_CONCURRENT_RECONCILES"); maxConcurrentReconcilesEnvValue > 0 { + if maxConcurrentReconcilesEnvValue := getIntEnv(controllers.MaxConcurrentReconciles); maxConcurrentReconcilesEnvValue > 0 { maxConcurrentReconciles = maxConcurrentReconcilesEnvValue log.Info(fmt.Sprintf("maxConcurrentReconciles set to %d", maxConcurrentReconciles)) }