Open anubhav06 opened 1 year ago
I can build kubevuln
as a standalone (confirmed by checking the endpoints).
I used the snippet of clusterData.json
given in the README, i.e., after replacing the accountID
and clusterName
. And saving the file in the expected location, i.e./etc/config/clusterData.json
{
"gatewayWebsocketURL": "127.0.0.1:8001",
"gatewayRestURL": "127.0.0.1:8002",
"kubevulnURL": "127.0.0.1:8080",
"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": "******"
}
I also tried using another format of the clusterData.json
through the command given below:
kubectl config view -o json
Although, I am unable to build the Docker image from the Dockerfile
.
Thank you for raising this issue. You can either manually edit the path here or contribute a fix :)
@dwertent For a fix, what path should it be looking for?
@anubhav06 @dwertent Please review my PR. Please suggest any improvements. Thank You.
@anubhav06 why do you want to relocate the config, is it specific to your cluster? Maybe we can just drop the documentation instead...
@matthyx The problem was that LoadConfig
was unable to load config file path set by the CONFIG environment variable.
However, as david mentioned, we are able to run it by manually editing the path and then running it.
You can either manually edit the path here
So I believe if we just remove/update the documentation, that works.
Description
As mentioned in the README, we can load config file using the
CONFIG
env. However, we are unable to load config file path using theCONFIG
environment variable. Kubevuln always defaults to searching the config file in the/etc/config
path, even when we define a new path in theCONFIG
env.In order to run kubevuln:
clusterData.json
in the path/etc/config
, the default path where kubevuln searches for it.clusterData.json
, build kubevuln and then run itIf we follow any of the above 2 steps, then I am able to run it locally
Environment
OS:
Ubuntu 20.04.4 LTS
Steps To Reproduce
Method 1:
make
export CONFIG=path/to/clusterData.json
Method 2:
docker run <kubevuln-built-image-name> -e CONFIG=path/to/clusterData.json
Additional Context
Is this an expected behavior or am I missing something?