Skip to content

Commit

Permalink
fix: remove startup probe
Browse files Browse the repository at this point in the history
In some cases the Redis pod isn't reachable by Connaisseur, which results in Connaisseur never starting up even though it could perform its task even without the Redis pod. Thus the startup probe for Connaisseur, trying to reach the Redis pod was removed.
  • Loading branch information
phbelitz committed May 24, 2024
1 parent 36050f6 commit 0d48e14
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 75 deletions.
7 changes: 0 additions & 7 deletions charts/connaisseur/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,6 @@ spec:
path: /ready
port: https
scheme: HTTPS
startupProbe:
httpGet:
path: /start
port: https
scheme: HTTPS
periodSeconds: 5
failureThreshold: 30
securityContext:
{{- toYaml .Values.kubernetes.deployment.securityContext | nindent 12 }}
resources:
Expand Down
1 change: 0 additions & 1 deletion cmd/connaisseur/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ func startServer(config *config.Config, alerting *alerting.Config) {
mux.HandleFunc("/health", handler.HandleHealth)
mux.HandleFunc("/ready", handler.HandleHealth)
mux.HandleFunc("/mutate", handler.HandleMutate)
mux.HandleFunc("/start", handler.HandleStart)
mux.HandleFunc("/metrics", promhttp.Handler().ServeHTTP)

cache := caching.NewCacher()
Expand Down
25 changes: 0 additions & 25 deletions internal/handler/start.go

This file was deleted.

42 changes: 0 additions & 42 deletions internal/handler/start_test.go

This file was deleted.

4 changes: 4 additions & 0 deletions internal/handler/validation/skip.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"context"
"encoding/json"
"fmt"
"strings"

"github.com/sirupsen/logrus"
)
Expand Down Expand Up @@ -106,6 +107,9 @@ func getCachedDigest(

val, err := cache.Get(ctx, img.OriginalString())
if err != nil {
if strings.Contains(err.Error(), "dial tcp") {
logrus.Warnf("error connecting to cache: %s", err)
}
return "", nil, fmt.Errorf("cache miss for image %s: %s", img.OriginalString(), err)
}

Expand Down

0 comments on commit 0d48e14

Please sign in to comment.