Skip to content

Commit

Permalink
Minute replication files - liveness check (#332)
Browse files Browse the repository at this point in the history
* Update minute replication liveness

* Add livenessProbe for minute replication

* Update initialDelaySeconds for minute rep

* Update permission for liveness - minute rep
  • Loading branch information
Rub21 authored Jun 10, 2024
1 parent 8cf67bb commit 63842b9
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
9 changes: 9 additions & 0 deletions images/replication-job/liveness.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash
# This is a script for the complex evaluation of whether Osmosis or other processes are running in the container.
if [ $(ps -ef | grep -E 'java' | grep -v grep | wc -l) -ge 1 ]; then
echo "Osmosis is running."
exit 0
else
echo "Osmosis is not running!" 1>&2
exit 1
fi
10 changes: 10 additions & 0 deletions osm-seed/templates/jobs/replication-job-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@ spec:
- name: {{ .Release.Name }}-replication-job-deployment
image: {{ .Values.replicationJob.image.name }}:{{ .Values.replicationJob.image.tag }}
command: ['/start.sh']
livenessProbe:
exec:
command:
- /bin/bash
- -c
- /liveness.sh
initialDelaySeconds: 10
timeoutSeconds: 5
periodSeconds: 10
failureThreshold: 3
{{- if .Values.replicationJob.resources.enabled }}
resources:
requests:
Expand Down

0 comments on commit 63842b9

Please sign in to comment.