loadtester: release v0.16.0

- update helm to 2.16.5
- update helmv3 to 3.1.2
- remove http server timeouts
This commit is contained in:
stefanprodan
2020-03-31 12:48:16 +03:00
parent b14bcc4a43
commit 3c11749f80
5 changed files with 12 additions and 15 deletions
+2 -2
View File
@@ -5,12 +5,12 @@ RUN apk --no-cache add alpine-sdk perl curl
RUN curl -sSLo hey "https://storage.googleapis.com/hey-release/hey_linux_amd64" && \
chmod +x hey && mv hey /usr/local/bin/hey
RUN HELM2_VERSION=2.16.3 && \
RUN HELM2_VERSION=2.16.5 && \
curl -sSL "https://get.helm.sh/helm-v${HELM2_VERSION}-linux-amd64.tar.gz" | tar xvz && \
chmod +x linux-amd64/helm && mv linux-amd64/helm /usr/local/bin/helm && \
chmod +x linux-amd64/tiller && mv linux-amd64/tiller /usr/local/bin/tiller
RUN HELM3_VERSION=3.1.1 && \
RUN HELM3_VERSION=3.1.2 && \
curl -sSL "https://get.helm.sh/helm-v${HELM3_VERSION}-linux-amd64.tar.gz" | tar xvz && \
chmod +x linux-amd64/helm && mv linux-amd64/helm /usr/local/bin/helmv3
+2 -2
View File
@@ -1,7 +1,7 @@
apiVersion: v1
name: loadtester
version: 0.15.0
appVersion: 0.15.0
version: 0.16.0
appVersion: 0.16.0
kubeVersion: ">=1.11.0-0"
engine: gotpl
description: Flagger's load testing services based on rakyll/hey and bojand/ghz that generates traffic during canary analysis when configured as a webhook.
+1 -1
View File
@@ -11,7 +11,7 @@ import (
"go.uber.org/zap"
)
var VERSION = "0.15.0"
var VERSION = "0.16.0"
var (
logLevel string
port string
+1 -1
View File
@@ -18,7 +18,7 @@ spec:
spec:
containers:
- name: loadtester
image: weaveworks/flagger-loadtester:0.15.0
image: weaveworks/flagger-loadtester:0.16.0
imagePullPolicy: IfNotPresent
ports:
- name: http
+6 -9
View File
@@ -187,11 +187,8 @@ func ListenAndServe(port string, timeout time.Duration, logger *zap.SugaredLogge
mux.HandleFunc("/", HandleNewTask(logger, taskRunner))
srv := &http.Server{
Addr: ":" + port,
Handler: mux,
ReadTimeout: 5 * time.Second,
WriteTimeout: timeout,
IdleTimeout: 15 * time.Second,
Addr: ":" + port,
Handler: mux,
}
// run server in background
@@ -250,11 +247,11 @@ func HandleNewTask(logger *zap.SugaredLogger, taskRunner TaskRunnerInterface) fu
rtnCmdOutput, err = strconv.ParseBool(rtn)
}
// run bats command (blocking task)
// run bash command (blocking task)
if typ == TaskTypeBash {
logger.With("canary", payload.Name).Infof("bats command %s", payload.Metadata["cmd"])
logger.With("canary", payload.Name).Infof("bash command %s", payload.Metadata["cmd"])
bats := BashTask{
bashTask := BashTask{
command: payload.Metadata["cmd"],
logCmdOutput: true,
TaskBase: TaskBase{
@@ -266,7 +263,7 @@ func HandleNewTask(logger *zap.SugaredLogger, taskRunner TaskRunnerInterface) fu
ctx, cancel := context.WithTimeout(context.Background(), taskRunner.Timeout())
defer cancel()
result, err := bats.Run(ctx)
result, err := bashTask.Run(ctx)
if !result.ok {
w.WriteHeader(http.StatusInternalServerError)
w.Write([]byte(err.Error()))