Skip to content

Commit

Permalink
modify flannel config informer options to avoid the namespace is custom
Browse files Browse the repository at this point in the history
Signed-off-by: wuyingjun <[email protected]>
  • Loading branch information
wuyingjun-lucky committed Nov 23, 2023
1 parent 1f147a2 commit 9f2272d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/clusterlink/controllers/cluster/cluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ import (
// KubeFlannelNetworkConfig
const (
FlannelCNI = "flannel"
KubeFlannelNamespace = "kube-flannel"
KubeFlannelConfigMap = "kube-flannel-cfg"
KubeFlannelNetworkConf = "net-conf.json"
KubeFlannelIPPool = "Network"
Expand Down Expand Up @@ -371,7 +370,7 @@ func (c *Controller) initCalicoWatcherWithEtcdBackend(ctx context.Context, clust

// todo by wuyingjun-lucky
func (c *Controller) initFlannelInformer(context context.Context, cluster *clusterlinkv1alpha1.Cluster, kubeClient kubernetes.Interface) (SetClusterPodCIDRFun, error) {
informerFactory := informers.NewSharedInformerFactoryWithOptions(kubeClient, 0, informers.WithNamespace(KubeFlannelNamespace))
informerFactory := informers.NewSharedInformerFactory(kubeClient, 0)
lister := informerFactory.Core().V1().ConfigMaps().Lister()
_, err := informerFactory.Core().V1().ConfigMaps().Informer().AddEventHandler(
cache.ResourceEventHandlerFuncs{
Expand Down

0 comments on commit 9f2272d

Please sign in to comment.