You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In some cases, informers might be shared especially between controllers. So if multiple controllers watch same resource (with same label selectors, namespaces, item store ) sharing it would spare resources
flowchart LR
subgraph Controllers
CA[Controller A]
CB[Controller B]
CC[Controller C]
end
subgraph EventSources["InformerEventSources"]
ESA[IES A]
ESB[IES B]
ESC[IES C]
end
subgraph Managers["InformerManagers"]
MA[InformerManager A]
MB[InformerManager B]
MC[InformerManager C]
end
Pool[(DefaultInformerPool<br/>InformerClassifier → SharedIndexInformer<br/>+ refCount)]
SII1[SharedIndexInformer<br/>Pod / ns=foo / selector=app=x]
SII2[SharedIndexInformer<br/>ConfigMap / all-ns]
K8s[(Kubernetes API)]
CA --> ESA --> MA -- "getResource(classifier)" --> Pool
CB --> ESB --> MB -- "getResource(classifier)" --> Pool
CC --> ESC --> MC -- "getResource(classifier)" --> Pool
Pool -- "shared (refCount=2)" --> SII1
Pool -- "refCount=1" --> SII2
MA -. handler .-> SII1
MB -. handler .-> SII1
CA --> ESA --> MA -- "getResource(classifier)" --> Pool
CB --> ESB --> MB -- "getResource(classifier)" --> Pool
CC --> ESC --> MC -- "getResource(classifier)" --> Pool
Pool -- "shared (refCount=2)" --> SII1
Pool -- "refCount=1" --> SII2
MA -. handler .-> SII1
MB -. handler .-> SII1
MC -. handler .-> SII2
SII1 <--> K8s
SII2 <--> K8s
In some cases, informers might be shared especially between controllers. So if multiple controllers watch same resource (with same label selectors, namespaces, item store ) sharing it would spare resources
flowchart LR subgraph Controllers CA[Controller A] CB[Controller B] CC[Controller C] end subgraph EventSources["InformerEventSources"] ESA[IES A] ESB[IES B] ESC[IES C] end subgraph Managers["InformerManagers"] MA[InformerManager A] MB[InformerManager B] MC[InformerManager C] end Pool[(DefaultInformerPool<br/>InformerClassifier → SharedIndexInformer<br/>+ refCount)] SII1[SharedIndexInformer<br/>Pod / ns=foo / selector=app=x] SII2[SharedIndexInformer<br/>ConfigMap / all-ns] K8s[(Kubernetes API)] CA --> ESA --> MA -- "getResource(classifier)" --> Pool CB --> ESB --> MB -- "getResource(classifier)" --> Pool CC --> ESC --> MC -- "getResource(classifier)" --> Pool Pool -- "shared (refCount=2)" --> SII1 Pool -- "refCount=1" --> SII2 MA -. handler .-> SII1 MB -. handler .-> SII1 CA --> ESA --> MA -- "getResource(classifier)" --> Pool CB --> ESB --> MB -- "getResource(classifier)" --> Pool CC --> ESC --> MC -- "getResource(classifier)" --> Pool Pool -- "shared (refCount=2)" --> SII1 Pool -- "refCount=1" --> SII2 MA -. handler .-> SII1 MB -. handler .-> SII1 MC -. handler .-> SII2 SII1 <--> K8s SII2 <--> K8s