From 0bfa32d68d6721cb8f1654a45486cdfd86e60110 Mon Sep 17 00:00:00 2001 From: JJGadgets Date: Sun, 12 Nov 2023 04:10:44 +0800 Subject: [PATCH] fix(tasks/pg/crunchy-restore): ARGS subst DBUSER --- .taskfiles/pg/Taskfile.dist.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.taskfiles/pg/Taskfile.dist.yaml b/.taskfiles/pg/Taskfile.dist.yaml index 4dcff05c..bf06e23e 100644 --- a/.taskfiles/pg/Taskfile.dist.yaml +++ b/.taskfiles/pg/Taskfile.dist.yaml @@ -50,7 +50,9 @@ tasks: DBUSER: sh: |- [[ -n "{{.DBUSER}}" ]] && echo "{{.DBUSER}}" || [[ -n "{{.APP}}" ]] && echo "{{.APP}}" || ( echo "Missing `USER` environment variable for specifying user name!" && exit 1 ) - ARGS: '{{ .ARGS | default "--verbose --verbose --format=c --clean --if-exists --no-owner --role $DBUSER" }}' # TODO: personal defaults, please check and change accordingly if copying this task before running it! + ARGS: # TODO: (for other users) these are my personal defaults, please check and change accordingly if copying this task before running it! + sh: |- + [[ -n "{{.ARGS}}" ]] && echo "{{.ARGS}}" || echo "--verbose --format=c --clean --if-exists --no-owner --role {{.DBUSER}}" CRUNCHY_PRIMARY: sh: |- kubectl get pods -n {{.NS}} -l postgres-operator.crunchydata.com/role=master,postgres-operator.crunchydata.com/cluster={{.PG}} -o jsonpath='{.items[0].metadata.name}'