-
Notifications
You must be signed in to change notification settings - Fork 174
Expand file tree
/
Copy pathreprocessing_interval.go
More file actions
31 lines (29 loc) · 2.58 KB
/
reprocessing_interval.go
File metadata and controls
31 lines (29 loc) · 2.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package env
import "time"
var (
// RiskReprocessInterval will set the duration for which to debounce risk reprocessing
RiskReprocessInterval = registerDurationSetting("ROX_RISK_REPROCESSING_INTERVAL", 10*time.Minute)
// ReprocessInterval will set the duration for which to reprocess all deployments and get new scans
ReprocessInterval = registerDurationSetting("ROX_REPROCESSING_INTERVAL", 4*time.Hour)
// VulnDeferralTimedReObserveInterval will set the duration for when to check to see if timed vuln deferrals need to be checked for expiry.
VulnDeferralTimedReObserveInterval = registerDurationSetting("ROX_VULN_TIMED_DEFERRAL_REOBSERVE_INTERVAL", 1*time.Hour)
// VulnDeferralFixableReObserveInterval will set the duration for when to check to see if "when fixable" vuln deferrals need to be checked for expiry.
VulnDeferralFixableReObserveInterval = registerDurationSetting("ROX_VULN_FIXABLE_DEFERRAL_REOBSERVE_INTERVAL", 4*time.Hour)
// OrchestratorVulnScanInterval specifies the frequency at which Central should scan for new orchestrator-level vulnerabilities.
OrchestratorVulnScanInterval = registerDurationSetting("ROX_ORCHESTRATOR_VULN_SCAN_INTERVAL", 2*time.Hour)
// ReprocessInjectMessageTimeout specifies the duration to wait when sending a message to sensor during reprocessing. If this duration
// is exceeded subsequent messages targeting this particular sensor will be skipped until the next reprocessing cycle.
// Setting the duration to zero will disable the timeout.
ReprocessInjectMessageTimeout = registerDurationSetting("ROX_REPROCESSING_INJECT_MESSAGE_TIMEOUT", 1*time.Minute, WithDurationZeroAllowed())
// ReprocessDeploymentsMsgDelay specifies the delay to wait between sending "ReprocessDeployments"
// messages to Sensors at the end of Central image reprocessing. When set to 0, messages are sent as fast
// as possible
ReprocessDeploymentsMsgDelay = registerDurationSetting("ROX_REPROCESS_DEPLOYMENTS_MSG_DELAY", 0, WithDurationZeroAllowed())
// DeploymentRiskMaxConcurrency limits how many deployments can have their risk reprocessed
// concurrently across all clusters.
DeploymentRiskMaxConcurrency = RegisterIntegerSetting("ROX_DEPLOYMENT_RISK_MAX_CONCURRENCY", 15).WithMinimum(1).WithMaximum(30)
// DeploymentRiskSemaphoreWaitTime is the maximum time a worker will wait to acquire
// the risk reprocessing semaphore. Setting to zero disables the timeout (workers
// block indefinitely until a slot is available or the sensor disconnects).
DeploymentRiskSemaphoreWaitTime = registerDurationSetting("ROX_DEPLOYMENT_RISK_SEMAPHORE_WAIT_TIME", 2*time.Minute, WithDurationZeroAllowed())
)