Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Echo backend as a drop in replacement for testing #221

Open
stmcx opened this issue Feb 14, 2024 · 0 comments
Open

Echo backend as a drop in replacement for testing #221

stmcx opened this issue Feb 14, 2024 · 0 comments

Comments

@stmcx
Copy link

stmcx commented Feb 14, 2024

Context

https://github.com/helmfile/vals?tab=readme-ov-file#echo

ref+echo://foo/bar/baz#/foo/bar generates baz. This works by the host and the path part foo/bar/baz generating an object {"foo":{"bar":"baz"}} and the fragment part #/foo/bar results in digging the object to obtain the value at $.foo.bar.

I would like to use echo backend as drop in replacement for AWS Secret Manager ref+awssecrets://myteam/mydoc#/foo/bar for testing purposes.

Issue

This seems to fail because echo backend is trying to dig foo/bar in an object generated on the fly {myteam: mydoc} when ref+awssecrets://myteam/mydoc#/foo/bar is a valid use case.

It is not clear why the echo backend is enforcing this logic between the path and the fragment https://github.com/helmfile/vals?tab=readme-ov-file#expression-syntax . From my understanding, the path is used to retrieve an object in some secret backend and fragment is used to traverse the object rather than the path (as the echo backend is doing).

I will have to rewrite all my helm file templates to satisfy echo backend logic rather than simply substituting ref+awssecrets with ref+echo

I understand no object will be retrieved. Is it possible to echo a k8s safe version of myteam/mydoc#/foo/bar instead?

Error

Helmfile is failing with

err 1: failed to render values files "vars/example.yaml.gotmpl": expand echo://secret-manager#/EXAMPLE: key must have two or more components separated by "/": got "secret-manager"

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant