Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deleted the code that clears the rule #75

Merged
merged 3 commits into from
Nov 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading