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

Support meteor.var or .env for secrets #228

Closed
ravisuhag opened this issue Sep 20, 2021 · 4 comments · Fixed by #323
Closed

Support meteor.var or .env for secrets #228

ravisuhag opened this issue Sep 20, 2021 · 4 comments · Fixed by #323
Assignees
Labels
core Core framework feature enhancement New feature or request

Comments

@ravisuhag
Copy link
Member

Instead of meteor_prefix variable accept a .var or .env for accepting secrets. or maybe support both. If not provided, meteor should also promote users for secrets in the command line before running.

@ravisuhag ravisuhag added core Core framework feature enhancement New feature or request labels Sep 20, 2021
@burntcarrot
Copy link

Could we use salt for loading env vars in populateData()? populateData() returns a map[string]string as of now, and salt uses a Loader (viper wrapper) AFAIK.

https://github.com/odpf/meteor/blob/09db3663770352943a17e79235ca6d8f0a1532fd/recipe/envs.go#L12-L14

https://github.com/odpf/meteor/blob/09db3663770352943a17e79235ca6d8f0a1532fd/recipe/reader.go#L12-L24

@burntcarrot
Copy link

burntcarrot commented Sep 27, 2021

However, template is being used in the recipe reader for applying the parsed template to reader.data:

https://github.com/odpf/meteor/blob/09db3663770352943a17e79235ca6d8f0a1532fd/recipe/reader.go#L54

So, I don't think changing the method signature for populateData() would be possible, as template execution is dependent upon the reader's data. Is there any way we can possibly write values to the buffer through salt?

https://github.com/odpf/meteor/blob/14dab680e7cc2ae422fe842dd46acca988e6ec51/recipe/reader.go#L53-L62

@ravisuhag
Copy link
Member Author

ravisuhag commented Sep 27, 2021

@burntcarrot Salt does not have a package to serve this need at the moment. Feel free to put a proposal.

@StewartJingga
Copy link
Contributor

So, I don't think changing the method signature for populateData() would be possible, as template execution is dependent upon the reader's data.

@burntcarrot There are two parts when reading recipe from .yaml to memory (recipe struct):

  1. collecting data (right it is only via meteor_prefix
  2. and applying the data to the recipe

This proposed feature/enhancement will only focus on part 1 which is collecting data. At this stage it is totally easy to extend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core framework feature enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants