12345678910111213141516171819202122232425262728293031323334353637383940 |
- {{- if not .Values.server.statefulSet.enabled -}}
- {{- if .Values.server.persistentVolume.enabled -}}
- {{- if not .Values.server.persistentVolume.existingClaim -}}
- apiVersion: v1
- kind: PersistentVolumeClaim
- metadata:
- {{- if .Values.server.persistentVolume.annotations }}
- annotations:
- {{ toYaml .Values.server.persistentVolume.annotations | indent 4 }}
- {{- end }}
- labels:
- {{- include "prometheus.server.labels" . | nindent 4 }}
- name: {{ template "prometheus.server.fullname" . }}
- {{ include "prometheus.namespace" . | indent 2 }}
- spec:
- accessModes:
- {{ toYaml .Values.server.persistentVolume.accessModes | indent 4 }}
- {{- if .Values.server.persistentVolume.storageClass }}
- {{- if (eq "-" .Values.server.persistentVolume.storageClass) }}
- storageClassName: ""
- {{- else }}
- storageClassName: "{{ .Values.server.persistentVolume.storageClass }}"
- {{- end }}
- {{- end }}
- {{- if .Values.server.persistentVolume.volumeBindingMode }}
- volumeBindingMode: "{{ .Values.server.persistentVolume.volumeBindingMode }}"
- {{- end }}
- resources:
- requests:
- storage: "{{ .Values.server.persistentVolume.size }}"
- {{- if .Values.server.persistentVolume.selector }}
- selector:
- {{- toYaml .Values.server.persistentVolume.selector | nindent 4 }}
- {{- end -}}
- {{- if .Values.server.persistentVolume.volumeName }}
- volumeName: "{{ .Values.server.persistentVolume.volumeName }}"
- {{- end -}}
- {{- end -}}
- {{- end -}}
- {{- end -}}
|