Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: dont udpate edge node #14

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/controllers/resources/nodes/fake_syncer.go
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ func (r *fakeNodeSyncer) updateAllFakeNodes(ctx *synccontext.RegisterContext) {
klog.Info("update all fake nodes")
cli := ctx.VirtualManager.GetClient()
nodes := &corev1.NodeList{}
err := cli.List(ctx.Context, nodes)
err := cli.List(ctx.Context, nodes, client.HasLabels{"vcluster.loft.sh/fake-node"})
if err != nil {
klog.Errorf("list fake nodes error, err: %s", err)
return
Expand Down
1 change: 0 additions & 1 deletion pkg/controllers/resources/pods/syncer.go
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,6 @@ func (s *podSyncer) Sync(ctx *synccontext.SyncContext, pObj client.Object, vObj
vPod := vObj.(*corev1.Pod)
pPod := pObj.(*corev1.Pod)

klog.Infof("Sync pod %s/%s, node: %s, vPod %v, pPod %v", vPod, pPod)
if vPod.Spec.NodeName != "" {
yes, err := edgewize.IsFakeNode(ctx.VirtualClient, vPod.Spec.NodeName)
if err != nil {
Expand Down