diff --git a/pkg/controller/authentication/configmap.go b/pkg/controller/authentication/configmap.go index 5c2fc045..0c7cf191 100644 --- a/pkg/controller/authentication/configmap.go +++ b/pkg/controller/authentication/configmap.go @@ -272,6 +272,15 @@ func (r *ReconcileAuthentication) handleConfigMap(instance *operatorv1alpha1.Aut currentConfigMap.Data["MONGO_POOL_MAX_SIZE"] = newConfigMap.Data["MONGO_POOL_MAX_SIZE"] cmUpdateRequired = true } + + if _, keyExists := currentConfigMap.Data["MONGODB_CONNECT_MAX_RETRIES"]; !keyExists { + reqLogger.Info("Updating an existing Configmap", "Configmap.Namespace", currentConfigMap.Namespace, "ConfigMap.Name", currentConfigMap.Name) + newConfigMap = functionList[index](instance, r.scheme) + currentConfigMap.Data["MONGODB_CONNECT_MAX_RETRIES"] = newConfigMap.Data["MONGODB_CONNECT_MAX_RETRIES"] + currentConfigMap.Data["MONGODB_CONNECT_RETRY_INTERVAL"] = newConfigMap.Data["MONGODB_CONNECT_RETRY_INTERVAL"] + cmUpdateRequired = true + } + if _, keyExists := currentConfigMap.Data["OS_TOKEN_LENGTH"]; keyExists { if currentConfigMap.Data["OS_TOKEN_LENGTH"] == "45" { newConfigMap = functionList[index](instance, r.scheme) @@ -574,6 +583,8 @@ func (r *ReconcileAuthentication) authIdpConfigMap(instance *operatorv1alpha1.Au "MONGO_POOL_MIN_SIZE": "5", "MONGO_POOL_MAX_SIZE": "15", "MONGO_MAX_STALENESS": "90", + "MONGODB_CONNECT_MAX_RETRIES": "10", + "MONGODB_CONNECT_RETRY_INTERVAL": "10000", "SCIM_LDAP_SEARCH_SIZE_LIMIT": "4500", "SCIM_LDAP_SEARCH_TIME_LIMIT": "10", "SCIM_ASYNC_PARALLEL_LIMIT": "100", diff --git a/pkg/controller/authentication/containers.go b/pkg/controller/authentication/containers.go index 2e4a07d0..5bfafc93 100644 --- a/pkg/controller/authentication/containers.go +++ b/pkg/controller/authentication/containers.go @@ -673,7 +673,8 @@ func buildIdentityProviderContainer(instance *operatorv1alpha1.Authentication, i } idpEnvVarList := []string{"NODE_ENV", "LOG_LEVEL_IDPROVIDER", "LOG_LEVEL_MW", "PROVIDER_ISSUER_URL", "PREFERRED_LOGIN", "IDTOKEN_LIFETIME", "SAAS_CLIENT_REDIRECT_URL", "IBM_CLOUD_SAAS", "ROKS_ENABLED", "ROKS_URL", "ROKS_USER_PREFIX", "OS_TOKEN_LENGTH", "LIBERTY_TOKEN_LENGTH", - "IDENTITY_PROVIDER_URL", "BASE_AUTH_URL", "BASE_OIDC_URL", "SCOPE_CLAIM", "OIDC_ISSUER_URL", "HTTP_ONLY", "IGNORE_LDAP_FILTERS_VALIDATION", "LDAP_ATTR_CACHE_SIZE", "LDAP_ATTR_CACHE_TIMEOUT", "LDAP_ATTR_CACHE_ENABLED", "LDAP_ATTR_CACHE_SIZELIMIT", "LDAP_SEARCH_CACHE_SIZE", "LDAP_SEARCH_CACHE_TIMEOUT", "LDAP_CTX_POOL_INITSIZE", "LDAP_CTX_POOL_MAXSIZE", "LDAP_CTX_POOL_TIMEOUT", "LDAP_CTX_POOL_WAITTIME", "LDAP_CTX_POOL_PREFERREDSIZE", "LDAP_SEARCH_CACHE_ENABLED", "LDAP_SEARCH_CACHE_SIZELIMIT", "LDAP_SEARCH_EXCLUDE_WILDCARD_CHARS", "LDAP_SEARCH_SIZE_LIMIT", "LDAP_SEARCH_TIME_LIMIT", "LDAP_SEARCH_CN_ATTR_ONLY", "LDAP_SEARCH_ID_ATTR_ONLY"} + "IDENTITY_PROVIDER_URL", "BASE_AUTH_URL", "BASE_OIDC_URL", "SCOPE_CLAIM", "OIDC_ISSUER_URL", "HTTP_ONLY", "IGNORE_LDAP_FILTERS_VALIDATION", "LDAP_ATTR_CACHE_SIZE", "LDAP_ATTR_CACHE_TIMEOUT", "LDAP_ATTR_CACHE_ENABLED", "LDAP_ATTR_CACHE_SIZELIMIT", "LDAP_SEARCH_CACHE_SIZE", "LDAP_SEARCH_CACHE_TIMEOUT", "LDAP_CTX_POOL_INITSIZE", "LDAP_CTX_POOL_MAXSIZE", "LDAP_CTX_POOL_TIMEOUT", "LDAP_CTX_POOL_WAITTIME", "LDAP_CTX_POOL_PREFERREDSIZE", "LDAP_SEARCH_CACHE_ENABLED", "LDAP_SEARCH_CACHE_SIZELIMIT", "LDAP_SEARCH_EXCLUDE_WILDCARD_CHARS", "LDAP_SEARCH_SIZE_LIMIT", "LDAP_SEARCH_TIME_LIMIT", "LDAP_SEARCH_CN_ATTR_ONLY", "LDAP_SEARCH_ID_ATTR_ONLY", + "MONGODB_CONNECT_MAX_RETRIES", "MONGODB_CONNECT_RETRY_INTERVAL"} idpEnvVars := buildIdpEnvVars(idpEnvVarList)