move signal handling for hyperkube apiserver and kubelet commands out of hyperkube main command

This commit is contained in:
Stephen Chan
2019-04-16 13:07:21 -07:00
parent 1a162790f6
commit 7cbe2d6c5f
13 changed files with 18 additions and 23 deletions

View File

@@ -88,7 +88,7 @@ const etcdRetryLimit = 60
const etcdRetryInterval = 1 * time.Second
// NewAPIServerCommand creates a *cobra.Command object with default parameters
func NewAPIServerCommand(stopCh <-chan struct{}) *cobra.Command {
func NewAPIServerCommand() *cobra.Command {
s := options.NewServerRunOptions()
cmd := &cobra.Command{
Use: "kube-apiserver",
@@ -111,7 +111,7 @@ cluster's shared state through which all other components interact.`,
return utilerrors.NewAggregate(errs)
}
return Run(completedOptions, stopCh)
return Run(completedOptions, genericapiserver.SetupSignalHandler())
},
}