summaryrefslogtreecommitdiffstats
path: root/kubernetes/common/cassandra
diff options
context:
space:
mode:
authorMarat Salakhutdinov <marat.salakhutdinov@bell.ca>2020-10-13 19:22:15 -0400
committerSylvain Desbureaux <sylvain.desbureaux@orange.com>2020-10-14 12:25:47 +0000
commitbc10e22452b0d073ac65d014137684bd112a4e55 (patch)
treedd0be0e4b5eb327013861a97927df2b638c2102c /kubernetes/common/cassandra
parentc08c8ffa8ec4f063c22e19acdc0a1e23edd4f26f (diff)
[COMMON] More generic Cassandra backup
This patch will fix handling of the backup of cassandra installed with different than "cassandra" common name. Issue-ID: OOM-2596 Signed-off-by: Marat Salakhutdinov <marat.salakhutdinov@bell.ca> Change-Id: Ifff440af79d6626fdbd1c2948795f98aabd167d7
Diffstat (limited to 'kubernetes/common/cassandra')
-rw-r--r--kubernetes/common/cassandra/templates/backup/cronjob.yaml6
1 files changed, 3 insertions, 3 deletions
diff --git a/kubernetes/common/cassandra/templates/backup/cronjob.yaml b/kubernetes/common/cassandra/templates/backup/cronjob.yaml
index 1d1e4594da..cabe59f696 100644
--- a/kubernetes/common/cassandra/templates/backup/cronjob.yaml
+++ b/kubernetes/common/cassandra/templates/backup/cronjob.yaml
@@ -59,7 +59,7 @@ spec:
curr_time=$1
echo "Clearing snapshots!!!"
command="nodetool clearsnapshot -t $curr_time"
- /app/exec.py -p "cassandra" -c "$command"
+ /app/exec.py -p "{{ include "common.name" . }}" -c "$command"
}
{{ $root := . }}
curr_time=`date +%s`
@@ -75,11 +75,11 @@ spec:
echo "Executing cleanup!!"
command="nodetool cleanup"
- /app/exec.py -p "cassandra" -c "$command"
+ /app/exec.py -p "{{ include "common.name" . }}" -c "$command"
echo "Cleaned Node!! Backing up database now!!!"
command="nodetool snapshot -t $curr_time"
- /app/exec.py -p "cassandra" -c "$command"
+ /app/exec.py -p "{{ include "common.name" . }}" -c "$command"
retCode=$?
if [ $retCode -ne 0 ]; then
echo "Backup Failed!!!"