{{- define "srs.affinity" -}} {{/* 废弃， 不适用此部分 */}}
{{- with .Values.deploy.k8s.affinity }}
nodeAffinity:
  requiredDuringSchedulingIgnoredDuringExecution:
    nodeSelectorTerms:
      - matchExpressions:
        - key: uavcloud.affinity
          operator: In
          values:
            - {{ .node }}
{{- end }}
{{- end }}

{{- define "srs.vol.main" -}}
{{- if eq .Values.apps.srs.storage.class "emptyDir" }}
emptyDir:
  sizeLimit: {{ .Values.apps.srs.storage.size }}
{{- else if eq .Values.apps.srs.storage.class "gfs" }}
persistentVolumeClaim:
  claimName: {{ .Values.apps.srs.storage.pvc }}
{{- end }}
{{- end }}