Closed jt-dd closed 2 months ago
After testing:
the bucket name should be set in the configs/etc/*.yaml
files, at least commented, to be able to launch the ingestor properly:
# Ingestor configuration (for KHaaS)
# ingestor:
# bucket_name: "<your-bucket>"
The makefile could have a make build-ingestor
command to help building the API CLI
.PHONY: build-ingestor
build-ingestor: ## Build the ingestor API CLI
cd cmd && go build $(BUILD_FLAGS) -o ../bin/kubehound-ingestor kubehound-ingestor/*.go
The launching of the grpc api & the commands you put in the PR description really should be in some readme, we probably even need a whole readme just for KHaas
Adding the grpc client features to kubehound:
./kubehound dump cloud --bucket s3://<yourbucket> --khaas-server "127.0.0.1:9000" --insecure --debug
./kubehound ingest --khaas-server "127.0.0.1:9000" --insecure --run_id 01htmv5zrh188fzntf8v2pc15h --cluster kind-kubehound.test.local
Two options have been added:
khaas-server
: address of the KHaaS server (ip:port)--insecure
: to avoid dealing with the TLS madnessSince this option is shared by 2 sub commands (
ingest
anddump cloud
), we are using thePreRunE
tricks to register the same 2 flags on runtime instead of init time. Cobra does not support this for the moment:Another option has been added to the main command
--debug
to activate debugging mode.Notes:
InitializeKubehoundConfig()
has been fixed (supporting inline and config file)