Skip to content

Commit

Permalink
title: fix cni compatibility issue, cluster with calico can't create …
Browse files Browse the repository at this point in the history
…ippool to avoid masq

description:
When host cluster use calico as cni, member cluster use flannel, host cluster can't create ippool for member cluster pod cidr to avoid masq,
because when host cluster can't excute code after `cluster.Spec.ClusterLinkOptions.CNI != utils.CNITypeCalico` to get `cluster.Status.ClusterLinkStatus.PodCIDRs` from member cluster

Signed-off-by: GreatLazyMan <[email protected]>
  • Loading branch information
GreatLazyMan committed Jan 12, 2024
1 parent d6754c9 commit f46d180
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ func (c *Controller) Reconcile(key utils.QueueKey) error {
}

klog.Infof("start reconcile cluster %s", cluster.Name)
if cluster.Spec.ClusterLinkOptions.CNI != utils.CNITypeCalico {
if cluster.Name == c.clusterName && cluster.Spec.ClusterLinkOptions.CNI != utils.CNITypeCalico {
klog.Infof("cluster %s cni type is %s skip reconcile", cluster.Name, cluster.Spec.ClusterLinkOptions.CNI)
return nil
}
Expand Down

0 comments on commit f46d180

Please sign in to comment.