Chore: Update k8s.io dependencies (#91692)
This commit is contained in:
@@ -18,7 +18,7 @@ import (
|
||||
"github.com/grafana/grafana/pkg/services/apiserver/standalone"
|
||||
)
|
||||
|
||||
func newCommandStartExampleAPIServer(o *APIServerOptions, stopCh <-chan struct{}) *cobra.Command {
|
||||
func newCommandStartStandaloneAPIServer(o *APIServerOptions, stopCh <-chan struct{}) *cobra.Command {
|
||||
devAcknowledgementNotice := "The apiserver command is in heavy development. The entire setup is subject to change without notice"
|
||||
runtimeConfig := ""
|
||||
|
||||
@@ -87,7 +87,7 @@ func newCommandStartExampleAPIServer(o *APIServerOptions, stopCh <-chan struct{}
|
||||
|
||||
defer o.factory.Shutdown()
|
||||
|
||||
if err := o.RunAPIServer(config, stopCh); err != nil {
|
||||
if err := o.RunAPIServer(ctx, config); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ func RunCLI(opts commands.ServerOptions) int {
|
||||
commands.SetBuildInfo(opts)
|
||||
|
||||
options := newAPIServerOptions(os.Stdout, os.Stderr)
|
||||
cmd := newCommandStartExampleAPIServer(options, stopCh)
|
||||
cmd := newCommandStartStandaloneAPIServer(options, stopCh)
|
||||
|
||||
return cli.Run(cmd)
|
||||
}
|
||||
|
||||
@@ -155,7 +155,7 @@ func (o *APIServerOptions) Complete() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (o *APIServerOptions) RunAPIServer(config *genericapiserver.RecommendedConfig, stopCh <-chan struct{}) error {
|
||||
func (o *APIServerOptions) RunAPIServer(ctx context.Context, config *genericapiserver.RecommendedConfig) error {
|
||||
delegationTarget := genericapiserver.NewEmptyDelegate()
|
||||
completedConfig := config.Complete()
|
||||
|
||||
@@ -187,7 +187,7 @@ func (o *APIServerOptions) RunAPIServer(config *genericapiserver.RecommendedConf
|
||||
deltaProfiling{}.Install(server.Handler.NonGoRestfulMux)
|
||||
}
|
||||
|
||||
return server.PrepareRun().Run(stopCh)
|
||||
return server.PrepareRun().RunWithContext(ctx)
|
||||
}
|
||||
|
||||
// deltaProfiling adds godeltapprof handlers for pprof under /debug/pprof.
|
||||
|
||||
Reference in New Issue
Block a user