apiVersion: batch/v1
kind: Job
metadata:
  name: secret-verify
spec:
  backoffLimit: 1
  template:
    spec:
      containers:
      - name: secret-verify
        image: alpine
        command: ["grep", "password", "/var/secrets/pgpass/.pgpass"]
        volumeMounts:
        - name: pgpass
          mountPath: /var/secrets/pgpass
        env:
        - name: PGPASSFILE
          value: /var/secrets/pgpass/.pgpass
      restartPolicy: Never
      volumes:
      - name: pgpass
        secret:
          secretName: pgpass
          defaultMode: 0600