move signal handling for hyperkube apiserver and kubelet commands out of hyperkube main command
This commit is contained in:
@@ -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())
|
||||
},
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user