apiVersion: batch/v1
kind: Job
metadata:
  name: print-secrets
spec:
  template:
    metadata:
      name: print-secrets
    spec:
      containers:
        - name: lobsters
          image: gcr.io/hightowerlabs/secrets:0.0.1
          imagePullPolicy: Always
          env:
            - name: OSCON_USERNAME
              valueFrom:
                secretKeyRef:
                  name: oscon
                  key: username
            - name: OSCON_PASSWORD
              valueFrom:
                secretKeyRef:
                  name: oscon
                  key: password
          args:
            - "-config=/etc/secrets/config.json"
          volumeMounts:
            - name: oscon-secrets
              mountPath: /etc/secrets
      restartPolicy: Never
      volumes:
        - name: oscon-secrets
          secret:
            secretName: oscon
