Skip to content

Commit 3a5d2bc

Browse files
committed
fix(helm): Fix PVC templating after DefectDojo#13210
Signed-off-by: kiblik <[email protected]>
1 parent fb49ecd commit 3a5d2bc

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

helm/defectdojo/Chart.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,6 @@ dependencies:
3434
# description: Critical bug
3535
annotations:
3636
artifacthub.io/prerelease: "true"
37-
artifacthub.io/changes: ""
37+
artifacthub.io/changes: |
38+
- kind: fixed
39+
description: Broken rendering of media PVC

helm/defectdojo/templates/media-pvc.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
apiVersion: v1
55
kind: PersistentVolumeClaim
66
metadata:
7-
{{- with .Values.extraAnnotations }}
7+
{{- with $.Values.extraAnnotations }}
88
annotations:
99
{{- range $key, $value := . }}
1010
{{ $key }}: {{ quote $value }}
@@ -16,19 +16,19 @@ metadata:
1616
app.kubernetes.io/instance: {{ $.Release.Name }}
1717
app.kubernetes.io/managed-by: {{ $.Release.Service }}
1818
helm.sh/chart: {{ include "defectdojo.chart" $ }}
19-
{{- range $key, $value := .Values.extraLabels }}
19+
{{- range $key, $value := $.Values.extraLabels }}
2020
{{ $key }}: {{ quote $value }}
2121
{{- end }}
2222
name: {{ $fullName }}
23-
namespace: {{ .Release.Namespace }}
23+
namespace: {{ $.Release.Namespace }}
2424
spec:
2525
accessModes:
2626
{{- toYaml .persistentVolumeClaim.accessModes | nindent 4 }}
2727
resources:
2828
requests:
2929
storage: {{ .persistentVolumeClaim.size }}
30-
{{- if .persistentVolumeClaim.storageClassName }}
31-
storageClassName: {{ .persistentVolumeClaim.storageClassName }}
30+
{{- with .persistentVolumeClaim.storageClassName }}
31+
storageClassName: {{ . }}
3232
{{- end }}
3333
{{- end }}
3434
{{- end }}

0 commit comments

Comments
 (0)