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

feat: adds lodash get function for nested keys lookup #592

Conversation

jonathonbattista
Copy link
Contributor

@jonathonbattista jonathonbattista commented Jan 5, 2021

Currently, with the Vault backend, only top-level properties can be used for formatting Secrets: https://github.com/external-secrets/kubernetes-external-secrets/blob/master/lib/backends/kv-backend.js#L47

We would like to be able to support nested property lookups for more complex Vault JSON secrets.

I added a simple lodash implementation to check whether the nested property exists, then fetch the value if it does.

@jonathonbattista jonathonbattista changed the title adds lodash get function for nested keys lookup feat: adds lodash get function for nested keys lookup Jan 5, 2021
Copy link
Member

@Flydiverny Flydiverny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a note to the readme and some examples to highlight the existence of this feature?
Would also need to add a test case that tries to fetch a deeply nested key.

@Flydiverny Flydiverny merged commit 190e6db into external-secrets:master Feb 5, 2021
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