Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
d0g0x01 committed Aug 21, 2023
1 parent c1e865a commit b2b889c
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 10 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: build-kubegraph-mage
name: build-kubegraph-image

on:
workflow_dispatch:
Expand Down Expand Up @@ -61,6 +61,7 @@ jobs:
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
with:
context: ${{ matrix.workdir }}
platforms: linux/amd64,linux/arm64,windows/amd64
file: ${{ matrix.dockerfile }}
push: true
build-args: |
Expand All @@ -74,6 +75,7 @@ jobs:
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
with:
context: ${{ matrix.workdir }}
platforms: linux/amd64,linux/arm64,windows/amd64
file: ${{ matrix.dockerfile }}
push: true
build-args: |
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ ifndef KUBEHOUND_ENV
endif

ifeq (,$(filter $(SYSTEM_TEST_CMD),$(MAKECMDGOALS)))
ifeq (${KUBEHOUND_ENV}, prod)
DOCKER_COMPOSE_FILE_PATH += -f deployments/kubehound/docker-compose.prod.yaml
ifeq (${KUBEHOUND_ENV}, release)
DOCKER_COMPOSE_FILE_PATH += -f deployments/kubehound/docker-compose.release.yaml
else ifeq (${KUBEHOUND_ENV}, dev)
DOCKER_COMPOSE_FILE_PATH += -f deployments/kubehound/docker-compose.dev.yaml
endif
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ Release binaries are available for Linux / Windows / Mac OS via the [releases](h
./kubehound.sh backend-up
```

*NOTE*: you must have [setup GHCR access](https://codefresh.io/docs/docs/integrations/docker-registries/github-container-registry/)

Next choose a target Kubernetes cluster, either:

* Select the targeted cluster via `kubectx` (need to be installed separately)
Expand Down Expand Up @@ -118,13 +120,12 @@ cp deployments/kubehound/.env.tpl deployments/kubehound/.env

Edit the variables (datadog env `DD_*` related and `KUBEHOUND_ENV`):

* `KUBEHOUND_ENV`: `dev` or `prod`
* `KUBEHOUND_ENV`: `dev` or `release`
* `DD_API_KEY`: api key you created from https://app.datadoghq.com/ website

Note:
* `KUBEHOUND_ENV=prod` will use prebuilt image from ghcr.io (:rotating_light: currently NOT supported :rotating_light:)
* `KUBEHOUND_ENV=dev` will build the images locally

* `KUBEHOUND_ENV=dev` will build the images locally (and provide some local debugging containers e.g `mongo-express`)
* `KUBEHOUND_ENV=release` will use prebuilt images from ghcr.io

### Running Kubehound

Expand Down
1 change: 1 addition & 0 deletions deployments/kubehound/docker-compose.dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ services:
- mongodb_data:/data/db

kubegraph:
build: ./kubegraph/
ports:
- "127.0.0.1:8182:8182"
- "127.0.0.1:8099:8099"
Expand Down
2 changes: 1 addition & 1 deletion deployments/kubehound/docker-compose.release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ services:
- mongodb_data:/data/db

kubegraph:
image: ghcr.io/datadog/kubehound/kubehound-graph:latest
image: ghcr.io/datadog/kubehound-graph:latest
ports:
- "127.0.0.1:8182:8182"
- "127.0.0.1:8099:8099"
Expand Down
1 change: 1 addition & 0 deletions deployments/kubehound/docker-compose.testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ services:
ports:
- "127.0.0.1:27018:27017"
kubegraph:
build: ./kubegraph/
ports:
- "127.0.0.1:8183:8182"
networks:
Expand Down
1 change: 0 additions & 1 deletion deployments/kubehound/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ services:
retries: 10

kubegraph:
build: ./kubegraph/
restart: unless-stopped
profiles: ["infra"]
container_name: ${COMPOSE_PROJECT_NAME}-graphdb
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,7 @@
import static org.junit.Assert.assertTrue;

public class KubeHoundDslTest {

/*
* Currently testing handled via project system tests due to additional overhead in building up another KubeHound graph in Java
*/
}

0 comments on commit b2b889c

Please sign in to comment.