apiVersion: v1
kind: Pod
metadata:
  name: secret-env-pod
  namespace: workshop-ns
spec:
  containers:
  - name: mycontainer
    image: redis
    resources: {}
    env:
      - name: SECRET_USERNAME
        valueFrom:
          secretKeyRef:
            name: dev-db-secret
            key: username
      - name: SECRET_PASSWORD
        valueFrom:
          secretKeyRef:
            name: dev-db-secret
            key: password
    volumeMounts:
    - name: foo
      mountPath: "/etc/foo"
  restartPolicy: Never
  volumes:
  - name: foo
    secret:
      secretName: dev-server-creds
      items:
      - key: access_token.properties
        path: security_cred.properties
        mode: 0777
      - key: certificate.pem
        path: private_tls_cert.pem
        mode: 0777