From 74a7b1728bd33751e3eac8d1bed801e701e7329f Mon Sep 17 00:00:00 2001 From: timmiotool <33017641+Tim-Smyth@users.noreply.github.com> Date: Fri, 25 Jan 2019 15:41:17 +0100 Subject: [PATCH] [mysqldump] Only use the bucketname for the permission and not the folder inside (#10896) Signed-off-by: tim.smyth --- stable/mysqldump/Chart.yaml | 2 +- stable/mysqldump/templates/gcpserviceaccount.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stable/mysqldump/Chart.yaml b/stable/mysqldump/Chart.yaml index 8dc519b1d5..24183c210a 100644 --- a/stable/mysqldump/Chart.yaml +++ b/stable/mysqldump/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: 2.0.0 description: A Helm chart to help backup MySQL databases using mysqldump name: mysqldump -version: 2.1.2 +version: 2.1.3 keywords: - mysql - mysqldump diff --git a/stable/mysqldump/templates/gcpserviceaccount.yaml b/stable/mysqldump/templates/gcpserviceaccount.yaml index 35123ea783..543f77c065 100644 --- a/stable/mysqldump/templates/gcpserviceaccount.yaml +++ b/stable/mysqldump/templates/gcpserviceaccount.yaml @@ -14,7 +14,7 @@ spec: serviceAccountDescription: Service account for accessing a storage bucket for mysql backups secretName: {{ template "mysqldump.gcpsecretName" . }} bindings: - - resource: buckets/{{ .Values.upload.googlestoragebucket.bucketname | replace "gs://" "" }} + - resource: buckets/{{ index (splitList "/" (.Values.upload.googlestoragebucket.bucketname | replace "gs://" "")) 0 }} roles: - roles/storage.objectAdmin {{ end }} \ No newline at end of file