---
apiVersion: apps/v1
kind: Deployment

metadata:
  name: clamav-server
  labels:
    app.kubernetes.io/name: clamav
    app.kubernetes.io/component: server

spec:
  replicas: 1
  revisionHistoryLimit: 3

  strategy:
    type: Recreate

  selector:
    matchLabels:
      app.kubernetes.io/name: clamav
      app.kubernetes.io/component: server

  template:
    metadata:
      labels:
        app.kubernetes.io/name: clamav
        app.kubernetes.io/component: server

    spec:
      enableServiceLinks: false

      containers:
        - name: server
          image: clamav-server
          imagePullPolicy: IfNotPresent

          envFrom:
            - configMapRef:
                name: clamav-server

          ports:
            - name: clamd
              containerPort: 3310
              protocol: TCP
            - name: milter
              containerPort: 7357
              protocol: TCP

          volumeMounts:
            - name: data
              mountPath: /var/lib/clamav

      volumes:
        - name: data
          persistentVolumeClaim:
            claimName: clamav-server

...
