Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix local dev env with datadog #279

Merged
merged 1 commit into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"}]'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems weird to have app:grpc tbh

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(app:kubehound would seem more logical, or kubehound-ingestor if you want (i would rather have the service named kubehound-ingestor and the app named kubehound)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just put the name of container for the app. Same as all the others labels.
This is only for local dev anyway.


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.

Loading