# Christof Schwarz, 08-sep-2019
# Pod needs a secret to be installed first, which holds the private key used to
# later sign the JWT token. Put this key in a text file called priv.key 
#
# kubectl create secret generic qlikcustom-jwtkey --from-file .\priv.key
#
# to test that the file has been mounted after you created the pod, test
#
# kubectl exec impersonateqseok-pod cat /etc/secrets/priv.key
#

apiVersion: v1
kind: Pod
metadata:
  name: qlikcustom-getjwt
  labels:
    app: impersonateqseok
spec:
  containers:
  - name: impersonate-qseok
    image: qristof/impersonateqseok
    ports: 
    - containerPort: 31974
    volumeMounts:
    - name: secretsvolume
      mountPath: /etc/secrets
      readOnly: true
  volumes:
  - name: secretsvolume
    secret:
      secretName: qlikcustom-jwtkey