mirror of
https://github.com/minio/minio.git
synced 2025-03-30 17:23:42 -04:00
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 {
|
if err != nil {
|
||||||
return cfg, err
|
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{
|
cfg.HTTP[k] = http.Config{
|
||||||
Enabled: true,
|
Enabled: true,
|
||||||
Endpoint: url,
|
Endpoint: url,
|
||||||
@ -571,6 +574,9 @@ func lookupAuditWebhookConfig(scfg config.Config, cfg Config) (Config, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return cfg, err
|
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{
|
cfg.AuditWebhook[k] = http.Config{
|
||||||
Enabled: true,
|
Enabled: true,
|
||||||
Endpoint: url,
|
Endpoint: url,
|
||||||
|
@ -76,6 +76,18 @@ var (
|
|||||||
Optional: true,
|
Optional: true,
|
||||||
Type: "string",
|
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{
|
config.HelpKV{
|
||||||
Key: config.Comment,
|
Key: config.Comment,
|
||||||
Description: config.DefaultComment,
|
Description: config.DefaultComment,
|
||||||
@ -133,13 +145,13 @@ var (
|
|||||||
},
|
},
|
||||||
config.HelpKV{
|
config.HelpKV{
|
||||||
Key: MaxRetry,
|
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,
|
Optional: true,
|
||||||
Type: "number",
|
Type: "number",
|
||||||
},
|
},
|
||||||
config.HelpKV{
|
config.HelpKV{
|
||||||
Key: RetryInterval,
|
Key: RetryInterval,
|
||||||
Description: `maximum retry sleeps between each retries`,
|
Description: `sleep between each retries, allowed maximum value is '1m' e.g. '10s'`,
|
||||||
Optional: true,
|
Optional: true,
|
||||||
Type: "duration",
|
Type: "duration",
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user