This repository has been archived and is no longer in active use or maintained, as part of the Kollector component deprecation.
The Kollector component is an in-cluster component of the Kubescape security platform.
It communicates with the Kubernetes API server to collect cluster information and watches for changes in the cluster.
The information sent to the Kubescape SaaS platform.
To build the kollector run: go build .
Load config file using the CONFIG
environment variable
export CONFIG=path/to/clusterData.json
example/clusterData.json
{
"gatewayWebsocketURL": "127.0.0.1:8001",
"gatewayRestURL": "127.0.0.1:8002",
"kubevulnURL": "127.0.0.1:8081",
"kubescapeURL": "127.0.0.1:8080",
"eventReceiverRestURL": "https://report.armo.cloud",
"eventReceiverWebsocketURL": "wss://report.armo.cloud",
"rootGatewayURL": "wss://ens.euprod1.cyberarmorsoft.com/v1/waitfornotification",
"accountID": "*********************",
"clusterName": "******"
}
Check out watch/environmentvariables.go
WAIT_BEFORE_REPORT
: Wait before sending the report to the gateway. Default: 60 seconds. This value is in seconds.
You can use the sample file below to setup your VS code environment for building and debugging purposes.
.vscode/launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch Package",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceRoot}",
"env": {
"NAMESPACE": "kubescape",
"CONFIG": "${workspaceRoot}/.vscode/clusterData.json",
},
"args": [
"-alsologtostderr", "-v=4", "2>&1"
]
}
]
}