This repository has been archived by the owner on Jul 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 404
refactor: make kv backend more generic #206
Merged
Flydiverny
merged 4 commits into
external-secrets:master
from
Flydiverny:refactor/backends
Nov 8, 2019
Merged
refactor: make kv backend more generic #206
Flydiverny
merged 4 commits into
external-secrets:master
from
Flydiverny:refactor/backends
Nov 8, 2019
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4005a8e
to
9a88aa6
Compare
9a88aa6
to
1af4786
Compare
silasbw
approved these changes
Nov 8, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one nit. do what you want with it :)
lib/backends/kv-backend.js
Outdated
_fetchDataValues ({ data, specOptions }) { | ||
return Promise.all(data.map(async ({ name, property = null, key, ...keyOptions }) => { | ||
const plainOrObjValue = await this._get({ key, keyOptions, specOptions }) | ||
const shouldParseValue = !!property |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
total nit: I'd favor Boolean(property)
to coerce falsy and truthy values to booleans.
a84f9d2
to
b158a06
Compare
Pluies
pushed a commit
to Pluies/kubernetes-external-secrets
that referenced
this pull request
Nov 13, 2019
Due to changes in external-secrets#206, we now need to stringify the response from the backend which currently comes as an object rather than a JSON string. Fixes issue such as: ``` {"level":30,"time":1573653228258,"pid":19,"hostname":"external-secrets-8zq4bq","msg":"running poll on the secret example/example","v":1} {"level":40,"time":1573653228468,"pid":19,"hostname":"external-secrets-8zq4bq","msg":"Failed to JSON.parse value for 'secrets/data/example/credentials', please verify that your secret value is correctly formatted as JSON. To use plain text secret remove the 'property: apiToken'","v":1} ```
Pluies
pushed a commit
to Pluies/kubernetes-external-secrets
that referenced
this pull request
Nov 14, 2019
Due to changes in external-secrets#206, we now need to stringify the response from the backend which currently comes as an object rather than a JSON string. Fixes issue such as: ``` {"level":30,"time":1573653228258,"pid":19,"hostname":"external-secrets-8zq4bq","msg":"running poll on the secret example/example","v":1} {"level":40,"time":1573653228468,"pid":19,"hostname":"external-secrets-8zq4bq","msg":"Failed to JSON.parse value for 'secrets/data/example/credentials', please verify that your secret value is correctly formatted as JSON. To use plain text secret remove the 'property: apiToken'","v":1} ```
Flydiverny
pushed a commit
that referenced
this pull request
Nov 14, 2019
Due to changes in #206, we now need to stringify the response from the backend which currently comes as an object rather than a JSON string. Fixes issue such as: ``` {"level":30,"time":1573653228258,"pid":19,"hostname":"external-secrets-8zq4bq","msg":"running poll on the secret example/example","v":1} {"level":40,"time":1573653228468,"pid":19,"hostname":"external-secrets-8zq4bq","msg":"Failed to JSON.parse value for 'secrets/data/example/credentials', please verify that your secret value is correctly formatted as JSON. To use plain text secret remove the 'property: apiToken'","v":1} ```
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Built ontop of #204, so excuse the double diff until rebased, and lets wait for #198 anyway
@silasbw thoughts? 🙃 (ignore spec and look at kv-backends and friends)