| 63 | var _ Runnable = &controllerManager{} |
| 64 | |
| 65 | type controllerManager struct { |
| 66 | sync.Mutex |
| 67 | started bool |
| 68 | |
| 69 | stopProcedureEngaged *int64 |
| 70 | errChan chan error |
| 71 | runnables *runnables |
| 72 | |
| 73 | // cluster holds a variety of methods to interact with a cluster. Required. |
| 74 | cluster cluster.Cluster |
| 75 | |
| 76 | // recorderProvider is used to generate event recorders that will be injected into Controllers |
| 77 | // (and EventHandlers, Sources and Predicates). |
| 78 | recorderProvider *intrec.Provider |
| 79 | |
| 80 | // resourceLock forms the basis for leader election |
| 81 | resourceLock resourcelock.Interface |
| 82 | |
| 83 | // leaderElectionReleaseOnCancel defines if the manager should step back from the leader lease |
| 84 | // on shutdown |
| 85 | leaderElectionReleaseOnCancel bool |
| 86 | |
| 87 | // metricsServer is used to serve prometheus metrics |
| 88 | metricsServer metricsserver.Server |
| 89 | |
| 90 | // healthProbeListener is used to serve liveness probe |
| 91 | healthProbeListener net.Listener |
| 92 | |
| 93 | // Readiness probe endpoint name |
| 94 | readinessEndpointName string |
| 95 | |
| 96 | // Liveness probe endpoint name |
| 97 | livenessEndpointName string |
| 98 | |
| 99 | // Readyz probe handler |
| 100 | readyzHandler *healthz.Handler |
| 101 | |
| 102 | // Healthz probe handler |
| 103 | healthzHandler *healthz.Handler |
| 104 | |
| 105 | // pprofListener is used to serve pprof |
| 106 | pprofListener net.Listener |
| 107 | |
| 108 | // controllerConfig are the global controller options. |
| 109 | controllerConfig config.Controller |
| 110 | |
| 111 | // Logger is the logger that should be used by this manager. |
| 112 | // If none is set, it defaults to log.Log global logger. |
| 113 | logger logr.Logger |
| 114 | |
| 115 | // leaderElectionStopped is an internal channel used to signal the stopping procedure that the |
| 116 | // LeaderElection.Run(...) function has returned and the shutdown can proceed. |
| 117 | leaderElectionStopped chan struct{} |
| 118 | |
| 119 | // leaderElectionCancel is used to cancel the leader election. It is distinct from internalStopper, |
| 120 | // because for safety reasons we need to os.Exit() when we lose the leader election, meaning that |
| 121 | // it must be deferred until after gracefulShutdown is done. |
| 122 | leaderElectionCancel context.CancelFunc |
nothing calls this directly
no outgoing calls
no test coverage detected