From e1e88cf8859068e1cad3de04a55d104399da71f2 Mon Sep 17 00:00:00 2001 From: Naborisk Date: Sun, 17 Sep 2023 18:50:58 +0900 Subject: [PATCH] add liveness check --- charts/shell-bot-concurrent/Chart.yaml | 2 +- charts/shell-bot-concurrent/templates/deployment.yaml | 7 +++++++ charts/shell-bot-concurrent/values.yaml | 4 ++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/charts/shell-bot-concurrent/Chart.yaml b/charts/shell-bot-concurrent/Chart.yaml index b5061d6..27b999d 100644 --- a/charts/shell-bot-concurrent/Chart.yaml +++ b/charts/shell-bot-concurrent/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v2 name: shell-bot-concurrent description: A WIP bot for concurrent social networking platform type: application -version: 0.0.7 +version: 0.0.8 appVersion: "0.0.1" diff --git a/charts/shell-bot-concurrent/templates/deployment.yaml b/charts/shell-bot-concurrent/templates/deployment.yaml index 9cea845..f2e6903 100644 --- a/charts/shell-bot-concurrent/templates/deployment.yaml +++ b/charts/shell-bot-concurrent/templates/deployment.yaml @@ -28,3 +28,10 @@ spec: value: {{ .Values.env.POST_STREAM }} - name: COMMAND_PREFIX value: {{ .Values.env.COMMAND_PREFIX }} + livenessProbe: + exec: + command: + - rm + - /tmp/pong + initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.livenessProbe.periodSeconds }} diff --git a/charts/shell-bot-concurrent/values.yaml b/charts/shell-bot-concurrent/values.yaml index 49ca07e..f546f0c 100644 --- a/charts/shell-bot-concurrent/values.yaml +++ b/charts/shell-bot-concurrent/values.yaml @@ -13,3 +13,7 @@ env: CONCURRENT_HOST: '' POST_STREAM: '' COMMAND_PREFIX: '/sh' + +livenessProbe: + initialDelaySeconds: 6 + periodSeconds: 30