Skip to content

Commit

Permalink
backup before a container is terminated
Browse files Browse the repository at this point in the history
  • Loading branch information
win5923 authored Feb 1, 2024
1 parent b14bfac commit 813487b
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions charts/palworld/templates/deployments.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down

0 comments on commit 813487b

Please sign in to comment.