Skip to content

Commit

Permalink
refactored how liveness and startup probes are structured to get more…
Browse files Browse the repository at this point in the history
… predictable deployments
  • Loading branch information
CommanderStorm committed Nov 13, 2023
1 parent dc14ff5 commit e8d1bd5
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ spec:
httpGet:
path: /api/calendar/status
port: calendar
failureThreshold: 2
periodSeconds: 10
failureThreshold: 5
periodSeconds: 1
startupProbe:
httpGet:
path: /api/calendar/status
port: calendar
failureThreshold: 60
failureThreshold: 240
periodSeconds: 1
2 changes: 1 addition & 1 deletion deployment/k3s/templates/deployments/data-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ spec:
httpGet:
path: /cdn/health
port: http
failureThreshold: 3
failureThreshold: 5
periodSeconds: 1
startupProbe:
httpGet:
Expand Down
4 changes: 2 additions & 2 deletions deployment/k3s/templates/deployments/feedback-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ spec:
httpGet:
path: /api/feedback/status
port: feedback
failureThreshold: 2
failureThreshold: 5
periodSeconds: 1
startupProbe:
httpGet:
path: /api/feedback/status
port: feedback
failureThreshold: 6
failureThreshold: 60
periodSeconds: 1
{{ if or (.Values.server.GITHUB_TOKEN) (.Values.server.JWT_KEY) }}
---
Expand Down
27 changes: 15 additions & 12 deletions deployment/k3s/templates/deployments/server-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,14 @@ spec:
httpGet:
path: /api/status
port: api
failureThreshold: 1
failureThreshold: 5
periodSeconds: 1
startupProbe:
httpGet:
path: /api/status
port: api
failureThreshold: 60
failureThreshold: 240
initialDelaySeconds: 30
periodSeconds: 1
- name: mieli-search
image: {{ $.Values.mielisearch.image.repository }}:{{ $.Values.mielisearch.image.tag }}
Expand All @@ -97,24 +98,26 @@ spec:
memory: {{ if eq "nav.tum.de" $.Values.url }}200Mi{{ else }}50Mi{{ end }}
limits:
memory: 500Mi
startupProbe:
livenessProbe:
httpGet:
path: /health
port: http
periodSeconds: 1
initialDelaySeconds: 20
failureThreshold: 240
readinessProbe:
failureThreshold: 2
periodSeconds: 10
startupProbe:
httpGet:
path: /health
port: http
periodSeconds: 10
livenessProbe:
periodSeconds: 1
initialDelaySeconds: 10
failureThreshold: 60
readinessProbe:
httpGet:
path: /health
port: http
periodSeconds: 10
{{ if $.Values.server.MEILI_MASTER_KEY }}
failureThreshold: 2
{{ if $.Values.server.MEILI_MASTER_KEY }}
---
apiVersion: v1
kind: Secret
Expand All @@ -127,6 +130,6 @@ metadata:
app.kubernetes.io/name: api
data:
{{ if $.Values.server.MEILI_MASTER_KEY }}
MEILI_MASTER_KEY: {{ $.Values.server.MEILI_MASTER_KEY }}
MEILI_MASTER_KEY: {{ $.Values.server.MEILI_MASTER_KEY }}
{{ end }}
{{ end }}
{{ end }}

0 comments on commit e8d1bd5

Please sign in to comment.