Skip to content

Commit 3c11749

Browse files
committed
loadtester: release v0.16.0
- update helm to 2.16.5 - update helmv3 to 3.1.2 - remove http server timeouts
1 parent b14bcc4 commit 3c11749

File tree

5 files changed

+12
-15
lines changed

5 files changed

+12
-15
lines changed

Dockerfile.loadtester

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ RUN apk --no-cache add alpine-sdk perl curl
55
RUN curl -sSLo hey "https://storage.googleapis.com/hey-release/hey_linux_amd64" && \
66
chmod +x hey && mv hey /usr/local/bin/hey
77

8-
RUN HELM2_VERSION=2.16.3 && \
8+
RUN HELM2_VERSION=2.16.5 && \
99
curl -sSL "https://get.helm.sh/helm-v${HELM2_VERSION}-linux-amd64.tar.gz" | tar xvz && \
1010
chmod +x linux-amd64/helm && mv linux-amd64/helm /usr/local/bin/helm && \
1111
chmod +x linux-amd64/tiller && mv linux-amd64/tiller /usr/local/bin/tiller
1212

13-
RUN HELM3_VERSION=3.1.1 && \
13+
RUN HELM3_VERSION=3.1.2 && \
1414
curl -sSL "https://get.helm.sh/helm-v${HELM3_VERSION}-linux-amd64.tar.gz" | tar xvz && \
1515
chmod +x linux-amd64/helm && mv linux-amd64/helm /usr/local/bin/helmv3
1616

charts/loadtester/Chart.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v1
22
name: loadtester
3-
version: 0.15.0
4-
appVersion: 0.15.0
3+
version: 0.16.0
4+
appVersion: 0.16.0
55
kubeVersion: ">=1.11.0-0"
66
engine: gotpl
77
description: Flagger's load testing services based on rakyll/hey and bojand/ghz that generates traffic during canary analysis when configured as a webhook.

cmd/loadtester/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
"go.uber.org/zap"
1212
)
1313

14-
var VERSION = "0.15.0"
14+
var VERSION = "0.16.0"
1515
var (
1616
logLevel string
1717
port string

kustomize/tester/deployment.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ spec:
1818
spec:
1919
containers:
2020
- name: loadtester
21-
image: weaveworks/flagger-loadtester:0.15.0
21+
image: weaveworks/flagger-loadtester:0.16.0
2222
imagePullPolicy: IfNotPresent
2323
ports:
2424
- name: http

pkg/loadtester/server.go

+6-9
Original file line numberDiff line numberDiff line change
@@ -187,11 +187,8 @@ func ListenAndServe(port string, timeout time.Duration, logger *zap.SugaredLogge
187187

188188
mux.HandleFunc("/", HandleNewTask(logger, taskRunner))
189189
srv := &http.Server{
190-
Addr: ":" + port,
191-
Handler: mux,
192-
ReadTimeout: 5 * time.Second,
193-
WriteTimeout: timeout,
194-
IdleTimeout: 15 * time.Second,
190+
Addr: ":" + port,
191+
Handler: mux,
195192
}
196193

197194
// run server in background
@@ -250,11 +247,11 @@ func HandleNewTask(logger *zap.SugaredLogger, taskRunner TaskRunnerInterface) fu
250247
rtnCmdOutput, err = strconv.ParseBool(rtn)
251248
}
252249

253-
// run bats command (blocking task)
250+
// run bash command (blocking task)
254251
if typ == TaskTypeBash {
255-
logger.With("canary", payload.Name).Infof("bats command %s", payload.Metadata["cmd"])
252+
logger.With("canary", payload.Name).Infof("bash command %s", payload.Metadata["cmd"])
256253

257-
bats := BashTask{
254+
bashTask := BashTask{
258255
command: payload.Metadata["cmd"],
259256
logCmdOutput: true,
260257
TaskBase: TaskBase{
@@ -266,7 +263,7 @@ func HandleNewTask(logger *zap.SugaredLogger, taskRunner TaskRunnerInterface) fu
266263
ctx, cancel := context.WithTimeout(context.Background(), taskRunner.Timeout())
267264
defer cancel()
268265

269-
result, err := bats.Run(ctx)
266+
result, err := bashTask.Run(ctx)
270267
if !result.ok {
271268
w.WriteHeader(http.StatusInternalServerError)
272269
w.Write([]byte(err.Error()))

0 commit comments

Comments
 (0)