apiVersion: apps/v1
kind: Deployment
metadata:
  name: fava
  labels:
    app: fava
spec:
  replicas: 1
  template:
    metadata:
      name: fava
      labels:
        app: fava
    spec:
      volumes:
        - name: fava-store
          persistentVolumeClaim:
            claimName: fava
      containers:
        - name: fava
          image: yegle/fava
          imagePullPolicy: IfNotPresent
          ports:
            - containerPort: 5000
          volumeMounts:
            - mountPath: "/bean"
              name: fava-store
          env:
            - name: BEANCOUNT_FILE
              value: "/bean/gilman.beancount"
      restartPolicy: Always
  selector:
    matchLabels:
      app: fava
