title: sourcing vault secrets file with lifecycle.postStart and readinessProbe
body: <p>I am trying to <code>source</code> a file from <code>/vault/secrets/cloudquery</code> which contains data that looks like this:</p>
  <pre><code>export MYSECRET=&quot;REDACTED&quot;
  </code></pre>
  <p>I have tried a ton of different things to source the vault secrets file when my pod starts up, but when I shell into the pod, I don't see the env variables set. Can anyone point out what I'm doing wrong? Thank you!!</p>
  <pre><code>apiVersion: apps/v1
  kind: Deployment
    ...
  spec:
    ...
    template:
      metadata:
      ...
        annotations:
          vault.hashicorp.com/role: default
          vault.hashicorp.com/agent-inject: 'true'
          vault.hashicorp.com/agent-inject-secret-cloudquery: &quot;path/to/mysecret&quot;
          vault.hashicorp.com/agent-inject-template-cloudquery: |
            {{ with secret &quot;path/to/mysecret&quot; -}}
              export MYSECRET=&quot;{{ .Data.MYSECRET }}&quot;
            {{- end }}
      spec:
        containers:
          - name: cloudquery
            ...
            readinessProbe:
              exec:
                command: [ &quot;/bin/sh&quot;, &quot;-c&quot;, &quot;test -e /vault/secrets/cloudquery&quot; ]
              initialDelaySeconds: 30
              periodSeconds: 30
              timeoutSeconds: 10
              failureThreshold: 5
            lifecycle:
              postStart:
                exec:
                  command:
                    - &quot;/bin/sh&quot;
                    - &quot;-c&quot;
                    - &quot;source /vault/secrets/cloudquery&quot;
  ...
  </code></pre>