From 076e3ee16d626b89dbac3661cfd365bba50c9bcb Mon Sep 17 00:00:00 2001 From: Rub21 Date: Tue, 4 Jun 2024 11:57:33 -0500 Subject: [PATCH 1/4] Update minute replication liveness --- images/replication-job/liveness.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 images/replication-job/liveness.sh diff --git a/images/replication-job/liveness.sh b/images/replication-job/liveness.sh new file mode 100644 index 00000000..c343c24e --- /dev/null +++ b/images/replication-job/liveness.sh @@ -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 From 4e128e2b81856d473dfad67f89e818189c646910 Mon Sep 17 00:00:00 2001 From: Rub21 Date: Tue, 4 Jun 2024 12:04:45 -0500 Subject: [PATCH 2/4] Add livenessProbe for minute replication --- .../templates/jobs/replication-job-deployment.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/osm-seed/templates/jobs/replication-job-deployment.yaml b/osm-seed/templates/jobs/replication-job-deployment.yaml index afc4ca75..e5295a78 100644 --- a/osm-seed/templates/jobs/replication-job-deployment.yaml +++ b/osm-seed/templates/jobs/replication-job-deployment.yaml @@ -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: 600 + timeoutSeconds: 5 + periodSeconds: 10 + failureThreshold: 3 {{- if .Values.replicationJob.resources.enabled }} resources: requests: From a19ef38122571597430bc51c3631de48df691a34 Mon Sep 17 00:00:00 2001 From: Rub21 Date: Tue, 4 Jun 2024 12:14:29 -0500 Subject: [PATCH 3/4] Update initialDelaySeconds for minute rep --- osm-seed/templates/jobs/replication-job-deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osm-seed/templates/jobs/replication-job-deployment.yaml b/osm-seed/templates/jobs/replication-job-deployment.yaml index e5295a78..fe2ea3a8 100644 --- a/osm-seed/templates/jobs/replication-job-deployment.yaml +++ b/osm-seed/templates/jobs/replication-job-deployment.yaml @@ -28,7 +28,7 @@ spec: - /bin/bash - -c - /liveness.sh - initialDelaySeconds: 600 + initialDelaySeconds: 10 timeoutSeconds: 5 periodSeconds: 10 failureThreshold: 3 From 426098b741ccf7de32f63737e30586577aeea776 Mon Sep 17 00:00:00 2001 From: Rub21 Date: Tue, 4 Jun 2024 12:35:53 -0500 Subject: [PATCH 4/4] Update permission for liveness - minute rep --- images/replication-job/liveness.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 images/replication-job/liveness.sh diff --git a/images/replication-job/liveness.sh b/images/replication-job/liveness.sh old mode 100644 new mode 100755