mirror of https://github.com/minio/minio.git
fix: set audit/logger webhook retry interval to maximum 1m (#20404)
This commit is contained in:
parent
8268c12cfb
commit
fb24bcfee0
|
@ -494,6 +494,9 @@ func lookupLoggerWebhookConfig(scfg config.Config, cfg Config) (Config, error) {
|
|||
if err != nil {
|
||||
return cfg, err
|
||||
}
|
||||
if retryInterval > time.Minute {
|
||||
return cfg, fmt.Errorf("maximum allowed value for retry interval is '1m': %s", retryIntervalCfgVal)
|
||||
}
|
||||
cfg.HTTP[k] = http.Config{
|
||||
Enabled: true,
|
||||
Endpoint: url,
|
||||
|
@ -571,6 +574,9 @@ func lookupAuditWebhookConfig(scfg config.Config, cfg Config) (Config, error) {
|
|||
if err != nil {
|
||||
return cfg, err
|
||||
}
|
||||
if retryInterval > time.Minute {
|
||||
return cfg, fmt.Errorf("maximum allowed value for retry interval is '1m': %s", retryIntervalCfgVal)
|
||||
}
|
||||
cfg.AuditWebhook[k] = http.Config{
|
||||
Enabled: true,
|
||||
Endpoint: url,
|
||||
|
|
|
@ -76,6 +76,18 @@ var (
|
|||
Optional: true,
|
||||
Type: "string",
|
||||
},
|
||||
config.HelpKV{
|
||||
Key: MaxRetry,
|
||||
Description: `maximum retry count before we start dropping logged event(s)`,
|
||||
Optional: true,
|
||||
Type: "number",
|
||||
},
|
||||
config.HelpKV{
|
||||
Key: RetryInterval,
|
||||
Description: `sleep between each retries, allowed maximum value is '1m' e.g. '10s'`,
|
||||
Optional: true,
|
||||
Type: "duration",
|
||||
},
|
||||
config.HelpKV{
|
||||
Key: config.Comment,
|
||||
Description: config.DefaultComment,
|
||||
|
@ -133,13 +145,13 @@ var (
|
|||
},
|
||||
config.HelpKV{
|
||||
Key: MaxRetry,
|
||||
Description: `maximum retry count before we start dropping upto batch_size events`,
|
||||
Description: `maximum retry count before we start dropping audit event(s)`,
|
||||
Optional: true,
|
||||
Type: "number",
|
||||
},
|
||||
config.HelpKV{
|
||||
Key: RetryInterval,
|
||||
Description: `maximum retry sleeps between each retries`,
|
||||
Description: `sleep between each retries, allowed maximum value is '1m' e.g. '10s'`,
|
||||
Optional: true,
|
||||
Type: "duration",
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue