apiVersion: apps/v1
kind: Deployment
metadata:
  name: dsk-vault-agent
  labels:
    app: dsk-vault-agent
spec:
  replicas: 1
  selector:
    matchLabels:
      app: dsk-vault-agent
  template:
    metadata:
      labels:
        app: dsk-vault-agent
    spec:
      containers:
      - name: vault-agent
        image: vault
        volumeMounts:
        - name: vault-volume
          mountPath: /vault-agent
        - name: config
          mountPath: /vault-agent/conf
        command: [ "vault" ]
        args: [ "agent", "-config=/vault-agent/conf/agent.hcl" ] 
      volumes:
      - name: vault-volume
        persistentVolumeClaim:
          claimName: dsk-vault-test
      - name: config
        configMap:
          name: dsk-vault-agent-config
          items:
            - key: agent.hcl
              path: agent.hcl
            - key: server.tmpl
              path: server.tmpl
            - key: client.tmpl
              path: client.tmpl


