apiVersion: v1 kind: Service metadata: name: clamav namespace: matrix spec: type: ClusterIP selector: app.kubernetes.io/name: clamav ports: - name: clamd port: 3310 protocol: TCP --- apiVersion: apps/v1 kind: Deployment metadata: name: clamav namespace: matrix spec: replicas: 1 strategy: type: Recreate selector: matchLabels: app.kubernetes.io/name: clamav template: metadata: labels: app.kubernetes.io/name: clamav spec: containers: - name: clamav image: clamav/clamav:1.5.3 imagePullPolicy: IfNotPresent ports: - name: clamd containerPort: 3310 volumeMounts: - name: data mountPath: /var/lib/clamav resources: requests: cpu: 100m memory: 1.5Gi limits: memory: 3Gi # clamd needs the full signature DB downloaded (freshclam, can take several # minutes on first start) before it accepts connections - the image's own # healthcheck script accounts for this via a long StartPeriod. livenessProbe: exec: command: ["clamdcheck.sh"] initialDelaySeconds: 60 periodSeconds: 30 failureThreshold: 10 readinessProbe: exec: command: ["clamdcheck.sh"] initialDelaySeconds: 60 periodSeconds: 15 failureThreshold: 20 volumes: - name: data persistentVolumeClaim: claimName: clamav-data