From bcd01d0690fb8d29423cd401ee0910824259451a Mon Sep 17 00:00:00 2001 From: "Akihiko (Aki) Kuroda" <16141898+akihikokuroda@users.noreply.github.com> Date: Thu, 11 Apr 2024 16:56:15 -0400 Subject: [PATCH] Make storage class name helm variable (#1275) * make storage class name helm variable --- charts/quantum-serverless/templates/pvcs.yaml | 14 +++++++------- charts/quantum-serverless/values.yaml | 8 ++++---- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/charts/quantum-serverless/templates/pvcs.yaml b/charts/quantum-serverless/templates/pvcs.yaml index 477e69f4b..454b5bcd0 100644 --- a/charts/quantum-serverless/templates/pvcs.yaml +++ b/charts/quantum-serverless/templates/pvcs.yaml @@ -1,8 +1,8 @@ -{{ if and (eq .Values.platform "kind") (eq .Values.cosEnable false) }} +{{ if eq .Values.platform "kind" }} apiVersion: v1 kind: PersistentVolumeClaim metadata: - name: {{ .Values.cos.claimName }} + name: {{ .Values.claimName }} spec: storageClassName: standard accessModes: @@ -10,11 +10,11 @@ spec: resources: requests: storage: 1Gi -{{ else if and (eq .Values.platform "ibm") .Values.cosEnable }} +{{ else if eq .Values.platform "ibm" }} apiVersion: v1 kind: PersistentVolumeClaim metadata: - name: {{ .Values.cos.claimName }} + name: {{ .Values.claimName }} annotations: ibm.io/auto-create-bucket: "false" ibm.io/auto-delete-bucket: "false" @@ -29,7 +29,7 @@ spec: resources: requests: storage: {{ .Values.cos.storageSize | quote }} - storageClassName: {{ .Values.cos.storageClassName | quote }} + storageClassName: {{ .Values.storageClassName | quote }} {{ else }} apiVersion: v1 kind: PersistentVolume @@ -51,9 +51,9 @@ spec: apiVersion: v1 kind: PersistentVolumeClaim metadata: - name: {{ .Values.cos.claimName }} + name: {{ .Values.claimName }} spec: - storageClassName: manual + storageClassName: {{ .Values.storageClassName | quote }} accessModes: - ReadWriteMany resources: diff --git a/charts/quantum-serverless/values.yaml b/charts/quantum-serverless/values.yaml index f563f2e4f..3cb969040 100644 --- a/charts/quantum-serverless/values.yaml +++ b/charts/quantum-serverless/values.yaml @@ -128,14 +128,14 @@ postgresql: password: serverlesspassword # =================== -# COS +# PVC # =================== -cosEnable: false +storageClassName: manual +claimName: gateway-claim + cos: bucket: BUCKETNAME-CHANGEME - claimName: gateway-claim endpoint: ENDPOINT-CHANGEME secretName: SECRETNAME-CHANGEME - storageClassName: STORAGECLASSNAME-CHANGEME storageSize: 10Gi