Skip to content
This repository has been archived by the owner on Jul 26, 2022. It is now read-only.

refactor: make kv backend more generic #206

Merged
merged 4 commits into from
Nov 8, 2019

Conversation

Flydiverny
Copy link
Member

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)

@Flydiverny Flydiverny marked this pull request as ready for review November 8, 2019 19:57
@Flydiverny Flydiverny requested a review from silasbw November 8, 2019 19:57
Copy link
Contributor

@silasbw silasbw left a 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 :)

_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
Copy link
Contributor

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.

@Flydiverny Flydiverny merged commit 24421b9 into external-secrets:master Nov 8, 2019
@Flydiverny Flydiverny deleted the refactor/backends branch November 8, 2019 22:06
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.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants