mirror of
https://github.com/adnanh/webhook.git
synced 2025-07-27 04:50:29 +00:00
Add support for systemd socket activation (#704)
* feat: add support for systemd socket activation If webhook has been launched via systemd socket activation, simply use the systemd-provided socket rather than opening our own. * docs: documentation for the systemd socket activation mode * refactor: moved setuid and setgid flags into platform-specific section The setuid and setgid flags do not work on Windows, so moved them to platform_unix so they are only added to the flag set on compatible platforms. Also disallow the use of setuid and setgid in combination with -socket, since a setuid webhook process would not be able to clean up a socket that was created while running as root. If you _need_ to have the socket owned by root but the webhook process running as a normal user, you can achieve the same effect with systemd socket activation.
This commit is contained in:
parent
9cd78fca1a
commit
98cf5d0163
13 changed files with 529 additions and 5 deletions
1
go.mod
1
go.mod
|
@ -7,6 +7,7 @@ toolchain go1.22.0
|
|||
require (
|
||||
github.com/Microsoft/go-winio v0.6.2
|
||||
github.com/clbanning/mxj/v2 v2.7.0
|
||||
github.com/coreos/go-systemd/v22 v22.5.0
|
||||
github.com/dustin/go-humanize v1.0.1
|
||||
github.com/fsnotify/fsnotify v1.7.0
|
||||
github.com/ghodss/yaml v1.0.0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue