MCPcopy
hub / github.com/istio/istio / initInprocessAnalysisController

Method initInprocessAnalysisController

pilot/pkg/bootstrap/configcontroller.go:393–411  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.
393func (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
413func (s *Server) makeKubeConfigController(args *PilotArgs) *crdclient.Client {
414 opts := crdclient.Option{

Callers 1

initK8SConfigStoreMethod · 0.95

Calls 7

initStatusManagerMethod · 0.95
addStartFuncMethod · 0.95
RunMethod · 0.95
NewLeaderElectionFunction · 0.92
NewControllerFunction · 0.92
AddRunFunctionMethod · 0.80
RunMethod · 0.65

Tested by

no test coverage detected