Skip to content

Commit db92aff

Browse files
authored
fix(helm): http-server collector preset (#2631)
1 parent bfb8127 commit db92aff

File tree

3 files changed

+6
-15
lines changed

3 files changed

+6
-15
lines changed

deploy/charts/benthos-collector/templates/_helpers.tpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ Create args for the deployment
101101
["-c", "{{ .Values.configFile }}"]
102102
{{- else if .Values.preset }}
103103
{{- if eq .Values.preset "http-server" -}}
104-
["streams", "--no-api", "/etc/benthos/presets/http-server/input.yaml", "/etc/benthos/presets/http-server/output.yaml"]
104+
["-c", "/etc/benthos/presets/http-server/config.yaml"]
105105
{{- else if eq .Values.preset "kubernetes-pod-exec-time" -}}
106106
["-c", "/etc/benthos/presets/kubernetes-pod-exec-time/config.yaml"]
107107
{{- else }}

examples/collectors/http-server/README.md

+3-11
Original file line numberDiff line numberDiff line change
@@ -130,27 +130,19 @@ docker compose --profile seed down -v
130130

131131
## Advanced configuration
132132

133-
For this example to work, Benthos needs to be run in [streams mode](https://www.benthos.dev/docs/guides/streams_mode/about).
134-
135-
_(The reason is that the strong delivery guarantees currently do not permit the HTTP server to reply before events are forwarded to OpenMeter, which may lead to timeouts.
136-
To learn more, watch [this discussion](https://github.com/benthosdev/benthos/discussions/2324).)_
137-
138-
As a result, this example requires two configuration files:
139-
140-
- [input.yaml](/collector/benthos/presets/http-server/input.yaml) contains the configuration of the HTTP server and validation of incoming events.
141-
- [output.yaml](/collector/benthos/presets/http-server/output.yaml) contains the configuration of the OpenMeter output.
133+
- [config.yaml](/collector/benthos/presets/http-server/config.yaml) contains the configuration of the HTTP server, validation of incoming events and the configuration of the OpenMeter output.
142134

143135
Run Benthos with these configuration files:
144136

145137
```shell
146-
benthos streams input.yaml output.yaml
138+
benthos -c config.yaml
147139
```
148140

149141
Check out the configuration files and the [Benthos documentation](https://www.benthos.dev/docs/about) for more details.
150142

151143
## Production use
152144

153145
We are actively working on improving the documentation and the examples.
154-
In the meantime, feel free to contact us [in email](https://us10.list-manage.com/contact-form?u=c7d6a96403a0e5e19032ee885&form_id=fe04a7fc4851f8547cfee56763850e95) or [on Discord](https://discord.gg/nYH3ZQ3Xzq).
146+
In the meantime, feel free to contact us [in email](https://us10.list-manage.com/contact-form?u=c7d6a96403a0e5e19032ee885&form_id=fe04a7fc4851f8547cfee56763850e95).
155147

156148
We are more than happy to help you set up OpenMeter in your production environment.

examples/collectors/http-server/docker-compose.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@ services:
44
forwarder:
55
image: ghcr.io/openmeterio/benthos-collector
66
pull_policy: always
7-
command: streams --no-api /etc/benthos/input.yaml /etc/benthos/output.yaml
7+
command: -c /etc/benthos/config.yaml
88
env_file:
99
- .env
1010
ports:
1111
- 127.0.0.1:4196:4196
1212
volumes:
13-
- ../../../collector/benthos/presets/http-server/input.yaml:/etc/benthos/input.yaml:ro
14-
- ../../../collector/benthos/presets/http-server/output.yaml:/etc/benthos/output.yaml:ro
13+
- ../../../collector/benthos/presets/http-server/config.yaml:/etc/benthos/config.yaml:ro
1514

1615
seeder:
1716
profiles:

0 commit comments

Comments
 (0)