Skip to content

Commit

Permalink
feat: Add startup probe and simplify liveness and readiness probes
Browse files Browse the repository at this point in the history
  • Loading branch information
brtkwr committed Jan 4, 2024
1 parent 4f5c841 commit fa0e89e
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 29 deletions.
2 changes: 1 addition & 1 deletion charts/unleash-edge/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: unleash-edge
description: A Helm chart for deploying Unleash Edge to kubernetes
icon: https://docs.getunleash.io/img/logo.svg
type: application
version: 2.2.3
version: 2.3.0

appVersion: "v16.0.6"
maintainers:
Expand Down
24 changes: 9 additions & 15 deletions charts/unleash-edge/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,23 +59,17 @@ spec:
- name: http
containerPort: 3063
protocol: TCP
{{- if .Values.livenessProbe.enabled | default true }}
{{- with .Values.startupProbe }}
startupProbe:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.livenessProbe }}
livenessProbe:
httpGet:
path: {{ .Values.livenessProbe.path | default "/internal-backstage/health" }}
port: http
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds | default 30 }}
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds | default 10 }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- if .Values.readinessProbe.enabled | default true}}
{{- with .Values.readinessProbe }}
readinessProbe:
httpGet:
path: {{ .Values.readinessProbe.path | default "/internal-backstage/health" }}
port: http
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds | default 30 }}
timeoutSeconds: {{.Values.readinessProbe.timeoutSeconds | default 10 }}
successThreshold: {{.Values.readinessProbe.successThreshold | default 5 }}
periodSeconds: {{.Values.readinessProbe.periodSeconds | default 10 }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{ with .Values.volumeMounts }}
volumeMounts:
Expand Down Expand Up @@ -108,4 +102,4 @@ spec:
{{- range . }}
- {{ toYaml . | nindent 8 | trim }}
{{- end }}
{{- end }}
{{- end }}
48 changes: 35 additions & 13 deletions charts/unleash-edge/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,19 +73,41 @@ ingress:
# hosts:
#

livenessProbe: {}
# enabled: true
# path: /internal-backstage/health
# initialDelaySeconds: 30
# timeoutSeconds: 10

readinessProbe: {}
# enabled: true
# path: /internal-backstage/health
# initialDelaySeconds: 30
# timeoutSeconds: 10
# periodSeconds: 10
# successThreshold: 5
startupProbe:
exec:
command: ["/unleash-edge", "ready"]
# httpGet:
# path: /internal-backstage/health
# port: http
initialDelaySeconds: 10
timeoutSeconds: 10
periodSeconds: 10
successThreshold: 1
failureThreshold: 10

livenessProbe:
exec:
command: ["/unleash-edge", "health"]
# httpGet:
# path: /internal-backstage/health
# port: http
initialDelaySeconds: 10
timeoutSeconds: 10
periodSeconds: 10
successThreshold: 1
failureThreshold: 5

readinessProbe:
exec:
command: ["/unleash-edge", "health"]
# httpGet:
# path: /internal-backstage/health
# port: http
initialDelaySeconds: 10
timeoutSeconds: 10
periodSeconds: 10
successThreshold: 1
failureThreshold: 1

autoscaling:
enabled: false
Expand Down

0 comments on commit fa0e89e

Please sign in to comment.