Skip to content

Commit

Permalink
Fix local dev env with datadog (#279)
Browse files Browse the repository at this point in the history
  • Loading branch information
jt-dd authored Oct 9, 2024
1 parent b177c4c commit f802174
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 159 deletions.
2 changes: 1 addition & 1 deletion deployments/kubehound/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ If you want you can also use directly the compose files without `kubehound` bina

## KubeHound as a Service - ingestor - Docker deployment

To deploy KHaaS ingestor services please refer to [docker-deployment](https://kubehound.io/user-guide/khaas-101/#docker-deployment)
To deploy KHaaS ingestor services please refer to [docker-deployment](https://kubehound.io/user-guide/khaas-101/#docker-deployment)
4 changes: 4 additions & 0 deletions deployments/kubehound/docker-compose.dev.ingestor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ services:
- "127.0.0.1:9000:9000"
networks:
- kubenet
env_file:
- kubehound.env
labels:
com.datadoghq.ad.logs: '[{"app": "grpc", "service": "kubehound"}]'

networks:
kubenet:
17 changes: 2 additions & 15 deletions deployments/kubehound/docker-compose.release.ingestor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,8 @@ services:
- "127.0.0.1:9000:9000"
networks:
- kubenet
environment:
# Custom config for docker compose environment
- KH_MONGODB_URL=mongodb://mongodb:27017
- KH_JANUSGRAPH_URL=ws://kubegraph:8182/gremlin
# Default config
- KH_INGESTOR_API_ENDPOINT=0.0.0.0:9000
- KH_INGESTOR_TEMP_DIR=/tmp/kubehound
- KH_INGESTOR_MAX_ARCHIVE_SIZE=2147483648 # 2GB
- KH_INGESTOR_ARCHIVE_NAME=archive.tar.gz
# AWS Bucket configuration
- KH_INGESTOR_REGION=us-east-1
- KH_INGESTOR_BUCKET_URL= # s3://<your_bucket>
- AWS_ACCESS_KEY_ID=
- AWS_SECRET_ACCESS_KEY=
- AWS_SESSION_TOKEN= # for aws-vault generated credentials
env_file:
- kubehound.env

networks:
kubenet:
14 changes: 14 additions & 0 deletions deployments/kubehound/kubehound.env.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Custom config for docker compose environment
KH_MONGODB_URL=mongodb://mongodb:27017
KH_JANUSGRAPH_URL=ws://kubegraph:8182/gremlin
# Default config
KH_INGESTOR_API_ENDPOINT=0.0.0.0:9000
KH_INGESTOR_TEMP_DIR=/tmp/kubehound
KH_INGESTOR_MAX_ARCHIVE_SIZE=2147483648 # 2GB
KH_INGESTOR_ARCHIVE_NAME=archive.tar.gz
# AWS Bucket configuration
KH_INGESTOR_REGION=us-east-1
KH_INGESTOR_BUCKET_URL="" # s3://<your_bucket>
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_SESSION_TOKEN= # for aws-vault generated credentials
2 changes: 1 addition & 1 deletion docs/khaas/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

## Docker deployment

To run the KubeHound as a Service with `docker` just use the following [compose files](https://github.com/DataDog/KubeHound/tree/main/deployments/kubehound):
To run the KubeHound as a Service with `docker` just use the following [compose files](https://github.com/DataDog/KubeHound/tree/main/deployments/kubehound). First you need to set the environment variables in the `kubehound.env` file. There is a template file `kubehound.env.template` that you can use as a reference.

```bash
cd ./deployments/kubehound
Expand Down
142 changes: 0 additions & 142 deletions docs/user-guide/khaas-101.md

This file was deleted.

0 comments on commit f802174

Please sign in to comment.