kind: Deployment
apiVersion: apps/v1
metadata:
  name: pastebin-scraper
  labels:
    app: pastebinscrape
spec:
  replicas: 1
  selector:
    matchLabels:
      app: pastebinscrape
  template:
    metadata:
      labels:
        app: pastebinscrape
    spec:
      volumes:
        - name: pastes
          persistentVolumeClaim:
            claimName: pastebin-pvc
      containers:
        - name: pastebin-scraper
          image: gclef/pastebin:1.4
          imagePullPolicy: "IfNotPresent"
          volumeMounts:
            - name: pastes
              mountPath: /RAID
          env:
            - name: PASTEBIN_API_KEY
              valueFrom:
                secretKeyRef:
                  name: pastebin-secrets
                  key: PASTEBIN_API_KEY
      imagePullSecrets:
        - name: registrycreds