Skip to content

Commit

Permalink
Merge pull request #75 from backguynn/main
Browse files Browse the repository at this point in the history
deleted the code that clears the rule
  • Loading branch information
backguynn authored Nov 23, 2023
2 parents 60be850 + 2652fca commit a4e6f29
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions cmd/loxilb-agent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ import (
// https://github.com/kubernetes/kubernetes/blob/release-1.17/pkg/controller/apis/config/v1alpha1/defaults.go#L120
const informerDefaultResync = 12 * time.Hour

var closeSig os.Signal
var (
capturedSignals = []os.Signal{syscall.SIGTERM, syscall.SIGINT, syscall.SIGQUIT}
notifyCh = make(chan os.Signal, 2)
Expand Down Expand Up @@ -196,11 +195,6 @@ func run(o *Options) error {

<-stopCh

if closeSig == syscall.SIGTERM {
klog.Info("flushing LoxiLB rules")
lbManager.DeleteAllLoadBalancer()
}

klog.Info("Stopping loxilb Agent")
return nil
}
Expand All @@ -209,7 +203,7 @@ func RegisterSignalHandlers() <-chan struct{} {
stopCh := make(chan struct{})

go func() {
closeSig = <-notifyCh
<-notifyCh
close(stopCh)
<-notifyCh
klog.Warning("Received second signal, will force exit")
Expand Down

0 comments on commit a4e6f29

Please sign in to comment.