apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ .Release.Name }}
spec:
  selector:
    matchLabels:
      app.kubernetes.io/name: snapdrop
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app.kubernetes.io/name: snapdrop
    spec:
      containers:
      - name: snapdrop
        image: {{ .Values.snapdrop.image }}
        ports:
          - containerPort: 3000
            name: http
        envFrom:
          - configMapRef:
              name: {{ .Release.Name }}-snapdrop
        volumeMounts:
          - mountPath: /config
            name: config
        resources:
          requests:
            memory: "1Gi"
            cpu: "1m"
          limits:
            memory: "4Gi"
            cpu: "4"
      volumes:
      - name: config
        persistentVolumeClaim:
          claimName: {{ .Release.Name }}-config
