From f031f77e684fa86e708ccdaf730b8f7394d63ef1 Mon Sep 17 00:00:00 2001 From: liuchengyu Date: Fri, 8 Mar 2024 19:14:35 +0800 Subject: [PATCH] fix: support removing pika instance from codis dashboard before pod stop --- .../kubeblocks_helm/pika/templates/clusterdefinition.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/kubeblocks_helm/pika/templates/clusterdefinition.yaml b/tools/kubeblocks_helm/pika/templates/clusterdefinition.yaml index 537b80453f..80358eaf0a 100644 --- a/tools/kubeblocks_helm/pika/templates/clusterdefinition.yaml +++ b/tools/kubeblocks_helm/pika/templates/clusterdefinition.yaml @@ -70,6 +70,13 @@ spec: args: - "-c" - "/script/admin.sh --register-server;tail -f /dev/null" + lifecycle: + preStop: + exec: + command: + - "/bin/bash" + - "-c" + - "/script/admin.sh --remove-server" - name: etcd workloadType: Stateful characterType: etcd