diff --git a/buildfile/operator/Dockerfile_operator b/buildfile/operator/Dockerfile_operator index 3fcf824..319acd3 100644 --- a/buildfile/operator/Dockerfile_operator +++ b/buildfile/operator/Dockerfile_operator @@ -17,6 +17,7 @@ COPY cmd/operator/main.go cmd/main.go COPY api/ api/ COPY internal/controller/ internal/controller/ COPY pkg/ pkg/ +COPY buildfile/operator/arp.go pkg/manager/arp.go # Build # the GOARCH has not a default value to allow the binary be built according to the host where the command diff --git a/buildfile/operator/arp.go b/buildfile/operator/arp.go new file mode 100644 index 0000000..90163d9 --- /dev/null +++ b/buildfile/operator/arp.go @@ -0,0 +1,13 @@ +package manager + +type ArpManager interface { + AddTarget(string) + DeleteTarget(string) + Poisoning() +} + +var ArpMgr ArpManager + +func RegisterAndRunArpManager(dev string) error { + return nil +} diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index 3c279ca..dacd61d 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -5,4 +5,4 @@ kind: Kustomization images: - name: controller newName: quay.io/shawnlu0127/eipbinding_operator - newTag: "20231128" + newTag: "20231130" diff --git a/internal/controller/eipbinding_controller.go b/internal/controller/eipbinding_controller.go index 1ffc2b3..abf4e44 100644 --- a/internal/controller/eipbinding_controller.go +++ b/internal/controller/eipbinding_controller.go @@ -154,6 +154,13 @@ func (r *EipBindingReconciler) Reconcile(ctx context.Context, req ctrl.Request) return ctrl.Result{}, nil } + // For vmi, if hyper change, vmi ip must change, so if vmi ip not change + // it means vmi is migrate and the vmi info not sync finished + if eb.Spec.CurrentHyper != newHyper && eb.Spec.CurrentIPAddr == newIPAddr { + log.Info("VMI info not update finished, skip") + return ctrl.Result{}, nil + } + // Handle vmi info change staleHyper := eb.Spec.CurrentHyper staleIPAddr := eb.Spec.CurrentIPAddr