harbor-helm icon indicating copy to clipboard operation
harbor-helm copied to clipboard

Harbor core and jobservice health checks timeouts

Open jowko opened this issue 3 years ago • 9 comments

We are using Harbor Helm Chart 1.6.2 (which contains Harbor v2.2.2) on Kubernetes 1.19. Core and jobservice pods are restarting from time to time because of the timeouts on readiness and liveness probes: core jobservice By default, timeout for health check if 1 second. When I run command below inside containers, sometimes it took a few seconds to respond (in most cases it respond quickly). curl localhost:8080/api/v2.0/ping I don't know what causes random long response time for health checks. But because of the Harbor probe settings (failureThreshold of 2 for core and default 3 for job service), these pods are restarted frequently.

In my opinion, Harbor should either configure bigger timeout for these services our expose configuration via values.yaml for these probes. In helm chart it can be done easily, when in values.yaml we place such section:

core:
  readinessProbe:
    failureThreshold: 2
    periodSeconds: 10

And then in our deployment definition we can put (example copied from my Helm chart, didn't tested for yml validity):

        readinessProbe:
          httpGet:
            path: /api/v2.0/ping
            scheme: {{ include "harbor.component.scheme" . | upper }}
            port: {{ template "harbor.core.containerPort" . }}
          {{- .Values.core.readinessProbe | toYaml | nindent 12 }}

Then any chart user can specify any options he/she wants.

jowko avatar Jun 24 '21 13:06 jowko