summaryrefslogtreecommitdiffstats
path: root/kubernetes
diff options
context:
space:
mode:
authorSylvain Desbureaux <sylvain.desbureaux@orange.com>2020-08-26 11:20:31 +0000
committerGerrit Code Review <gerrit@onap.org>2020-08-26 11:20:31 +0000
commit8e13e88b9f88a48e6d9c30cd916086f1efcb333c (patch)
treef6b3a93a087f5e83e633145d8aed40fa4991d290 /kubernetes
parent39459538107999eaa19a4ef21ce27800d1ec3c34 (diff)
parent92154fbcc36e343f1efa689b3828263d081fbf85 (diff)
Merge "Fix cassandra backup."
Diffstat (limited to 'kubernetes')
-rw-r--r--kubernetes/common/cassandra/resources/exec.py4
-rw-r--r--kubernetes/common/cassandra/resources/restore.sh2
-rw-r--r--kubernetes/common/cassandra/templates/backup/cronjob.yaml5
3 files changed, 6 insertions, 5 deletions
diff --git a/kubernetes/common/cassandra/resources/exec.py b/kubernetes/common/cassandra/resources/exec.py
index 5b3ae33371..a7f297399e 100644
--- a/kubernetes/common/cassandra/resources/exec.py
+++ b/kubernetes/common/cassandra/resources/exec.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
import getopt
import logging
import os
@@ -7,7 +7,7 @@ import time
from kubernetes import config
from kubernetes.client import Configuration
-from kubernetes.client.apis import core_v1_api
+from kubernetes.client.api import core_v1_api
from kubernetes.client.rest import ApiException
from kubernetes.stream import stream
diff --git a/kubernetes/common/cassandra/resources/restore.sh b/kubernetes/common/cassandra/resources/restore.sh
index b9deb32316..798ab6c53c 100644
--- a/kubernetes/common/cassandra/resources/restore.sh
+++ b/kubernetes/common/cassandra/resources/restore.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# Initialize variables
ss_dir=""
diff --git a/kubernetes/common/cassandra/templates/backup/cronjob.yaml b/kubernetes/common/cassandra/templates/backup/cronjob.yaml
index e4f2aabfa0..f536be5053 100644
--- a/kubernetes/common/cassandra/templates/backup/cronjob.yaml
+++ b/kubernetes/common/cassandra/templates/backup/cronjob.yaml
@@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
*/}}
+{{- $global := . }}
{{- if .Values.backup.enabled }}
apiVersion: batch/v1beta1
kind: CronJob
@@ -52,7 +53,7 @@ spec:
image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
command:
- - /bin/bash
+ - /bin/sh
- -c
- |
clearSnapshot(){
@@ -237,7 +238,7 @@ spec:
{{- range $i := until (int .Values.replicaCount)}}
- name: data-dir-{{ $i }}
persistentVolumeClaim:
- claimName: {{ include "common.fullname" . }}-data-{{ $i }}
+ claimName: {{ include "common.fullname" $global }}-data-{{ include "common.fullname" $global }}-{{ $i }}
{{- end }}
- name: backup-dir
persistentVolumeClaim: