Skip to content

Commit

Permalink
UPSTREAM: <carry>: Release lock on KCM and KS termination
Browse files Browse the repository at this point in the history
  • Loading branch information
bertinatto committed Mar 27, 2023
1 parent 8c7ad1f commit fc1ef9b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/kube-controller-manager/app/testing/testserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import (
"github.com/spf13/pflag"

"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/apiserver/pkg/server"
"k8s.io/client-go/kubernetes"
restclient "k8s.io/client-go/rest"
"k8s.io/kubernetes/cmd/kube-controller-manager/app"
Expand Down Expand Up @@ -115,7 +116,8 @@ func StartTestServer(ctx context.Context, customFlags []string) (result TestServ
go func(ctx context.Context) {
defer close(errCh)

if err := app.Run(ctx, config.Complete()); err != nil {
stopCh := server.SetupSignalHandler()
if err := app.Run(ctx, config.Complete(), stopCh); err != nil {
errCh <- err
}
}(ctx)
Expand Down

0 comments on commit fc1ef9b

Please sign in to comment.