mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-02 03:08:15 +00:00
Teach cri about podCIDR
This commit is contained in:
@@ -216,11 +216,17 @@ func (kl *Kubelet) updatePodCIDR(cidr string) {
|
||||
glog.Infof("Setting Pod CIDR: %v -> %v", podCIDR, cidr)
|
||||
kl.runtimeState.setPodCIDR(cidr)
|
||||
|
||||
// kubelet -> network plugin
|
||||
if kl.networkPlugin != nil {
|
||||
details := make(map[string]interface{})
|
||||
details[network.NET_PLUGIN_EVENT_POD_CIDR_CHANGE_DETAIL_CIDR] = cidr
|
||||
kl.networkPlugin.Event(network.NET_PLUGIN_EVENT_POD_CIDR_CHANGE, details)
|
||||
}
|
||||
|
||||
// kubelet -> generic runtime -> runtime shim -> network plugin
|
||||
if err := kl.GetRuntime().UpdatePodCIDR(cidr); err != nil {
|
||||
glog.Errorf("Failed to update pod CIDR: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
// shapingEnabled returns whether traffic shaping is enabled.
|
||||
|
||||
Reference in New Issue
Block a user