#---
#apiVersion: v1
#kind: Service
#  name: kfn
#  namespace: kafka
#spec:
#  ports:
#  - port: 9019
#  selector:
#    app: kfn
#---
#kind: PersistentVolumeClaim
#apiVersion: v1
#metadata:
#  name: kfn-pvc
#  namespace: kafka
#spec:
#  storageClassName: madcore-storage
#  accessModes:
#    - ReadWriteOnce
#  resources:
#    requests:
#      storage: 1Gi
#---
#apiVersion: apps/v1
---
kind: Deployment
apiVersion: apps/v1
metadata:
  name: kfn
  namespace: kafka
spec:
  replicas: 1
  selector:
    matchLabels:
      app: kfn
  template:
    metadata:
      labels:
        app: kfn
    spec:
      containers:
        - name: kfn
          image: madcore/kfn
          command: ["sh", "-c", "ls /opt/gsec; sleep 6000"]
          resources:
            limits:
              cpu: 100m
              memory: 128Mi
            requests:
              cpu: 100m
              memory: 128Mi
          volumeMounts:
          - name: data
            mountPath: /opt/offlineimap
      volumes:
        - name: data
          persistentVolumeClaim:
            claimName: kfn-pvc
