From 0cc8d84cb3cb1d69cfaf9409422c7fab1dcdcee7 Mon Sep 17 00:00:00 2001 From: wangyelei Date: Sun, 8 Oct 2023 17:38:49 +0800 Subject: [PATCH] fix: create snapshot failed on GKE --- deploy/helm/templates/dataprotection.yaml | 5 ++++- deploy/helm/templates/deployment.yaml | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/deploy/helm/templates/dataprotection.yaml b/deploy/helm/templates/dataprotection.yaml index 4f589d7cdd2..4c1be2a4460 100644 --- a/deploy/helm/templates/dataprotection.yaml +++ b/deploy/helm/templates/dataprotection.yaml @@ -80,7 +80,10 @@ spec: - name: VOLUMESNAPSHOT value: "true" {{- end }} - {{- if .Capabilities.APIVersions.Has "snapshot.storage.k8s.io/v1beta1" }} + {{- if .Capabilities.APIVersions.Has "snapshot.storage.k8s.io/v1" }} + - name: VOLUMESNAPSHOT_API_BETA + value: "false" + {{- else if .Capabilities.APIVersions.Has "snapshot.storage.k8s.io/v1beta1" }} - name: VOLUMESNAPSHOT_API_BETA value: "true" {{- end }} diff --git a/deploy/helm/templates/deployment.yaml b/deploy/helm/templates/deployment.yaml index 494b9acea5d..04717d0b058 100644 --- a/deploy/helm/templates/deployment.yaml +++ b/deploy/helm/templates/deployment.yaml @@ -89,7 +89,10 @@ spec: - name: VOLUMESNAPSHOT value: "true" {{- end }} - {{- if .Capabilities.APIVersions.Has "snapshot.storage.k8s.io/v1beta1" }} + {{- if .Capabilities.APIVersions.Has "snapshot.storage.k8s.io/v1" }} + - name: VOLUMESNAPSHOT_API_BETA + value: "false" + {{- else if .Capabilities.APIVersions.Has "snapshot.storage.k8s.io/v1beta1" }} - name: VOLUMESNAPSHOT_API_BETA value: "true" {{- end }}