From 813487ba71997136d1bbec5e7f0e082bb59397fd Mon Sep 17 00:00:00 2001 From: Blocka Date: Thu, 1 Feb 2024 08:59:32 +0800 Subject: [PATCH] backup before a container is terminated --- charts/palworld/templates/deployments.yaml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/charts/palworld/templates/deployments.yaml b/charts/palworld/templates/deployments.yaml index 314b896c0..de825bfae 100644 --- a/charts/palworld/templates/deployments.yaml +++ b/charts/palworld/templates/deployments.yaml @@ -46,12 +46,8 @@ spec: command: ["/bin/sh", "-c"] args: - | - cont=$(kubectl -n {{ .Values.namespace }} get pods -o=jsonpath='{.items[?(@.metadata.labels.app\.kubernetes\.io/name=="{{ .Release.Name }}-server")].metadata.name}') - function exec_rcon_cmd() { - kubectl exec -n {{ .Values.namespace }} -i pod/$cont rcon-cli "$1" - } - exec_rcon_cmd save - exec_rcon_cmd backup + rcon-cli save + rcon-cli backup resources: {{- with .Values.server.resources }} {{- toYaml . | nindent 12 }}