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

writeToFile Function Improvements #1549

Merged
merged 3 commits into from
Mar 9, 2022

Conversation

mbillow
Copy link
Contributor

@mbillow mbillow commented Mar 7, 2022

User and Group Changes

The writeToFile function now allows empty strings to be passed into the username and groupName fields which will default to the current user. If neither is set, it will skip the chown call completely. This allows the consul-template to run as an init container without additional permissions.

The username and groupName fields can now also support raw UIDs and GIDs respectively. This allows vault-agent to write files for users that aren't in /etc/passwd.

Directory Creation

Now consul-template will automatically attempt to create the directories necessary before writing the file.

@mbillow mbillow requested a review from a team March 7, 2022 23:28
@mbillow mbillow changed the title Writetofile improvements writeToFile Function Improvements Mar 7, 2022
@mbillow mbillow mentioned this pull request Mar 7, 2022
@mbillow mbillow force-pushed the writetofile-improvements branch from 24e5138 to 642c62e Compare March 7, 2022 23:41
@mbillow mbillow mentioned this pull request Mar 8, 2022
Copy link
Contributor

@eikenb eikenb left a comment

Choose a reason for hiding this comment

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

Thanks for including documentation updates!

@eikenb eikenb merged commit a4513b6 into hashicorp:master Mar 9, 2022
@eikenb eikenb added this to the v0.29.0 milestone Mar 9, 2022
@eikenb eikenb added the hashicat-update-required Changes that need to be ported to hashicat label Mar 9, 2022
@mbillow
Copy link
Contributor Author

mbillow commented Mar 9, 2022

@eikenb Thanks for reviewing and merging this so quickly, I appreciate it!

Is it possible to get this released before the current 0.29.0 target?

I’m trying, with the help of our Enterprise support team, to get this (and sprig templates in 0.28.0) pulled into the next release of Vault because we need all of this in Vault Agent.

@eikenb
Copy link
Contributor

eikenb commented Mar 9, 2022

Hey @mbillow,

The only outstanding feature/issue for 0.29.0 is also for Vault Agent, the PKI cert renewal issue (#1259).

@mbillow
Copy link
Contributor Author

mbillow commented Mar 10, 2022

@eikenb Is that something actively being worked on? Is there an ETA? Just trying to properly set expectations on our side since this blocks some work internally.

@eikenb
Copy link
Contributor

eikenb commented Mar 12, 2022

Yep. I'm working on that next. I've already figured out the solution, but need to write it up w/ tests, etc. There were some other bugs I was going to fix for 0.29 as well, but there are some internal discussions here that might end up with a quicker release.

@mbillow
Copy link
Contributor Author

mbillow commented Mar 12, 2022

@eikenb Apologies if it is coming from the enterprise support team. I’ve been discussing with them the importance this has for us and letting them know I made the changes I did.

There is a lot of old, custom stuff we can turn off when these changes get merged into Vault that I am very excited to turn off. 😅

Let me know if there is anything I can do to help! Happy to benefit the open source community while also on the clock. 😉

@eikenb
Copy link
Contributor

eikenb commented Mar 14, 2022

No apologies necessary @mbillow. The other teams work is important (to us) to help set priorities and is part of the process. Thanks for the thoughts though and am very happy to hear that this will make your life easier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement hashicat-update-required Changes that need to be ported to hashicat
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants