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: 马洪贞 <[email protected]>
  • Loading branch information
hongzhen-ma committed Oct 20, 2023
1 parent 126f871 commit df53f9f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/controller/ip.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
package controller

import (
"strings"

"github.com/kubeovn/kube-ovn/pkg/util"
"k8s.io/klog/v2"
"strings"

kubeovnv1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1"
)

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)
Expand Down

0 comments on commit df53f9f

Please sign in to comment.