Skip to content

Commit

Permalink
[WIP] increase livenessProbe failure threshold as I'm not sure it sho…
Browse files Browse the repository at this point in the history
…uld return EOF
  • Loading branch information
norbjd committed Apr 7, 2024
1 parent acb1cba commit cfa1b7a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion config/300-gateway.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ spec:
scheme: HTTP
initialDelaySeconds: 10
periodSeconds: 5
failureThreshold: 6
failureThreshold: 40
resources:
requests:
cpu: 200m
Expand Down
11 changes: 10 additions & 1 deletion test/e2e-kind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,15 @@ export "GATEWAY_NAMESPACE_OVERRIDE=${KOURIER_GATEWAY_NAMESPACE}"
echo ">> Change DRAIN_TIME_SECONDS and terminationGracePeriodSeconds for graceful shutdown tests"
export DRAIN_TIME_SECONDS=30
kubectl -n "${KOURIER_GATEWAY_NAMESPACE}" set env deployment 3scale-kourier-gateway DRAIN_TIME_SECONDS="$DRAIN_TIME_SECONDS"
kubectl -n "${KOURIER_GATEWAY_NAMESPACE}" patch deployment/3scale-kourier-gateway -p '{"spec": {"template": {"spec": {"terminationGracePeriodSeconds": 60}}}}'
kubectl -n "${KOURIER_GATEWAY_NAMESPACE}" patch deployment/3scale-kourier-gateway -p '{
"spec": {
"template": {
"spec": {
"terminationGracePeriodSeconds": 60
}
}
}
}'
kubectl -n "${KOURIER_GATEWAY_NAMESPACE}" rollout status deployment/3scale-kourier-gateway --timeout=300s

echo ">> Running graceful shutdown tests"
Expand All @@ -212,3 +220,4 @@ go test -v -race -count=1 -timeout=20m -tags=e2e ./test/gracefulshutdown \
--cluster-suffix="$CLUSTER_SUFFIX"

kubectl -n "${KOURIER_GATEWAY_NAMESPACE}" get pods -l app=3scale-kourier-gateway -o json
kubectl -n "${KOURIER_GATEWAY_NAMESPACE}" logs -l app=3scale-kourier-gateway
4 changes: 2 additions & 2 deletions test/gracefulshutdown/gracefulshutdown_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"context"
"errors"
"fmt"
"io"
"log"
"net/http"
"net/url"
Expand Down Expand Up @@ -163,8 +164,7 @@ func sendRequest(client *http.Client, name string, requestTimeout time.Duration)
resp, err := client.Do(req)
if err != nil {
var errURL *url.Error
if errors.As(err, &errURL) {
log.Printf("sendRequest %s: err: %+v, %+v, %+v, %+v", requestTimeout, errURL.Op, errURL.URL, errURL.Err, errURL.Unwrap())
if errors.As(err, &errURL) && errURL.Unwrap() == io.EOF {

Check failure on line 167 in test/gracefulshutdown/gracefulshutdown_test.go

View workflow job for this annotation

GitHub Actions / style / Golang / Lint

comparing with == will fail on wrapped errors. Use errors.Is to check for a specific error (errorlint)
return 0, nil
}

Expand Down

0 comments on commit cfa1b7a

Please sign in to comment.