Skip to content

Commit 2b28db3

Browse files
DmitriyStoyanovivanstanev
authored andcommitted
fix: helm upgrade failed with pvc.enabled
Helm upgrade failed with pvc.enabled but without pvc.storageClassName related to Issue: #667
1 parent 2f50c1c commit 2b28db3

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

snyk-monitor/templates/pvc.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,11 @@ spec:
1313
resources:
1414
requests:
1515
storage: {{ .Values.temporaryStorageSize }}
16-
storageClassName: {{ .Values.pvc.storageClassName }}
16+
{{- if .Values.pvc.storageClassName }}
17+
{{- if (eq "-" .Values.pvc.storageClassName) }}
18+
storageClassName: ""
19+
{{- else }}
20+
storageClassName: "{{ .Values.pvc.storageClassName }}"
21+
{{- end }}
22+
{{- end }}
1723
{{- end }}{{- end }}

snyk-monitor/values.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,14 @@ temporaryStorageSize: 50Gi # Applies to PVC too
4040
pvc:
4141
enabled: false
4242
name: snyk-monitor-pvc
43-
storageClassName: null
43+
## snyk-monitor data Persistent Volume Storage Class
44+
## If defined, storageClassName: <storageClass>
45+
## If set to "-", storageClassName: "", which disables dynamic provisioning
46+
## If undefined (the default) or set to null, no storageClassName spec is
47+
## set, choosing the default provisioner. (gp2 on AWS, standard on
48+
## GKE, AWS & OpenStack)
49+
##
50+
# storageClassName: "-"
4451

4552
# Node.js in-container process memory enhancements
4653
envs:

0 commit comments

Comments
 (0)