Skip to content

Commit 4625407

Browse files
wrighbrvinzscam
andauthored
Add kubernetes startup probe (#139)
* Add kubernetes startup probe Signed-off-by: Brett Wright <[email protected]> * Update charts/backstage/templates/backstage-deployment.yaml Co-authored-by: Vincenzo Scamporlino <[email protected]> Signed-off-by: Brett Wright <[email protected]> * Fixed linting issue Signed-off-by: Brett Wright <[email protected]> --------- Signed-off-by: Brett Wright <[email protected]> Co-authored-by: Vincenzo Scamporlino <[email protected]>
1 parent a79fbc7 commit 4625407

File tree

6 files changed

+52
-2
lines changed

6 files changed

+52
-2
lines changed

Diff for: 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.3.0
41+
version: 1.4.0

Diff for: charts/backstage/README.md

+2-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.3.0](https://img.shields.io/badge/Version-1.3.0-informational?style=flat-square)
5+
![Version: 1.4.0](https://img.shields.io/badge/Version-1.4.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
@@ -143,6 +143,7 @@ Kubernetes: `>= 1.19.0-0`
143143
| backstage.replicas | Number of deployment replicas | int | `1` |
144144
| 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 | `{}` |
145145
| 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` |
146+
| 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 | `{}` |
146147
| backstage.tolerations | Node tolerations for server scheduling to nodes with taints <br /> Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/ | list | `[]` |
147148
| clusterDomain | Default Kubernetes cluster domain | string | `"cluster.local"` |
148149
| commonAnnotations | Annotations to add to all deployed objects | object | `{}` |

Diff for: charts/backstage/ci/probes-values.yaml

+10
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,13 @@ backstage:
1919
periodSeconds: 10
2020
successThreshold: 1
2121
timeoutSeconds: 2
22+
startupProbe:
23+
failureThreshold: 3
24+
httpGet:
25+
path: /healthcheck
26+
port: 7007
27+
scheme: HTTP
28+
initialDelaySeconds: 60
29+
periodSeconds: 10
30+
successThreshold: 1
31+
timeoutSeconds: 2

Diff for: charts/backstage/templates/backstage-deployment.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,9 @@ spec:
113113
{{- if .Values.backstage.livenessProbe }}
114114
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.backstage.livenessProbe "context" $) | nindent 12 }}
115115
{{- end }}
116+
{{- if .Values.backstage.startupProbe }}
117+
startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.backstage.startupProbe "context" $) | nindent 12 }}
118+
{{- end }}
116119
{{- if .Values.backstage.extraEnvVarsSecrets }}
117120
envFrom:
118121
{{- range .Values.backstage.extraEnvVarsSecrets }}

Diff for: charts/backstage/values.schema.json

+20
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,26 @@
408408
}
409409
]
410410
},
411+
"startupProbe": {
412+
"title": "Startup probe",
413+
"description": "Ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/",
414+
"$ref": "https://kubernetesjsonschema.dev/master/_definitions.json#/definitions/io.k8s.api.core.v1.Probe",
415+
"default": {},
416+
"examples": [
417+
{
418+
"failureThreshold": 3,
419+
"httpGet": {
420+
"path": "/healthcheck",
421+
"port": 7007,
422+
"scheme": "HTTP"
423+
},
424+
"initialDelaySeconds": 60,
425+
"periodSeconds": 10,
426+
"successThreshold": 1,
427+
"timeoutSeconds": 2
428+
}
429+
]
430+
},
411431
"podSecurityContext": {
412432
"title": "Security settings for a Pod.",
413433
"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",

Diff for: charts/backstage/values.yaml

+16
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,22 @@ backstage:
190190
# timeoutSeconds: 2
191191
livenessProbe: {}
192192

193+
# -- Startup Probe
194+
# 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
195+
# <br /> Ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes
196+
# <!-- E.g.
197+
# startupProbe:
198+
# failureThreshold: 3
199+
# httpGet:
200+
# path: /healthcheck
201+
# port: 7007
202+
# scheme: HTTP
203+
# initialDelaySeconds: 60
204+
# periodSeconds: 10
205+
# successThreshold: 1
206+
# timeoutSeconds: 2
207+
startupProbe: {}
208+
193209
# -- Security settings for a Pod.
194210
# The security settings that you specify for a Pod apply to all Containers in the Pod.
195211
# <br /> Ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod

0 commit comments

Comments
 (0)