Skip to content

Commit

Permalink
add type assertion for ip crd (#3311)
Browse files Browse the repository at this point in the history
Signed-off-by: 马洪贞 <hzma@alauda.io>
  • Loading branch information
hongzhen-ma committed Oct 20, 2023
1 parent 127a87a commit 9375e59
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/controller/ip.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ import (
)

func (c *Controller) enqueueAddOrDelIP(obj interface{}) {
if _, ok := obj.(*kubeovnv1.IP); !ok {
klog.Errorf("object is not an IP, ignore it")
return
}

ipObj := obj.(*kubeovnv1.IP)
klog.V(3).Infof("enqueue update status subnet %s", ipObj.Spec.Subnet)
if strings.HasPrefix(ipObj.Name, util.U2OInterconnName[0:19]) {
Expand Down

0 comments on commit 9375e59

Please sign in to comment.