blob: 023295bc941460efbb4c64b9be6faba11160282e [file] [log] [blame]
Giorgi Lekveishvili4ec4c022024-08-17 15:09:24 +04001{{- if not (contains "jenkins-home" (quote .Values.persistence.volumes)) }}
2{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
3kind: PersistentVolumeClaim
4apiVersion: v1
5metadata:
6{{- if .Values.persistence.annotations }}
7 annotations:
8{{ toYaml .Values.persistence.annotations | indent 4 }}
9{{- end }}
10 name: {{ template "jenkins.fullname" . }}
11 namespace: {{ template "jenkins.namespace" . }}
12 labels:
Giorgi Lekveishviliea328da2026-07-29 12:15:15 +040013 {{- include "jenkins.labels" . | nindent 4 }}
Giorgi Lekveishvili4ec4c022024-08-17 15:09:24 +040014{{- if .Values.persistence.labels }}
15{{ toYaml .Values.persistence.labels | indent 4 }}
16{{- end }}
17spec:
18{{- if .Values.persistence.dataSource }}
19 dataSource:
20{{ toYaml .Values.persistence.dataSource | indent 4 }}
21{{- end }}
22 accessModes:
23 - {{ .Values.persistence.accessMode | quote }}
24 resources:
25 requests:
26 storage: {{ .Values.persistence.size | quote }}
27{{- if .Values.persistence.storageClass }}
28{{- if (eq "-" .Values.persistence.storageClass) }}
29 storageClassName: ""
30{{- else }}
Giorgi Lekveishviliea328da2026-07-29 12:15:15 +040031 storageClassName: "{{ tpl .Values.persistence.storageClass . }}"
Giorgi Lekveishvili4ec4c022024-08-17 15:09:24 +040032{{- end }}
33{{- end }}
34{{- end }}
35{{- end }}