Description
Basically, this TODO:
The reason that we have AddPodAdmitHandlers
as a separate method for the allocation manager as opposed to just passing in the admit handers into the constructor is because of some circular dependencies:
shutdown manager and probe manager
- Construction of the container runtime depends on the allocation manager.
- One of the allocation manager's handlers depends on the shutdown manager.
- The shutdown manager depends on the probe manager.
- The probe manager depends on the container runtime.
potential resolution: it doesn't look like the shutdown manager uses the probe manager for anything, so that dependency in the shutdown manager can be removed, thus removing the dependency cycle.
shutdown manager and volume manager
- Construction of the container runtime depends on the allocation manager.
- One of the allocation manager's handlers depends on the [shutdown manager].
- The shutdown manager depends on the volume manager.
- The volume manager depends on the container runtime.
potential resolution: it doesn't look like the volume manager uses the container runtime for anything, so that dependency in the volume manager can likewise be removed, removing the dependency cycle.
eviction manager and image manager
- Construction of the image manager depends on the container runtime.
- Construction of the container runtime depends on the allocation manager.
- One of the [allocation manager's handlers] depends on the eviction manager.
- The eviction manager depends on the image manager.
potential resolution: ???
This isn't a huge issue, but in general this a symptom of the kubelet code being filled with bloated and circular dependencies. It makes the code hard to work with. There are probably more that I haven't listed here, but didn't fully dive into it.
(Also noting that me saying "x is not used for anything" is just based on a quick search so I could be wrong - a more thorough search is needed.)
/sig node
/kind cleanup
/triage accepted
/priority important-longterm