Skip to content

Commit

Permalink
fix: adjust startup, liveness and readiness probes settings
Browse files Browse the repository at this point in the history
Startup probe settings seem to have been added in the upstream Backstage Chart
in [1], but the current settings do not allow the RHDH Chart for the
liveness probe to be triggered sufficiently enough for the app to be
considered live.
This adjust such settings by accounting for the worst case scenario
where the application might take a bit long to start.

This also aligns the probe endpoints with the upstream chart.

[1] backstage/charts#216
  • Loading branch information
rm3l committed Dec 13, 2024
1 parent 3779ad8 commit b8fe7a1
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ metadata:
categories: Developer Tools
certified: "true"
containerImage: registry-proxy.engineering.redhat.com/rh-osbs/rhdh-rhdh-rhel9-operator:1.3
createdAt: "2024-11-27T12:15:30Z"
createdAt: "2024-12-13T10:42:18Z"
description: Red Hat Developer Hub is a Red Hat supported version of Backstage.
It comes with pre-built plug-ins and configuration settings, supports use of
an external database, and can help streamline the process of setting up a self-managed
Expand Down
28 changes: 20 additions & 8 deletions bundle/rhdh/manifests/rhdh-default-config_v1_configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -251,26 +251,38 @@ data:
type: RuntimeDefault
runAsNonRoot: true
allowPrivilegeEscalation: false
startupProbe:
# This gives enough time upon container startup before the liveness and readiness probes are triggered.
# Giving (120s = initialDelaySeconds + failureThreshold * periodSeconds) to account for the worst case scenario.
httpGet:
path: /.backstage/health/v1/liveness
port: backend
scheme: HTTP
initialDelaySeconds: 60
timeoutSeconds: 4
periodSeconds: 20
successThreshold: 1
failureThreshold: 3
readinessProbe:
failureThreshold: 3
httpGet:
path: /healthcheck
port: 7007
path: /.backstage/health/v1/readiness
port: backend
scheme: HTTP
initialDelaySeconds: 30
#initialDelaySeconds: 30
periodSeconds: 10
successThreshold: 2
timeoutSeconds: 2
timeoutSeconds: 4
livenessProbe:
failureThreshold: 3
httpGet:
path: /healthcheck
port: 7007
path: /.backstage/health/v1/liveness
port: backend
scheme: HTTP
initialDelaySeconds: 60
#initialDelaySeconds: 60
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 2
timeoutSeconds: 4
ports:
- name: backend
containerPort: 7007
Expand Down
28 changes: 20 additions & 8 deletions config/profile/rhdh/default-config/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,26 +96,38 @@ spec:
type: RuntimeDefault
runAsNonRoot: true
allowPrivilegeEscalation: false
startupProbe:
# This gives enough time upon container startup before the liveness and readiness probes are triggered.
# Giving (120s = initialDelaySeconds + failureThreshold * periodSeconds) to account for the worst case scenario.
httpGet:
path: /.backstage/health/v1/liveness
port: backend
scheme: HTTP
initialDelaySeconds: 60
timeoutSeconds: 4
periodSeconds: 20
successThreshold: 1
failureThreshold: 3
readinessProbe:
failureThreshold: 3
httpGet:
path: /healthcheck
port: 7007
path: /.backstage/health/v1/readiness
port: backend
scheme: HTTP
initialDelaySeconds: 30
#initialDelaySeconds: 30
periodSeconds: 10
successThreshold: 2
timeoutSeconds: 2
timeoutSeconds: 4
livenessProbe:
failureThreshold: 3
httpGet:
path: /healthcheck
port: 7007
path: /.backstage/health/v1/liveness
port: backend
scheme: HTTP
initialDelaySeconds: 60
#initialDelaySeconds: 60
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 2
timeoutSeconds: 4
ports:
- name: backend
containerPort: 7007
Expand Down

0 comments on commit b8fe7a1

Please sign in to comment.