Update cron library for ldap sync (#47983)

* ldap: update cron library

* Update docs/sources/enterprise/enhanced_ldap.md
This commit is contained in:
Jguer 2022-04-26 12:14:48 +00:00 committed by GitHub
parent 706d3d1161
commit 8126331f66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 10 deletions

View File

@ -608,7 +608,7 @@ allow_sign_up = true
# LDAP background sync (Enterprise only)
# At 1 am every day
sync_cron = "0 0 1 * * *"
sync_cron = "0 1 * * *"
active_sync_enabled = true
#################################### AWS ###########################

View File

@ -591,7 +591,7 @@
# LDAP background sync (Enterprise only)
# At 1 am every day
;sync_cron = "0 0 1 * * *"
;sync_cron = "0 1 * * *"
;active_sync_enabled = true
#################################### AWS ###########################

View File

@ -48,9 +48,9 @@ Removed users are automatically logged out and their account disabled. These acc
# @weekly | Run once a week, midnight between Sat/Sun | 0 0 0 * * 0
# @daily (or @midnight) | Run once a day, midnight | 0 0 0 * * *
# @hourly | Run once an hour, beginning of hour | 0 0 * * * *
sync_cron = "0 0 1 * * *" # This is default value (At 1 am every day)
# This cron expression format uses 6 space-separated fields (including seconds), for example
# sync_cron = "* */10 * * * *"
sync_cron = "0 1 * * *" # This is default value (At 1 am every day)
# This cron expression format uses 5 space-separated fields, for example
# sync_cron = "*/10 * * * *"
# This will run the LDAP Synchronization every 10th minute, which is also the minimal interval between the Grafana sync times i.e. you cannot set it for every 9th minute
# You can also disable active LDAP synchronization

1
go.mod
View File

@ -83,7 +83,6 @@ require (
github.com/prometheus/client_model v0.2.0
github.com/prometheus/common v0.32.1
github.com/prometheus/prometheus v1.8.2-0.20211011171444-354d8d2ecfac
github.com/robfig/cron v0.0.0-20180505203441-b41be1df6967
github.com/robfig/cron/v3 v3.0.1
github.com/russellhaering/goxmldsig v1.1.1
github.com/stretchr/testify v1.7.1

View File

@ -1,9 +1,6 @@
package extensions
import (
// Upgrade ldapsync from cron to cron.v3 and
// remove the cron (v1) dependency
_ "cloud.google.com/go/kms/apiv1"
_ "github.com/Azure/azure-sdk-for-go/sdk/azidentity"
_ "github.com/Azure/azure-sdk-for-go/sdk/keyvault/azkeys"
@ -24,7 +21,6 @@ import (
_ "github.com/linkedin/goavro/v2"
_ "github.com/m3db/prometheus_remote_client_golang/promremote"
_ "github.com/pkg/errors"
_ "github.com/robfig/cron"
_ "github.com/robfig/cron/v3"
_ "github.com/russellhaering/goxmldsig"
_ "github.com/stretchr/testify/require"