Skip to content

Commit 51e5d1b

Browse files
duaribiju“Biju
andauthored
SCIM_AUTH_CACHE_MAX_SIZE Param - Upgrade handling (#482)
* Fixed sev1 issue * Fixed sev1 issue Co-authored-by: “Biju <[email protected]>
1 parent 4a88b58 commit 51e5d1b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pkg/controller/authentication/configmap.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,17 @@ func (r *ReconcileAuthentication) handleConfigMap(instance *operatorv1alpha1.Aut
228228
currentConfigMap.Data["SCIM_LDAP_SEARCH_TIME_LIMIT"] = newConfigMap.Data["SCIM_LDAP_SEARCH_TIME_LIMIT"]
229229
currentConfigMap.Data["SCIM_ASYNC_PARALLEL_LIMIT"] = newConfigMap.Data["SCIM_ASYNC_PARALLEL_LIMIT"]
230230
currentConfigMap.Data["SCIM_GET_DISPLAY_FOR_GROUP_USERS"] = newConfigMap.Data["SCIM_GET_DISPLAY_FOR_GROUP_USERS"]
231+
cmUpdateRequired = true
232+
}
233+
if _, keyExists := currentConfigMap.Data["SCIM_AUTH_CACHE_MAX_SIZE"]; !keyExists {
234+
reqLogger.Info("Updating an existing Configmap to add new SCIM variables", "Configmap.Namespace", currentConfigMap.Namespace, "ConfigMap.Name", currentConfigMap.Name)
235+
newConfigMap = functionList[index](instance, r.scheme)
231236
currentConfigMap.Data["SCIM_AUTH_CACHE_MAX_SIZE"] = newConfigMap.Data["SCIM_AUTH_CACHE_MAX_SIZE"]
237+
cmUpdateRequired = true
238+
}
239+
if _, keyExists := currentConfigMap.Data["SCIM_AUTH_CACHE_TTL_VALUE"]; !keyExists {
240+
reqLogger.Info("Updating an existing Configmap to add new SCIM variables", "Configmap.Namespace", currentConfigMap.Namespace, "ConfigMap.Name", currentConfigMap.Name)
241+
newConfigMap = functionList[index](instance, r.scheme)
232242
currentConfigMap.Data["SCIM_AUTH_CACHE_TTL_VALUE"] = newConfigMap.Data["SCIM_AUTH_CACHE_TTL_VALUE"]
233243
cmUpdateRequired = true
234244
}

0 commit comments

Comments
 (0)