{{- if and .Values.enabled.clusterMode .Values.enabled.standaloneMode }}
{{/*  不要用这个，使用统一生成的PVC */}}
{{- $namespace := .Release.Namespace -}}
{{- $applicationName := .Values.appName.clusterMode -}}
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: {{ $applicationName }}
  namespace: {{ $namespace }}
  labels:
    {{- include "uavcloud-middleware.emqx.labels.standard" . | nindent 4 }}
spec:
  storageClassName: {{ .Values.global.storageClass.name }}
  accessModes:
    - {{ .Values.storageClass.accessMode }}
  volumeMode: {{ .Values.storageClass.volumeMode }}
  resources:
    requests:
      storage: {{ .Values.storageClass.resources.requests.storage }}
---
{{- end }}
