Skip to content

Commit

Permalink
chore(webhook): change var name to defaultSettingsWebhookMaxConcurren…
Browse files Browse the repository at this point in the history
…tAppRefresh

Signed-off-by: phanama <[email protected]>
  • Loading branch information
phanama committed Sep 3, 2023
1 parent 507530c commit 84ecbb3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions util/settings/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ const (
// settingsWebhookMaxConcurrentAppRefresh is the key for max concurrent app refresh
settingsWebhookMaxConcurrentAppRefreshKey = "webhook.maxConcurrentAppRefresh"
// defaultSettingsWebhookMaxConcurrentAppRefresh is the default value for the number of max concurrent app refresh
defaultWebhookMaxConcurrentAppRefresh = 10
defaultSettingsWebhookMaxConcurrentAppRefresh = 10
)

var (
Expand Down Expand Up @@ -1433,15 +1433,15 @@ func updateSettingsFromConfigMap(settings *ArgoCDSettings, argoCDCM *apiv1.Confi
if webhookMaxConcurrentAppRefresh := argoCDCM.Data[settingsWebhookMaxConcurrentAppRefreshKey]; len(webhookMaxConcurrentAppRefresh) > 0 {
i, err := strconv.Atoi(string(webhookMaxConcurrentAppRefresh))
if err != nil {
log.Warnf("invalid input for %s: %s. Using the default value %d.", settingsWebhookMaxConcurrentAppRefreshKey, err.Error(), defaultWebhookMaxConcurrentAppRefresh)
log.Warnf("invalid input for %s: %s. Using the default value %d.", settingsWebhookMaxConcurrentAppRefreshKey, err.Error(), defaultSettingsWebhookMaxConcurrentAppRefresh)
}
if i < 1 {
i = defaultWebhookMaxConcurrentAppRefresh
log.Warnf("%s is less than 1. Using the default value %d.", settingsWebhookMaxConcurrentAppRefreshKey, defaultWebhookMaxConcurrentAppRefresh)
i = defaultSettingsWebhookMaxConcurrentAppRefresh
log.Warnf("%s is less than 1. Using the default value %d.", settingsWebhookMaxConcurrentAppRefreshKey, defaultSettingsWebhookMaxConcurrentAppRefresh)
}
settings.WebhookMaxConcurrentAppRefresh = i
} else {
settings.WebhookMaxConcurrentAppRefresh = defaultWebhookMaxConcurrentAppRefresh
settings.WebhookMaxConcurrentAppRefresh = defaultSettingsWebhookMaxConcurrentAppRefresh
}
}

Expand Down

0 comments on commit 84ecbb3

Please sign in to comment.