Skip to content

Commit d94c8a2

Browse files
jdamatapcc-damatj
andauthored
Add readiness/liveness probes (#101)
* Add readiness/liveness probes Signed-off-by: damatj <[email protected]> * Bump chart yaml version Signed-off-by: damatj <[email protected]> * Fix linting Signed-off-by: damatj <[email protected]> * Fix linting Signed-off-by: damatj <[email protected]> * Description in wrong location Signed-off-by: damatj <[email protected]> * add ci file Signed-off-by: damatj <[email protected]> * run precommit Signed-off-by: damatj <[email protected]> --------- Signed-off-by: damatj <[email protected]> Co-authored-by: damatj <[email protected]>
1 parent 55e0195 commit d94c8a2

File tree

6 files changed

+103
-2
lines changed

6 files changed

+103
-2
lines changed

charts/backstage/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ sources:
3838
# This is the chart version. This version number should be incremented each time you make changes
3939
# to the chart and its templates, including the app version.
4040
# Versions are expected to follow Semantic Versioning (https://semver.org/)
41-
version: 1.0.0
41+
version: 1.1.0

charts/backstage/README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Backstage Helm Chart
33

44
[![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/backstage)](https://artifacthub.io/packages/search?repo=backstage)
5-
![Version: 1.0.0](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square)
5+
![Version: 1.1.0](https://img.shields.io/badge/Version-1.1.0-informational?style=flat-square)
66
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
77

88
A Helm chart for deploying a Backstage application
@@ -134,9 +134,11 @@ Kubernetes: `>= 1.19.0-0`
134134
| backstage.image.tag | Backstage image tag (immutable tags are recommended) | string | `"latest"` |
135135
| backstage.initContainers | Backstage container init containers | list | `[]` |
136136
| backstage.installDir | Directory containing the backstage installation | string | `"/app"` |
137+
| 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 | `{}` |
137138
| backstage.nodeSelector | Node labels for pod assignment <br /> Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector | object | `{}` |
138139
| backstage.podAnnotations | Annotations to add to the backend deployment pods | object | `{}` |
139140
| 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 | `{}` |
141+
| 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 | `{}` |
140142
| backstage.replicas | Number of deployment replicas | int | `1` |
141143
| 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 | `{}` |
142144
| backstage.tolerations | Node tolerations for server scheduling to nodes with taints <br /> Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/ | list | `[]` |
+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
backstage:
2+
readinessProbe:
3+
failureThreshold: 3
4+
httpGet:
5+
path: /healthcheck
6+
port: 7007
7+
scheme: HTTP
8+
initialDelaySeconds: 30
9+
periodSeconds: 10
10+
successThreshold: 2
11+
timeoutSeconds: 2
12+
livenessProbe:
13+
failureThreshold: 3
14+
httpGet:
15+
path: /healthcheck
16+
port: 7007
17+
scheme: HTTP
18+
initialDelaySeconds: 60
19+
periodSeconds: 10
20+
successThreshold: 1
21+
timeoutSeconds: 2

charts/backstage/templates/backstage-deployment.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,12 @@ spec:
103103
{{- if .Values.backstage.resources }}
104104
resources: {{- include "common.tplvalues.render" (dict "value" .Values.backstage.resources "context" $) | nindent 12 }}
105105
{{- end }}
106+
{{- if .Values.backstage.readinessProbe }}
107+
readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.backstage.readinessProbe "context" $) | nindent 12 }}
108+
{{- end }}
109+
{{- if .Values.backstage.livenessProbe }}
110+
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.backstage.livenessProbe "context" $) | nindent 12 }}
111+
{{- end }}
106112
{{- if .Values.backstage.extraEnvVarsSecrets }}
107113
envFrom:
108114
{{- range .Values.backstage.extraEnvVarsSecrets }}

charts/backstage/values.schema.json

+40
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,46 @@
362362
}
363363
]
364364
},
365+
"readinessProbe": {
366+
"title": "Readiness probe",
367+
"description": "Ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/",
368+
"$ref": "https://kubernetesjsonschema.dev/master/_definitions.json#/definitions/io.k8s.api.core.v1.Probe",
369+
"default": {},
370+
"examples": [
371+
{
372+
"failureThreshold": 3,
373+
"httpGet": {
374+
"path": "/healthcheck",
375+
"port": 7007,
376+
"scheme": "HTTP"
377+
},
378+
"initialDelaySeconds": 30,
379+
"periodSeconds": 10,
380+
"successThreshold": 2,
381+
"timeoutSeconds": 2
382+
}
383+
]
384+
},
385+
"livenessProbe": {
386+
"title": "Liveness probe",
387+
"description": "Ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/",
388+
"$ref": "https://kubernetesjsonschema.dev/master/_definitions.json#/definitions/io.k8s.api.core.v1.Probe",
389+
"default": {},
390+
"examples": [
391+
{
392+
"failureThreshold": 3,
393+
"httpGet": {
394+
"path": "/healthcheck",
395+
"port": 7007,
396+
"scheme": "HTTP"
397+
},
398+
"initialDelaySeconds": 60,
399+
"periodSeconds": 10,
400+
"successThreshold": 1,
401+
"timeoutSeconds": 2
402+
}
403+
]
404+
},
365405
"podSecurityContext": {
366406
"title": "Security settings for a Pod.",
367407
"description": "The security settings that you specify for a Pod apply to all Containers in the Pod. Ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod",

charts/backstage/values.yaml

+32
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,38 @@ backstage:
154154
# cpu: 100m -->
155155
resources: {}
156156

157+
# -- Readiness Probe
158+
# 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
159+
# <br /> Ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes
160+
# <!-- E.g.
161+
# readinessProbe:
162+
# failureThreshold: 3
163+
# httpGet:
164+
# path: /healthcheck
165+
# port: 7007
166+
# scheme: HTTP
167+
# initialDelaySeconds: 30
168+
# periodSeconds: 10
169+
# successThreshold: 2
170+
# timeoutSeconds: 2
171+
readinessProbe: {}
172+
173+
# -- Liveness Probe
174+
# 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
175+
# <br /> Ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes
176+
# <!-- E.g.
177+
# livenessProbe:
178+
# failureThreshold: 3
179+
# httpGet:
180+
# path: /healthcheck
181+
# port: 7007
182+
# scheme: HTTP
183+
# initialDelaySeconds: 60
184+
# periodSeconds: 10
185+
# successThreshold: 1
186+
# timeoutSeconds: 2
187+
livenessProbe: {}
188+
157189
# -- Security settings for a Pod.
158190
# The security settings that you specify for a Pod apply to all Containers in the Pod.
159191
# <br /> Ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod

0 commit comments

Comments
 (0)