mirror of
https://git.vectorsigma.ru/public/k3s.git
synced 2026-07-28 22:29:32 +00:00
Sync DisableKubeProxy into control struct
Sync DisableKubeProxy from cfg into control before sending control to clients, as it may have been modified by a startup hook. Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
This commit is contained in:
committed by
Brad Davidson
parent
09457a57d5
commit
869b98bc4c
@@ -49,7 +49,7 @@ func ResolveDataDir(dataDir string) (string, error) {
|
||||
return filepath.Join(dataDir, "server"), err
|
||||
}
|
||||
|
||||
func StartServer(ctx context.Context, config *Config) error {
|
||||
func StartServer(ctx context.Context, config *Config, cfg *cmds.Server) error {
|
||||
if err := setupDataDirAndChdir(&config.ControlConfig); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -65,7 +65,7 @@ func StartServer(ctx context.Context, config *Config) error {
|
||||
wg := &sync.WaitGroup{}
|
||||
wg.Add(len(config.StartupHooks))
|
||||
|
||||
config.ControlConfig.Runtime.Handler = router(ctx, config)
|
||||
config.ControlConfig.Runtime.Handler = router(ctx, config, cfg)
|
||||
shArgs := cmds.StartupHookArgs{
|
||||
APIServerReady: config.ControlConfig.Runtime.APIServerReady,
|
||||
KubeConfigAdmin: config.ControlConfig.Runtime.KubeConfigAdmin,
|
||||
|
||||
Reference in New Issue
Block a user