Skip to content

Commit

Permalink
Refactor LB
Browse files Browse the repository at this point in the history
  Allow place-holder of LB without any VM instance existing
  Fix IP duplicated allocation or release
  Simply VMI controller
  Enhance health check probe
  Refactor lb controller, move lb to none-ready status in various error cases
  • Loading branch information
w13915984028 authored and starbops committed Aug 29, 2024
1 parent 744c09f commit 428a595
Show file tree
Hide file tree
Showing 13 changed files with 706 additions and 569 deletions.
2 changes: 1 addition & 1 deletion cmd/webhook/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func run(ctx context.Context, cfg *rest.Config, options *config.Options) error {
webhookServer := server.NewWebhookServer(ctx, cfg, name, options)

if err := webhookServer.RegisterValidators(ippool.NewIPPoolValidator(poolCache),
loadbalancer.NewValidator(vmiCache)); err != nil {
loadbalancer.NewValidator()); err != nil {
return fmt.Errorf("failed to register ip pool validator: %w", err)
}

Expand Down
5 changes: 1 addition & 4 deletions pkg/controller/ippool/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,8 @@ func (h *Handler) OnRemove(_ string, ipPool *lbv1.IPPool) (*lbv1.IPPool, error)
if ipPool == nil {
return nil, nil
}

logrus.Debugf("IP Pool %s has been deleted", ipPool.Name)

logrus.Infof("IP Pool %s is deleted", ipPool.Name)
h.allocatorMap.Delete(ipPool.Name)

return ipPool, nil
}

Expand Down
Loading

0 comments on commit 428a595

Please sign in to comment.