-
Notifications
You must be signed in to change notification settings - Fork 173
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
add "command" annotation for executing after secret template is rendered #57
Conversation
Hi @joemiller, my apologies for the delay. I'm ready to review this PR. Can you resolve the conflicts in the meantime? Thanks! |
Will do. I’m traveling so it may be a few days |
2048e72
to
fa1cea6
Compare
@jasonodonnell conflicts resolved. The conflict in annotations_test.go was a bit of a challenge to resolve but I believe it's in the correct state now. Please advise if I missed something there. thanks! |
agent-inject/agent/config.go
Outdated
@@ -70,6 +70,7 @@ type Template struct { | |||
Contents string `json:"contents"` | |||
LeftDelim string `json:"left_delimiter,omitempty"` | |||
RightDelim string `json:"right_delimiter,omitempty"` | |||
Command string `json:"command",omitempty` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The closing quote needs to be at the end of the line before the tick.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two minors things but it tested well and code looks fine. I will merge this after they're resolved. Thanks for the contribution!
@jasonodonnell great eye! thanks. Fixed, pushed |
Are you planning to get a release for this soon? |
Hello, |
It would be great to get it released together with the run-as-user/group
support in #60 since your
command may need to be run as a user/group other than the vault defaults
(100/1000) but that PR is still WIP (hopefully done soon)
…On Wed, Mar 4, 2020 at 1:22 PM Theron Voran ***@***.***> wrote:
@Shaeli <https://github.com/Shaeli> @sbeaulie
<https://github.com/sbeaulie> It should go out this week, in #99
<#99>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#57?email_source=notifications&email_token=AAC4GA6A364OIP5CNINNI4TRF3BABA5CNFSM4KK46CJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEN2LVIA#issuecomment-594852512>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAC4GA4GK4Q3Z3AEI2V4QMDRF3BABANCNFSM4KK46CJA>
.
|
…red (hashicorp#57) * remove trailing whitespace * add command annotation for configuring a command to execute after secret rendering
Addresses #56
This PR adds a new annotation:
vault.hashicorp.com/agent-inject-command-
This annotation similar to the one used for customizing the secret template. The specified command will be run by vault-agent after the secret is rendered.
Unaddressed by this PR is that in many cases the vault agent will be running as a different user than the main app container. Thus, the example use case from #56 is not yet fully possible since the call to
pkill
will be run as a different user/uid than the nginx container.It may be desirable to allow an annotation that will set the UID of the vault agent container to address this.
EDIT: support for specifying the userid/groupid of the vault agent sidecar is addressed in #60