buger / goreplay

GoReplay is an open-source tool for capturing and replaying live HTTP traffic into a test environment in order to continuously test your system with real data. It can be used to increase confidence in code deployments, configuration changes and infrastructure changes.
https://goreplay.org
Other
18.53k stars 13 forks source link

failed to run goreplay as sidecar in k8s #1094

Closed yqbjtu closed 2 years ago

yqbjtu commented 2 years ago

I create default goreplay image and add it to may pod as the second container, the yaml is like this

`apiVersion: v1 kind: Pod metadata: name: gindemo spec: containers:

but the goreplay always report the following err: kc logs gindemo -c goreplay flag provided but not defined: -input-raw :8090 Gor is a simple http traffic replication tool written in Go. Its main goal is to replay traffic from production servers to staging and dev environments. Project page: https://github.com/buger/gor Author: leonsbox@gmail.com Current Version: v1.3.0

notes:gostudy/goreplay:1.3.3 is the image official image (I build from the 1.3.3 source code Dockerfile and downlaod gor_1.3.3_mac.tar.gz)

when it run it by docker run directly, it can work and prints some err msg(I used mac m1), the docker is x86 image

docker run -it --rm gostudy/goreplay:1.3.3 --input-raw-track-response --output-file=req.gor --input-raw :8080

yqbjtu commented 2 years ago

just change the args in k8s yaml to the following , it can work(although reports other issue) args: ["-input-raw", ":8090", "--input-raw-track-response", "--output-file=req.gor"]