Skip to content

Commit

Permalink
fix!: Use builtin probe endpoints
Browse files Browse the repository at this point in the history
These are `/.backstage/health/v1/readiness` and `/.backstage/health/v1/liveness` and were added in v1.29

Ref: https://backstage.io/docs/releases/v1.29.0#backend-health-service

Signed-off-by: Nikolai Røed Kristiansen <nikolai.kristiansen@remarkable.no>
  • Loading branch information
nikolaik committed Oct 18, 2024
1 parent e7efd3e commit 4da976e
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 20 deletions.
2 changes: 1 addition & 1 deletion charts/backstage/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,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: 1.11.0
version: 2.0.0
7 changes: 3 additions & 4 deletions charts/backstage/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Backstage Helm Chart

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

A Helm chart for deploying a Backstage application
Expand Down Expand Up @@ -135,16 +135,15 @@ Kubernetes: `>= 1.19.0-0`
| backstage.image.tag | Backstage image tag (immutable tags are recommended) | string | `"latest"` |
| backstage.initContainers | Backstage container init containers | list | `[]` |
| backstage.installDir | Directory containing the backstage installation | string | `"/app"` |
| backstage.livenessProbe | Liveness Probe Backstage doesn't provide any health endpoints by default. A simple one can be added like this: https://backstage.io/docs/plugins/observability/#health-checks <br /> Ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes <!-- E.g. livenessProbe: failureThreshold: 3 httpGet: path: /healthcheck port: 7007 scheme: HTTP initialDelaySeconds: 60 periodSeconds: 10 successThreshold: 1 timeoutSeconds: 2 | object | `{}` |
| backstage.livenessProbe | Liveness Probe Backstage doesn't provide any health endpoints by default. A simple one can be added like this: https://backstage.io/docs/plugins/observability/#health-checks <br /> Ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes <!-- E.g. livenessProbe: failureThreshold: 3 httpGet: path: /.backstage/health/v1/liveness port: 7007 scheme: HTTP initialDelaySeconds: 60 periodSeconds: 10 successThreshold: 1 timeoutSeconds: 2 | object | `{"httpGet":{"path":"/.backstage/health/v1/liveness","port":7007,"scheme":"HTTP"}}` |
| backstage.nodeSelector | Node labels for pod assignment <br /> Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector | object | `{}` |
| backstage.podAnnotations | Annotations to add to the backend deployment pods | object | `{}` |
| backstage.podLabels | Labels to add to the backend deployment pods | object | `{}` |
| backstage.podSecurityContext | Security settings for a Pod. The security settings that you specify for a Pod apply to all Containers in the Pod. <br /> Ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod | object | `{}` |
| backstage.readinessProbe | Readiness Probe Backstage doesn't provide any health endpoints by default. A simple one can be added like this: https://backstage.io/docs/plugins/observability/#health-checks <br /> Ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes <!-- E.g. readinessProbe: failureThreshold: 3 httpGet: path: /healthcheck port: 7007 scheme: HTTP initialDelaySeconds: 30 periodSeconds: 10 successThreshold: 2 timeoutSeconds: 2 | object | `{}` |
| backstage.readinessProbe | Readiness Probe Backstage doesn't provide any health endpoints by default. A simple one can be added like this: https://backstage.io/docs/plugins/observability/#health-checks <br /> Ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes <!-- E.g. readinessProbe: failureThreshold: 3 httpGet: path: /.backstage/health/v1/readiness port: 7007 scheme: HTTP initialDelaySeconds: 30 periodSeconds: 10 successThreshold: 2 timeoutSeconds: 2 | object | `{"httpGet":{"path":"/.backstage/health/v1/readiness","port":7007,"scheme":"HTTP"}}` |
| backstage.replicas | Number of deployment replicas | int | `1` |
| backstage.resources | Resource requests/limits <br /> Ref: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#resource-requests-and-limits-of-pod-and-container <!-- E.g. resources: limits: memory: 1Gi cpu: 1000m requests: memory: 250Mi cpu: 100m --> | object | `{}` |
| backstage.revisionHistoryLimit | Define the [count of deployment revisions](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#clean-up-policy) to be kept. May be set to 0 in case of GitOps deployment approach. | int | `10` |
| backstage.startupProbe | Startup Probe Backstage doesn't provide any health endpoints by default. A simple one can be added like this: https://backstage.io/docs/plugins/observability/#health-checks <br /> Ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes <!-- E.g. startupProbe: failureThreshold: 3 httpGet: path: /healthcheck port: 7007 scheme: HTTP initialDelaySeconds: 60 periodSeconds: 10 successThreshold: 1 timeoutSeconds: 2 | object | `{}` |
| backstage.tolerations | Node tolerations for server scheduling to nodes with taints <br /> Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/ | list | `[]` |
| backstage.topologySpreadConstraints | Topology Spread Constraints for pod assignment <br /> Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#pod-topology-spread-constraints | list | `[]` |
| clusterDomain | Default Kubernetes cluster domain | string | `"cluster.local"` |
Expand Down
6 changes: 3 additions & 3 deletions charts/backstage/ci/probes-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ backstage:
readinessProbe:
failureThreshold: 3
httpGet:
path: /healthcheck
path: /.backstage/health/v1/readiness
port: 7007
scheme: HTTP
initialDelaySeconds: 30
Expand All @@ -25,7 +25,7 @@ backstage:
livenessProbe:
failureThreshold: 3
httpGet:
path: /healthcheck
path: /.backstage/health/v1/liveness
port: 7007
scheme: HTTP
initialDelaySeconds: 60
Expand All @@ -35,7 +35,7 @@ backstage:
startupProbe:
failureThreshold: 3
httpGet:
path: /healthcheck
path: /.backstage/health/v1/liveness
port: 7007
scheme: HTTP
initialDelaySeconds: 60
Expand Down
30 changes: 24 additions & 6 deletions charts/backstage/values.schema.tmpl.json
Original file line number Diff line number Diff line change
Expand Up @@ -455,12 +455,18 @@
"title": "Readiness probe",
"description": "Ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/",
"$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/master/_definitions.json#/definitions/io.k8s.api.core.v1.Probe",
"default": {},
"default": {
"httpGet": {
"path": "/.backstage/health/v1/readiness",
"port": 7007,
"scheme": "HTTP"
}
},
"examples": [
{
"failureThreshold": 3,
"httpGet": {
"path": "/healthcheck",
"path": "/.backstage/health/v1/readiness",
"port": 7007,
"scheme": "HTTP"
},
Expand All @@ -475,12 +481,18 @@
"title": "Liveness probe",
"description": "Ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/",
"$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/master/_definitions.json#/definitions/io.k8s.api.core.v1.Probe",
"default": {},
"default": {
"httpGet": {
"path": "/.backstage/health/v1/liveness",
"port": 7007,
"scheme": "HTTP"
}
},
"examples": [
{
"failureThreshold": 3,
"httpGet": {
"path": "/healthcheck",
"path": "/.backstage/health/v1/liveness",
"port": 7007,
"scheme": "HTTP"
},
Expand All @@ -495,12 +507,18 @@
"title": "Startup probe",
"description": "Ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/",
"$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/master/_definitions.json#/definitions/io.k8s.api.core.v1.Probe",
"default": {},
"default": {
"httpGet": {
"path": "/.backstage/health/v1/liveness",
"port": 7007,
"scheme": "HTTP"
}
},
"examples": [
{
"failureThreshold": 3,
"httpGet": {
"path": "/healthcheck",
"path": "/.backstage/health/v1/liveness",
"port": 7007,
"scheme": "HTTP"
},
Expand Down
24 changes: 18 additions & 6 deletions charts/backstage/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -189,14 +189,18 @@ backstage:
# readinessProbe:
# failureThreshold: 3
# httpGet:
# path: /healthcheck
# path: /.backstage/health/v1/readiness
# port: 7007
# scheme: HTTP
# initialDelaySeconds: 30
# periodSeconds: 10
# successThreshold: 2
# timeoutSeconds: 2
readinessProbe: {}
readinessProbe:
httpGet:
path: /.backstage/health/v1/readiness
port: 7007
scheme: HTTP

# -- Liveness Probe
# Backstage doesn't provide any health endpoints by default. A simple one can be added like this: https://backstage.io/docs/plugins/observability/#health-checks
Expand All @@ -205,14 +209,18 @@ backstage:
# livenessProbe:
# failureThreshold: 3
# httpGet:
# path: /healthcheck
# path: /.backstage/health/v1/liveness
# port: 7007
# scheme: HTTP
# initialDelaySeconds: 60
# periodSeconds: 10
# successThreshold: 1
# timeoutSeconds: 2
livenessProbe: {}
livenessProbe:
httpGet:
path: /.backstage/health/v1/liveness
port: 7007
scheme: HTTP

# -- Startup Probe
# Backstage doesn't provide any health endpoints by default. A simple one can be added like this: https://backstage.io/docs/plugins/observability/#health-checks
Expand All @@ -221,14 +229,18 @@ backstage:
# startupProbe:
# failureThreshold: 3
# httpGet:
# path: /healthcheck
# path: /.backstage/health/v1/liveness
# port: 7007
# scheme: HTTP
# initialDelaySeconds: 60
# periodSeconds: 10
# successThreshold: 1
# timeoutSeconds: 2
startupProbe: {}
startupProbe:
httpGet:
path: /.backstage/health/v1/liveness
port: 7007
scheme: HTTP

# -- Security settings for a Pod.
# The security settings that you specify for a Pod apply to all Containers in the Pod.
Expand Down

0 comments on commit 4da976e

Please sign in to comment.