Skip to content

Commit

Permalink
Merge pull request kosmos-io#283 from wuyingjun-lucky/main
Browse files Browse the repository at this point in the history
modify flannel config informer options to avoid the situation when the namespace is custom
  • Loading branch information
kosmos-robot authored Nov 23, 2023
2 parents 66f5d46 + 749c2f7 commit 99bf98a
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 99bf98a

Please sign in to comment.