apiVersion: v1
kind: Pod
metadata:
  name: secrets-consumer
spec:
  containers:
    - name: secrets-consumer
      image: busybox
      args:
        - /bin/sh
        - -c
        - >
          while true;
          do
            echo "Username: $SECRET_USERNAME";
            echo "Password: $SECRET_PASSWORD";
            sleep 60;
          done
      env:
        - name: SECRET_USERNAME
          valueFrom:
            secretKeyRef:
              name: secret-consumer-service
              key: username
        - name: SECRET_PASSWORD
          valueFrom:
            secretKeyRef:
              name: secret-consumer-service
              key: password
  restartPolicy: Never
