apiVersion: apps/v1
kind: Deployment
metadata:
  name: bank-crawler
  labels:
    app: bank-crawler
spec:
  replicas: 1
  selector:
    matchLabels:
      app: bank-crawler
  template:
    metadata:
      labels:
        app: bank-crawler
        name: bank-crawler
    spec:
        containers:
          - name: bank-crawler
            image: localhost:32000/crawler:latest
            env:
             - name: GENERAL
               value: $GENERAL
             - name: BCD
               value: $BCD
             - name: BPD
               value: $BPD
             - name: BHD
               value: $BHD
             - name: BDR
               value: $BDR
             - name: APA
               value: $APA
             - name: DBURI
               value: $DBURI
             - name: NATSURI
               value: "nats://nats-svc:4222"
            volumeMounts:
              - name: database
                mountPath: /app/dolardb
        volumes:
          - name: database
            persistentVolumeClaim:
              claimName: bank-crawler-pvc
              
---
 apiVersion: v1
 kind: PersistentVolumeClaim
 metadata:
   name: bank-crawler-pvc
 spec:
   storageClassName: nfs-csi
   accessModes: [ReadWriteMany]
   resources:
     requests:
       storage: 500Mi
