Skip to content

Commit

Permalink
add srl connectivity test
Browse files Browse the repository at this point in the history
  • Loading branch information
bobz965 committed Jul 20, 2023
1 parent 42f35a3 commit d2b157c
Show file tree
Hide file tree
Showing 6 changed files with 257 additions and 139 deletions.
Binary file added dist/images/kube-ovn
Binary file not shown.
4 changes: 3 additions & 1 deletion pkg/controller/endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,16 +194,18 @@ func (c *Controller) handleUpdateEndpoint(key string) error {

// for performance reason delete lb with no backends
if len(backends) != 0 {
klog.V(3).Infof("update vip %s with backends %s to LB %s", vip, backends, lb)
if err = c.ovnClient.LoadBalancerAddVip(lb, vip, backends...); err != nil {
klog.Errorf("failed to add vip %s with backends %s to LB %s: %v", vip, backends, lb, err)
return err
}
} else {
klog.V(3).Infof("delete vip %s from LB %s", vip, lb)
if err := c.ovnClient.LoadBalancerDeleteVip(lb, vip); err != nil {
klog.Errorf("failed to delete vip %s from LB %s: %v", vip, lb, err)
return err
}

klog.V(3).Infof("delete vip %s from old LB %s", vip, lb)
if err := c.ovnClient.LoadBalancerDeleteVip(oldLb, vip); err != nil {
klog.Errorf("failed to delete vip %s from LB %s: %v", vip, lb, err)
return err
Expand Down
1 change: 0 additions & 1 deletion pkg/controller/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ func (c *Controller) enqueueAddService(obj interface{}) {

func (c *Controller) enqueueDeleteService(obj interface{}) {
svc := obj.(*v1.Service)
//klog.V(3).Infof("enqueue delete service %s/%s", svc.Namespace, svc.Name)
klog.Infof("enqueue delete service %s/%s", svc.Namespace, svc.Name)

vip, ok := svc.Annotations[util.SwitchLBRuleVipsAnnotation]
Expand Down
2 changes: 1 addition & 1 deletion pkg/ipam/ipam.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func (ipam *IPAM) GetRandomAddress(podName, nicName string, mac *string, subnetN
func (ipam *IPAM) GetStaticAddress(podName, nicName, ip string, mac *string, subnetName string, checkConflict bool) (string, string, string, error) {
ipam.mutex.RLock()
defer ipam.mutex.RUnlock()

klog.Infof("allocating static ip %s from subnet %s", ip, subnetName)
if subnet, ok := ipam.Subnets[subnetName]; !ok {
return "", "", "", ErrNoAvailable
} else {
Expand Down
10 changes: 6 additions & 4 deletions test/e2e/framework/image.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package framework

const (
PauseImage = "kubeovn/pause:3.2"
BusyBoxImage = "busybox:stable"
AgnhostImage = "kubeovn/agnhost:2.43"
NginxImage = "nginx:latest"
PauseImage = "kubeovn/pause:3.2"
BusyBoxImage = "busybox:stable"
AgnhostImage = "kubeovn/agnhost:2.43"
NginxImage = "nginx:latest"
HttpdImage = "httpd:latest"
NetShootImage = "nicolaka/netshoot:latest"
)
Loading

0 comments on commit d2b157c

Please sign in to comment.