Skip to content

Commit

Permalink
fix!: Use builtin probe endpoints (#216)
Browse files Browse the repository at this point in the history
* fix!: Use builtin probe endpoints

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 <[email protected]>

* chore(ci): Fix test failures in v1.31

Techdocs needs to be configured in app config.
Point our image-digest test to the v1.31.0 sha

Signed-off-by: Nikolai Røed Kristiansen <[email protected]>

---------

Signed-off-by: Nikolai Røed Kristiansen <[email protected]>
  • Loading branch information
nikolaik authored Oct 22, 2024
1 parent d8e2ab8 commit d77bf20
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 29 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
8 changes: 4 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,16 @@ 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 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 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.startupProbe | Startup Probe Ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes <!-- E.g. startupProbe: 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.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
2 changes: 2 additions & 0 deletions charts/backstage/ci/appConfig-values.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
backstage:
appConfig:
techdocs:
builder: "local"
app:
# Let's test that everything is fine with comments
title: The very best Backstage Helm Chart! :D
Expand Down
2 changes: 1 addition & 1 deletion charts/backstage/ci/image-digest-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ backstage:
image:
registry: ghcr.io
repository: backstage/backstage
digest: "sha256:a384ce618232b5d9908df083e43c294119f4efdc66890d2a8e3bcba9ccd955e9"
digest: "sha256:f9ffa809e2c3f351699129d57edd6e64ca9ea5a4d4dd6339fed1ec80a30bc042"
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
37 changes: 23 additions & 14 deletions charts/backstage/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -183,52 +183,61 @@ backstage:
resources: {}

# -- 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
# Ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes
# <!-- E.g.
# 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
# <br /> Ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes
# Ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes
# <!-- E.g.
# livenessProbe:
# failureThreshold: 3
# httpGet:
# path: /healthcheck
# path: /.backstage/health/v1/liveness
# port: 7007
# scheme: HTTP
# initialDelaySeconds: 60
# periodSeconds: 10
# successThreshold: 1
# timeoutSeconds: 2
livenessProbe: {}

# -- 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
livenessProbe:
httpGet:
path: /.backstage/health/v1/liveness
port: 7007
scheme: HTTP

# -- Startup Probe
# Ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes
# <!-- E.g.
# 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 d77bf20

Please sign in to comment.