mirror of
https://git.vectorsigma.ru/public/k3s.git
synced 2026-07-29 00:09:33 +00:00
add ctx to hook, handle hook errors
Signed-off-by: Brian Downs <brian.downs@gmail.com>
This commit is contained in:
@@ -61,7 +61,9 @@ func StartServer(ctx context.Context, config *Config) error {
|
||||
}
|
||||
|
||||
for _, hook := range config.StartupHooks {
|
||||
hook(config.ControlConfig)
|
||||
if err := hook(ctx, config.ControlConfig); err != nil {
|
||||
return errors.Wrap(err, "startup hook")
|
||||
}
|
||||
}
|
||||
|
||||
ip := net2.ParseIP(config.ControlConfig.BindAddress)
|
||||
|
||||
Reference in New Issue
Block a user