{{- if .Values.enableVolumeSnapshot }}
#Snapshot controller
kind: StatefulSet
apiVersion: apps/v1
metadata:
  name: ebs-snapshot-controller
  namespace: kube-system
spec:
  serviceName: ebs-snapshot-controller
  replicas: 1
  selector:
    matchLabels:
      app: ebs-snapshot-controller
  template:
    metadata:
      labels:
        app: ebs-snapshot-controller
    spec:
      serviceAccount: ebs-snapshot-controller
      containers:
        - name: snapshot-controller
          image: quay.io/k8scsi/snapshot-controller:v2.1.1
          args:
            - --v=5
            - --leader-election=false
{{- end }}
