mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
K8s: fix nil deref from dummy factory for API Server options (#83132)
This commit is contained in:
parent
16dee3cf1c
commit
0bd009fb53
@ -62,7 +62,10 @@ func newCommandStartExampleAPIServer(o *APIServerOptions, stopCh <-chan struct{}
|
|||||||
}
|
}
|
||||||
|
|
||||||
cmd.Flags().StringVar(&runtimeConfig, "runtime-config", "", "A set of key=value pairs that enable or disable built-in APIs.")
|
cmd.Flags().StringVar(&runtimeConfig, "runtime-config", "", "A set of key=value pairs that enable or disable built-in APIs.")
|
||||||
o.factory.GetOptions().AddFlags(cmd.Flags())
|
|
||||||
|
if factoryOptions := o.factory.GetOptions(); factoryOptions != nil {
|
||||||
|
factoryOptions.AddFlags(cmd.Flags())
|
||||||
|
}
|
||||||
|
|
||||||
// Register standard k8s flags with the command line
|
// Register standard k8s flags with the command line
|
||||||
o.RecommendedOptions = options.NewRecommendedOptions(
|
o.RecommendedOptions = options.NewRecommendedOptions(
|
||||||
|
Loading…
Reference in New Issue
Block a user