From c1a13bc190d0aea0d6046389287046ffab33e40e Mon Sep 17 00:00:00 2001 From: Aleksander Mistewicz Date: Thu, 1 Jun 2023 14:47:33 +0000 Subject: [PATCH] Add configuration to run against local mock Signed-off-by: Aleksander Mistewicz --- DEV_GUIDE.md | 6 ++++++ dev-scripts/with-mock.yaml | 24 ++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 dev-scripts/with-mock.yaml diff --git a/DEV_GUIDE.md b/DEV_GUIDE.md index a07765e7..1b1713f1 100644 --- a/DEV_GUIDE.md +++ b/DEV_GUIDE.md @@ -71,6 +71,12 @@ This script will run `mock-hubble` with a set of sample flows from `testdata` di as 10x the rate stored in the sample file. The sample file simply contains output of `hubble observe -o json -f` and can be updated easily. +To connect to the mock, use `with-mock.yaml` configuration: + +``` +./dev-scripts/run-otelcol.sh --config dev-scripts/with-mock.yaml +``` + ## Running `hubble-otel` (standalone) To start Hubble adaptor in standalone mode against a local collector, run: diff --git a/dev-scripts/with-mock.yaml b/dev-scripts/with-mock.yaml new file mode 100644 index 00000000..bcbe7e4f --- /dev/null +++ b/dev-scripts/with-mock.yaml @@ -0,0 +1,24 @@ +receivers: + hubble: + endpoint: http://localhost:4245 # unix:///var/run/cilium/hubble.sock + buffer_size: 10 + include_flow_types: + traces: ["trace"] + tls: + insecure: true + +processors: + batch: + timeout: 30s + send_batch_size: 20 + +exporters: + logging: + loglevel: debug + +service: + pipelines: + traces: + receivers: [hubble] + processors: [batch] + exporters: [logging]