From 761d8a7b91552c81bf4d9da2e298a8696de2d6bf Mon Sep 17 00:00:00 2001
From: "egon w. stemle" <egon.stemle@eurac.edu>
Date: Wed, 25 Sep 2019 15:59:47 +0200
Subject: [PATCH] Fix cron subprocess terminates silently

We noticed the subprocess that runs our 'cron' sometimes quits silently;
one possibility we see is that OOM kills it. In any case, we now also
check for the existence of the commands `sleep` or `timeout` in the
process table (`ps`) via the `livenessProbe`.

Address #60
---
 kubernetes/dspace-deployment.yaml | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/kubernetes/dspace-deployment.yaml b/kubernetes/dspace-deployment.yaml
index 7cdf8a8..493d248 100644
--- a/kubernetes/dspace-deployment.yaml
+++ b/kubernetes/dspace-deployment.yaml
@@ -74,6 +74,11 @@ spec:
             path: /repository/xmlui/
             port: 443
             scheme: HTTPS
+          exec:
+            command:
+              - /bin/sh
+              - -c
+              - ps aux | grep -v grep | grep -E "sleep|timeout"
           initialDelaySeconds: 600
           periodSeconds: 15
           timeoutSeconds: 3
-- 
GitLab