Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix 1password-credentials secret injection
Using the credentials as `OP_SESSION` is confusing, as it requires you to base64 encode the 1password-credentials.json file first. That's on top of having to base64 encode the secret in k8s. This twice base64- encoding is undocumented and unintuitve. Since connect supports reading the credentials from disk, and we already create the volume from the secret anyway, just follow thru and mount the credentials at the expected location. I imagine this was the intent at some point. As a sidebar: it was extra weird to find that `OP_SESSION` has a second use: it can also be used to override the location of `1password-credentials.json`. I would advise separating these into two separate environment variables but that's out of scope for this change. Finally, since we're mounting the file and not _trying_ to double-base64 the data, swap `stringData` for `data` in the secret. Obsoletes pull request #113, fixes issue #163 and issue #94, makes some progress on issue #167.
- Loading branch information