Fix 1password-credentials secret injection #193
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 of1password-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
fordata
in the secret.Obsoletes pull request #113, fixes issue #163 and issue #94, makes some progress on issue #167.