initInprocessAnalysisController spins up an instance of Galley which serves no purpose other than running Analyzers for status updates. The Status Updater will eventually need to allow input from istiod to support config distribution status as well.
(args *PilotArgs)
| 391 | // running Analyzers for status updates. The Status Updater will eventually need to allow input from istiod |
| 392 | // to support config distribution status as well. |
| 393 | func (s *Server) initInprocessAnalysisController(args *PilotArgs) error { |
| 394 | if s.statusManager == nil { |
| 395 | s.initStatusManager(args) |
| 396 | } |
| 397 | s.addStartFunc("analysis controller", func(stop <-chan struct{}) error { |
| 398 | go leaderelection. |
| 399 | NewLeaderElection(args.Namespace, args.PodName, leaderelection.AnalyzeController, args.Revision, s.kubeClient). |
| 400 | AddRunFunction(func(leaderStop <-chan struct{}) { |
| 401 | cont, err := incluster.NewController(leaderStop, s.RWConfigStore, |
| 402 | s.kubeClient, args.Revision, args.Namespace, s.statusManager, args.RegistryOptions.KubeOptions.DomainSuffix) |
| 403 | if err != nil { |
| 404 | return |
| 405 | } |
| 406 | cont.Run(leaderStop) |
| 407 | }).Run(stop) |
| 408 | return nil |
| 409 | }) |
| 410 | return nil |
| 411 | } |
| 412 | |
| 413 | func (s *Server) makeKubeConfigController(args *PilotArgs) *crdclient.Client { |
| 414 | opts := crdclient.Option{ |
no test coverage detected