sonatype / nxrm3-ha-repository

Repository for YAML configuration files for Nexus Repository Manager High Availability Feature
17 stars 23 forks source link

Add support for a startupProbe #52

Closed renesch-de closed 6 months ago

renesch-de commented 8 months ago

When upgrading Nexus-RM Image versions, a DB-Schema upgrade is scheduled that may take several minutes to complete. If we relied on the default liveness-probe configuration, it is likely that the container will be terminated before this DB transition is complete. Our current solution is to increase the Value of statefulset.livenessProbe.initialDelaySeconds to something like 30 minutes. The side effect of such a setting is, that when a normal reboot occurs and no DB migration is required, we would still have a timeframe of 30 minutes before the probe gets active. A better approach would be to get rid of the initialDelaySeconds values in the liveness and readiness probe and introduce a startup-probe with a default setting of:

spec:
  template:
    spec:
      containers:
        - startupProbe:
            httpGet:
              path: /
              port: 8081
              scheme: HTTP
            failureThreshold: 180
            periodSeconds: 10
renesch-de commented 8 months ago

See Pull Request #53

renesch-de commented 6 months ago

Merged #53