diff --git a/incubator/cassandra/Chart.yaml b/incubator/cassandra/Chart.yaml index c1cbbd01e8..c408f632ca 100644 --- a/incubator/cassandra/Chart.yaml +++ b/incubator/cassandra/Chart.yaml @@ -1,5 +1,5 @@ name: cassandra -version: 0.10.5 +version: 0.11.0 appVersion: 3.11.3 description: Apache Cassandra is a free and open-source distributed database management system designed to handle large amounts of data across many commodity servers, providing diff --git a/incubator/cassandra/README.md b/incubator/cassandra/README.md index b3b19595ac..851f48601c 100644 --- a/incubator/cassandra/README.md +++ b/incubator/cassandra/README.md @@ -129,12 +129,13 @@ The following table lists the configurable parameters of the Cassandra chart and | `backup.enabled` | Enable backup on chart installation | `false` | | `backup.schedule` | Keyspaces to backup, each with cron time | | | `backup.annotations` | Backup pod annotations | iam.amazonaws.com/role: `cain` | -| `backup.image.repo` | Backup image repository | `nuvo/cain` | -| `backup.image.tag` | Backup image tag | `0.4.1` | +| `backup.image.repository` | Backup image repository | `maorfr/cain` | +| `backup.image.tag` | Backup image tag | `0.6.0` | | `backup.extraArgs` | Additional arguments for cain | `[]` | | `backup.env` | Backup environment variables | AWS_REGION: `us-east-1` | | `backup.resources` | Backup CPU/Memory resource requests/limits | Memory: `1Gi`, CPU: `1` | | `backup.destination` | Destination to store backup artifacts | `s3://bucket/cassandra` | +| `backup.google.serviceAccountSecret` | Secret containing credentials if GCS is used as destination | | | `exporter.enabled` | Enable Cassandra exporter | `false` | | `exporter.image.repo` | Exporter image repository | `criteord/cassandra_exporter` | | `exporter.image.tag` | Exporter image tag | `2.0.2` | diff --git a/incubator/cassandra/templates/backup/cronjob.yaml b/incubator/cassandra/templates/backup/cronjob.yaml index fdf6282da7..28d7b14191 100644 --- a/incubator/cassandra/templates/backup/cronjob.yaml +++ b/incubator/cassandra/templates/backup/cronjob.yaml @@ -28,7 +28,7 @@ spec: serviceAccountName: {{ template "cassandra.serviceAccountName" $ }} containers: - name: cassandra-backup - image: "{{ $backup.image.repos }}:{{ $backup.image.tag }}" + image: "{{ $backup.image.repository }}:{{ $backup.image.tag }}" command: ["cain"] args: - backup @@ -42,15 +42,30 @@ spec: - {{ $backup.destination }} {{- with $backup.extraArgs }} {{ toYaml . | indent 12 }} - {{- end }} - {{- with $backup.env }} + {{- end }} env: +{{- if $backup.google.serviceAccountSecret }} + - name: GOOGLE_APPLICATION_CREDENTIALS + value: "/etc/secrets/google/credentials.json" +{{- end }} + {{- with $backup.env }} {{ toYaml . | indent 12 }} {{- end }} {{- with $backup.resources }} resources: {{ toYaml . | indent 14 }} {{- end }} +{{- if $backup.google.serviceAccountSecret }} + volumeMounts: + - name: google-service-account + mountPath: /etc/secrets/google/ +{{- end }} +{{- if $backup.google.serviceAccountSecret }} + volumes: + - name: google-service-account + secret: + secretName: {{ $backup.google.serviceAccountSecret | quote }} +{{- end }} affinity: podAffinity: preferredDuringSchedulingIgnoredDuringExecution: diff --git a/incubator/cassandra/values.yaml b/incubator/cassandra/values.yaml index 6bfae651ac..3991d590ce 100644 --- a/incubator/cassandra/values.yaml +++ b/incubator/cassandra/values.yaml @@ -153,7 +153,7 @@ serviceAccount: hostNetwork: false ## Backup cronjob configuration -## Ref: https://github.com/nuvo/cain +## Ref: https://github.com/maorfr/cain backup: enabled: false @@ -171,11 +171,11 @@ backup: iam.amazonaws.com/role: cain image: - repos: nuvo/cain - tag: 0.4.1 + repository: maorfr/cain + tag: 0.6.0 # Additional arguments for cain - # Ref: https://github.com/nuvo/cain#usage + # Ref: https://github.com/maorfr/cain#usage extraArgs: [] # Add additional environment variables @@ -192,10 +192,14 @@ backup: memory: 1Gi cpu: 1 + # Name of the secret containing the credentials of the service account used by GOOGLE_APPLICATION_CREDENTIALS, as a credentials.json file + # google: + # serviceAccountSecret: + # Destination to store the backup artifacts - # Supported cloud storage services: AWS S3, Minio S3, Azure Blob Storage + # Supported cloud storage services: AWS S3, Minio S3, Azure Blob Storage, Google Cloud Storage # Additional support can added. Visit this repository for details - # Ref: https://github.com/nuvo/skbn + # Ref: https://github.com/maorfr/skbn destination: s3://bucket/cassandra ## Cassandra exported configuration