From fd327bd213d9ec459d69649bdcb384926b6865f2 Mon Sep 17 00:00:00 2001
From: Martin Lowe <martin.lowe@eclipse-foundation.org>
Date: Thu, 21 Mar 2024 16:24:30 -0400
Subject: [PATCH] Add liveness + startup probes to OKD config, update staging
 res limits

---
 src/main/k8s/production.yml | 20 ++++++++++++++++++++
 src/main/k8s/staging.yml    | 28 ++++++++++++++++++++++++----
 2 files changed, 44 insertions(+), 4 deletions(-)

diff --git a/src/main/k8s/production.yml b/src/main/k8s/production.yml
index 7665f54..1fc44cc 100644
--- a/src/main/k8s/production.yml
+++ b/src/main/k8s/production.yml
@@ -41,6 +41,26 @@ spec:
           requests:
             cpu: 200m
             memory: 1Gi
+        startupProbe:
+            httpGet:
+              path: /geoip/q/health
+              port: 8080
+              scheme: HTTP
+            timeoutSeconds: 1
+            initialDelaySeconds: 35
+            periodSeconds: 10
+            successThreshold: 1
+            failureThreshold: 3
+        livenessProbe:
+            httpGet:
+              path: /geoip/q/health
+              port: 8080
+              scheme: HTTP
+            timeoutSeconds: 1
+            initialDelaySeconds: 60
+            periodSeconds: 60
+            successThreshold: 1
+            failureThreshold: 3
 ---
 apiVersion: "v1"
 kind: "Service"
diff --git a/src/main/k8s/staging.yml b/src/main/k8s/staging.yml
index fa23859..d65341e 100644
--- a/src/main/k8s/staging.yml
+++ b/src/main/k8s/staging.yml
@@ -36,11 +36,31 @@ spec:
         - containerPort: 8080
         resources:
           limits:
-            cpu: 500m
-            memory: 1Gi
+            cpu: 300m
+            memory: 512Mi
           requests:
-            cpu: 100m
-            memory: 1Gi
+            cpu: 300m
+            memory: 512Mi
+        startupProbe:
+            httpGet:
+              path: /geoip/q/health
+              port: 8080
+              scheme: HTTP
+            timeoutSeconds: 1
+            initialDelaySeconds: 35
+            periodSeconds: 10
+            successThreshold: 1
+            failureThreshold: 3
+        livenessProbe:
+            httpGet:
+              path: /geoip/q/health
+              port: 8080
+              scheme: HTTP
+            timeoutSeconds: 1
+            initialDelaySeconds: 60
+            periodSeconds: 60
+            successThreshold: 1
+            failureThreshold: 3
 ---
 apiVersion: "v1"
 kind: "Service"
-- 
GitLab