Skip to content

Commit 39d8cbc

Browse files
authored
Merge pull request #1449 from snyk/staging
RELEASE
2 parents f79a70f + 78bcca7 commit 39d8cbc

File tree

7 files changed

+14
-3
lines changed

7 files changed

+14
-3
lines changed

config.default.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@
2222
"SERVICE_ACCOUNT_API_TOKEN": "",
2323
"DEFAULT_KUBERNETES_UPSTREAM_URL": "https://api.snyk.io/v2/kubernetes-upstream",
2424
"MAX_RETRY_BACKOFF_DURATION_SECONDS": 300,
25-
"USE_KEEPALIVE": true
25+
"USE_KEEPALIVE": true,
26+
"SYSDIG_POLLING_INTERVAL_MINS": 30
2627
}

snyk-monitor/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ helm upgrade --install snyk-monitor snyk-charts/snyk-monitor \
218218

219219
> NOTE: The above command should be executed after installing Sysdig. This will upgrade or install the snyk monitor, to allow the detection of Sysdig in the cluster.
220220
221-
The snyk-monitor will now collect data from Sysdig every 4 hours.
221+
The snyk-monitor will now collect data from Sysdig every 30 mins.
222222

223223
## Setting up proxying ##
224224

snyk-monitor/templates/deployment.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,8 @@ spec:
187187
value: {{ quote .Values.skopeo.compression.level }}
188188
- name: SNYK_WORKERS_COUNT
189189
value: {{ quote .Values.workers.count }}
190+
- name: SNYK_SYSDIG_POLLING_INTERVAL_MINS
191+
value: {{ quote .Values.sysdig.pollingIntervalMins }}
190192
{{- if .Values.sysdig.enabled }}
191193
- name: SNYK_SYSDIG_RISK_SPOTLIGHT_TOKEN
192194
valueFrom:

snyk-monitor/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,8 @@ workers:
157157
sysdig:
158158
enabled: false
159159
secretName: sysdig-eve-secret
160+
# The minumum pollingIntervalMins is 30
161+
pollingIntervalMins: 30
160162

161163
strategy:
162164
type: RollingUpdate

src/common/config.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ config.EXCLUDED_NAMESPACES = loadExcludedNamespaces();
4747
config.WORKERS_COUNT = Number(config.WORKERS_COUNT) || 10;
4848
config.SKOPEO_COMPRESSION_LEVEL = Number(config.SKOPEO_COMPRESSION_LEVEL) || 6;
4949

50+
// 30 mins minimum
51+
if (config.SYSDIG_POLLING_INTERVAL_MINS < 30) {
52+
config.SYSDIG_POLLING_INTERVAL_MINS = 30;
53+
}
54+
5055
// return Sysdig v2 endpoint information
5156
if (
5257
config.SYSDIG_RISK_SPOTLIGHT_TOKEN &&

src/common/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export interface Config {
2222
SERVICE_ACCOUNT_API_TOKEN: string;
2323
DEFAULT_KUBERNETES_UPSTREAM_URL: string;
2424
MAX_RETRY_BACKOFF_DURATION_SECONDS: number;
25+
SYSDIG_POLLING_INTERVAL_MINS: number;
2526

2627
// ----------------------------------------
2728
// Properties injected by Helm (via environment variables) or manually set in code:

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ async function setupSysdigIntegration(): Promise<void> {
100100
}
101101
}, initialInterval).unref();
102102

103-
const interval: number = 4 * 60 * 60 * 1000; // 4 hours in milliseconds
103+
const interval: number = config.SYSDIG_POLLING_INTERVAL_MINS * 60 * 1000; // change to milliseconds
104104
setInterval(async () => {
105105
try {
106106
if (sysdigVersion == sysdigV1) {

0 commit comments

Comments
 (0)