Skip to content

Commit

Permalink
fix: adjust startup, liveness and readiness probes settings (#50)
Browse files Browse the repository at this point in the history
* Adjust startup, liveness and readiness probes settings

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

* Update Chart version

* Update charts/backstage/values.yaml

Co-authored-by: Patrick Knight <[email protected]>
Co-authored-by: Gustavo Lira e Silva <[email protected]>

* Add comment explaining why there is no 'initialDelaySeconds' on both liveness and readiness probes

Co-authored-by: Nick Boldt <[email protected]>

---------

Co-authored-by: Patrick Knight <[email protected]>
Co-authored-by: Gustavo Lira e Silva <[email protected]>
Co-authored-by: Nick Boldt <[email protected]>
  • Loading branch information
4 people authored Dec 13, 2024
1 parent a58aa25 commit f866790
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 10 deletions.
2 changes: 1 addition & 1 deletion charts/backstage/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ sources:
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 2.24.0
version: 2.24.1
2 changes: 1 addition & 1 deletion charts/backstage/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# RHDH Backstage Helm Chart for OpenShift (Community Version)

[![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/rhdh-chart&style=flat-square)](https://artifacthub.io/packages/search?repo=rhdh-chart)
![Version: 2.24.0](https://img.shields.io/badge/Version-2.24.0-informational?style=flat-square)
![Version: 2.24.1](https://img.shields.io/badge/Version-2.24.1-informational?style=flat-square)
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)

A Helm chart for deploying Red Hat Developer Hub.
Expand Down
36 changes: 28 additions & 8 deletions charts/backstage/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,26 +81,46 @@ upstream:
cpu: 1000m
memory: 2.5Gi
ephemeral-storage: 5Gi
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: 30
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
# Both liveness and readiness probes won't be triggered until the startup probe is successful.
# The startup probe is already configured to give enough time for the application to be started.
# So removing the additional delay here allows the readiness probe to be checked right away after the startup probe,
# which helps make the application available faster to the end-user.
# 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
# Both liveness and readiness probes won't be triggered until the startup probe is successful.
# The startup probe is already configured to give enough time for the application to be started.
# So removing the additional delay here allows the liveness probe to be checked right away after the startup probe,
# which helps make the application available faster to the end-user.
# initialDelaySeconds: 60
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 2
timeoutSeconds: 4
extraEnvVars:
- name: BACKEND_SECRET
valueFrom:
Expand Down

0 comments on commit f866790

Please sign in to comment.