Skip to content

Commit

Permalink
#2546 - Readiness and Liveliness Probe for workers and Queue consumers (
Browse files Browse the repository at this point in the history
#2550)

- [x] Have the implemented health check created from #1580 and create
readiness and liveliness probe for queue consumers
- [x] Have the implemented health check created from #1580 and create
readiness and liveliness probe for workers

Tested the scenarios with the setting mentioned in the PR for Workers
and queue consumers in dev by manually setting the liveliness and
readiness probe. Tested by making redis and/or postgres down, both the
pods restarted after the recovery successfully.
  • Loading branch information
guru-aot authored Dec 1, 2023
1 parent b0746e1 commit 2b896ea
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 4 deletions.
6 changes: 4 additions & 2 deletions devops/openshift/api-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,15 +169,17 @@ objects:
cpu: ${CPU_REQUEST}
memory: ${MEMORY_REQUEST}
readinessProbe:
failureThreshold: 10
failureThreshold: 3
successThreshold: 1
httpGet:
path: /api/
port: "${{PORT}}"
initialDelaySeconds: 40
periodSeconds: 30
timeoutSeconds: 30
livenessProbe:
failureThreshold: 10
failureThreshold: 3
successThreshold: 1
httpGet:
path: /api/
port: "${{PORT}}"
Expand Down
19 changes: 19 additions & 0 deletions devops/openshift/queue-consumers-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,25 @@ objects:
requests:
cpu: ${CPU_REQUEST}
memory: ${MEMORY_REQUEST}
readinessProbe:
failureThreshold: 3
successThreshold: 1
httpGet:
path: /health/
port: "${{PORT}}"
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 1
livenessProbe:
failureThreshold: 3
successThreshold: 1
httpGet:
path: /health/
port: "${{PORT}}"
scheme: HTTP
initialDelaySeconds: 30
periodSeconds: 30
timeoutSeconds: 1
- apiVersion: v1
kind: Service
metadata:
Expand Down
6 changes: 4 additions & 2 deletions devops/openshift/web-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,17 @@ objects:
cpu: ${CPU_REQUEST}
memory: ${MEMORY_REQUEST}
readinessProbe:
failureThreshold: 5
failureThreshold: 3
successThreshold: 1
httpGet:
path: /
port: "${{PORT}}"
initialDelaySeconds: 20
periodSeconds: 30
timeoutSeconds: 15
livenessProbe:
failureThreshold: 10
failureThreshold: 3
successThreshold: 1
httpGet:
path: /
port: "${{PORT}}"
Expand Down
19 changes: 19 additions & 0 deletions devops/openshift/workers-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,25 @@ objects:
requests:
cpu: ${CPU_REQUEST}
memory: ${MEMORY_REQUEST}
readinessProbe:
failureThreshold: 3
successThreshold: 1
httpGet:
path: /health/
port: "${{PORT}}"
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 1
livenessProbe:
failureThreshold: 3
successThreshold: 1
httpGet:
path: /health/
port: "${{PORT}}"
scheme: HTTP
initialDelaySeconds: 30
periodSeconds: 30
timeoutSeconds: 1
- apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
Expand Down

0 comments on commit 2b896ea

Please sign in to comment.