Skip to content

Commit f79a70f

Browse files
authored
Merge pull request #1446 from snyk/staging
RELEASE
2 parents 3b2dcca + 6deabbb commit f79a70f

File tree

8 files changed

+16
-16
lines changed

8 files changed

+16
-16
lines changed

snyk-monitor/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,13 +199,13 @@ Create the snyk-sysdig-secret in the snyk-monitor namespace:
199199
```bash
200200
kubectl create secret generic snyk-sysdig-secret -n snyk-monitor \
201201
--from-literal=token=$SYSDIG_RISK_SPOTLIGHT_TOKEN \
202-
--from-literal=region=$SYSDIG_AGENT_REGION \
202+
--from-literal=endpoint=$SYSDIG_ENDPOINT_URL \
203203
--from-literal=cluster=$SYSDIG_AGENT_CLUSTER
204204
```
205205
SYSDIG_RISK_SPOTLIGHT_TOKEN is the "Risk Spotlight Integrations Token" and has to be generated via the Sysdig UI. To create this API token, see the
206206
[Sysdig Risk Spotlight guide](https://docs.sysdig.com/en/docs/sysdig-secure/integrations-for-sysdig-secure/risk-spotlight-integrations/#generate-a-token-for-the-integration).
207-
SYSDIG_AGENT_REGION and SYSDIG_AGENT_CLUSTER are the ones that you configured when installing the [On Prem Sysdig Agent](https://docs.sysdig.com/en/docs/installation/agent-install-for-on-prem/#options),
208-
global.sysdig.region and global.clusterConfig.name.
207+
SYSDIG_ENDPOINT_URL is assiciated with your Sysdig SaaS application and region and can be identified from [here](https://docs.sysdig.com/en/docs/administration/saas-regions-and-ip-ranges/) (e.g us2.app.sysdig.com, note that 'https://' prefix has to be omitted).
208+
SYSDIG_AGENT_CLUSTER is the one that you configured when [installing the Sysdig Agent](https://docs.sysdig.com/en/docs/installation/sysdig-secure/install-agent-components/kubernetes/#parameter-definitions) - global.clusterConfig.name.
209209

210210
To enable Snyk to integrate with Sysdig and collect information about packages executed at runtime, use `--set sysdig.enabled=true` when installing the snyk-monitor:
211211

snyk-monitor/templates/deployment.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,11 +194,11 @@ spec:
194194
name: snyk-sysdig-secret
195195
key: token
196196
optional: true
197-
- name: SNYK_SYSDIG_REGION_URL
197+
- name: SNYK_SYSDIG_ENDPOINT_URL
198198
valueFrom:
199199
secretKeyRef:
200200
name: snyk-sysdig-secret
201-
key: region
201+
key: endpoint
202202
optional: true
203203
- name: SNYK_SYSDIG_CLUSTER_NAME
204204
valueFrom:

src/common/config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,12 @@ config.SKOPEO_COMPRESSION_LEVEL = Number(config.SKOPEO_COMPRESSION_LEVEL) || 6;
5050
// return Sysdig v2 endpoint information
5151
if (
5252
config.SYSDIG_RISK_SPOTLIGHT_TOKEN &&
53-
config.SYSDIG_REGION_URL &&
53+
config.SYSDIG_ENDPOINT_URL &&
5454
config.SYSDIG_CLUSTER_NAME
5555
) {
5656
config.SYSDIG_RISK_SPOTLIGHT_TOKEN =
5757
config.SYSDIG_RISK_SPOTLIGHT_TOKEN.trim();
58-
config.SYSDIG_REGION_URL = config.SYSDIG_REGION_URL.trim();
58+
config.SYSDIG_ENDPOINT_URL = config.SYSDIG_ENDPOINT_URL.trim();
5959
config.SYSDIG_CLUSTER_NAME = config.SYSDIG_CLUSTER_NAME.trim();
6060
}
6161

src/common/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export interface Config {
3434
SYSDIG_ENDPOINT?: string;
3535
SYSDIG_TOKEN?: string;
3636
SYSDIG_RISK_SPOTLIGHT_TOKEN?: string;
37-
SYSDIG_REGION_URL?: string;
37+
SYSDIG_ENDPOINT_URL?: string;
3838
SYSDIG_CLUSTER_NAME?: string;
3939
HTTPS_PROXY: string | undefined;
4040
HTTP_PROXY: string | undefined;

src/data-scraper/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const httpsAgent = new HttpsAgent({
1616
function getSysdigUrl(): string {
1717
return (
1818
'https://' +
19-
config.SYSDIG_REGION_URL +
19+
config.SYSDIG_ENDPOINT_URL +
2020
'/api/scanning/eveintegration/v2/runtimeimages'
2121
);
2222
}

src/healthcheck.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ async function healthCheck(): Promise<void> {
2626

2727
export function getSysdigVersion() {
2828
if (
29-
config.SYSDIG_REGION_URL &&
29+
config.SYSDIG_ENDPOINT_URL &&
3030
config.SYSDIG_RISK_SPOTLIGHT_TOKEN &&
3131
config.SYSDIG_CLUSTER_NAME
3232
) {
@@ -43,7 +43,7 @@ async function sysdigHealthCheck(): Promise<void> {
4343
!(
4444
config.SYSDIG_CLUSTER_NAME &&
4545
config.SYSDIG_RISK_SPOTLIGHT_TOKEN &&
46-
config.SYSDIG_REGION_URL
46+
config.SYSDIG_ENDPOINT_URL
4747
) ||
4848
!(config.SYSDIG_ENDPOINT && config.SYSDIG_TOKEN)
4949
) {

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ async function monitor(): Promise<void> {
7171
async function setupSysdigIntegration(): Promise<void> {
7272
if (
7373
!(
74-
config.SYSDIG_REGION_URL &&
74+
config.SYSDIG_ENDPOINT_URL &&
7575
config.SYSDIG_RISK_SPOTLIGHT_TOKEN &&
7676
config.SYSDIG_CLUSTER_NAME
7777
) &&

test/unit/data-scraper/scrape-data.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ import * as transmitterTypes from '../../../src/transmitter/types';
99
describe('dataScraper()', () => {
1010
describe('sysdig v2 env vars configured', () => {
1111
beforeAll(() => {
12-
config.SYSDIG_REGION_URL = 'sysdig';
12+
config.SYSDIG_ENDPOINT_URL = 'sysdig';
1313
config.SYSDIG_RISK_SPOTLIGHT_TOKEN = 'token123';
1414
config.SYSDIG_CLUSTER_NAME = 'test-sysdig-cluster';
1515
});
1616

1717
afterAll(() => {
18-
delete config.SYSDIG_REGION_URL;
18+
delete config.SYSDIG_ENDPOINT_URL;
1919
delete config.SYSDIG_RISK_SPOTLIGHT_TOKEN;
2020
delete config.SYSDIG_CLUSTER_NAME;
2121
});
@@ -137,15 +137,15 @@ describe('dataScraper()', () => {
137137
beforeAll(() => {
138138
config.SYSDIG_ENDPOINT = 'https://sysdig';
139139
config.SYSDIG_TOKEN = 'token123';
140-
config.SYSDIG_REGION_URL = 'sysdig';
140+
config.SYSDIG_ENDPOINT_URL = 'sysdig';
141141
config.SYSDIG_RISK_SPOTLIGHT_TOKEN = 'token123';
142142
config.SYSDIG_CLUSTER_NAME = 'test-sysdig-cluster';
143143
});
144144

145145
afterAll(() => {
146146
delete config.SYSDIG_ENDPOINT;
147147
delete config.SYSDIG_TOKEN;
148-
delete config.SYSDIG_REGION_URL;
148+
delete config.SYSDIG_ENDPOINT_URL;
149149
delete config.SYSDIG_RISK_SPOTLIGHT_TOKEN;
150150
delete config.SYSDIG_CLUSTER_NAME;
151151
});

0 commit comments

Comments
 (0)