diff --git a/charts/pubcode/templates/api/templates/deployment.yml b/charts/pubcode/templates/api/templates/deployment.yml index a8b0fc69..5a04a3cd 100644 --- a/charts/pubcode/templates/api/templates/deployment.yml +++ b/charts/pubcode/templates/api/templates/deployment.yml @@ -69,6 +69,10 @@ spec: resources: {{- toYaml $c.resources | nindent 12 }} {{- end }} + {{- if $c.startupProbe }} + startupProbe: + {{- toYaml $c.startupProbe | nindent 12 }} + {{- end }} {{- if $c.readinessProbe }} readinessProbe: {{- toYaml $c.readinessProbe | nindent 12 }} diff --git a/charts/pubcode/templates/database/templates/sfs.yml b/charts/pubcode/templates/database/templates/sfs.yml index b2275b62..5c3da8d3 100644 --- a/charts/pubcode/templates/database/templates/sfs.yml +++ b/charts/pubcode/templates/database/templates/sfs.yml @@ -79,6 +79,10 @@ spec: resources: {{- toYaml $c.resources | nindent 12 }} {{- end }} + {{- if $c.startupProbe }} + startupProbe: + {{- toYaml $c.startupProbe | nindent 12 }} + {{- end }} {{- if $c.readinessProbe }} readinessProbe: {{- toYaml $c.readinessProbe | nindent 12 }} diff --git a/charts/pubcode/templates/frontend/templates/deployment.yaml b/charts/pubcode/templates/frontend/templates/deployment.yaml index 85c1057e..5a7a05aa 100644 --- a/charts/pubcode/templates/frontend/templates/deployment.yaml +++ b/charts/pubcode/templates/frontend/templates/deployment.yaml @@ -75,6 +75,10 @@ spec: resources: {{- toYaml $c.resources | nindent 12 }} {{- end }} + {{- if $c.startupProbe }} + startupProbe: + {{- toYaml $c.startupProbe | nindent 12 }} + {{- end }} {{- if $c.readinessProbe }} readinessProbe: {{- toYaml $c.readinessProbe | nindent 12 }} diff --git a/charts/pubcode/values.yaml b/charts/pubcode/values.yaml index 8ab460fb..6aac4634 100644 --- a/charts/pubcode/values.yaml +++ b/charts/pubcode/values.yaml @@ -48,6 +48,13 @@ api: memory: 100Mi limits: memory: 4Gi + startupProbe: + httpGet: + path: /api/pub-code/health + port: 3000 + scheme: HTTP + periodSeconds: 5 + failureThreshold: 72 # 6 minutes: the API listens only after MongoDB, which may take 5, is up readinessProbe: httpGet: path: /api/pub-code/health @@ -149,6 +156,13 @@ frontend: memory: 50Mi limits: memory: 4Gi + startupProbe: + httpGet: + path: /health + port: 3001 + scheme: HTTP + periodSeconds: 5 + failureThreshold: 30 readinessProbe: httpGet: path: /health @@ -267,6 +281,11 @@ database: memory: 150Mi limits: memory: 4Gi + startupProbe: + tcpSocket: + port: 27017 + periodSeconds: 10 + failureThreshold: 30 readinessProbe: tcpSocket: port: 27017