Skip to content
This repository was archived by the owner on Apr 20, 2024. It is now read-only.

Commit 9625336

Browse files
committed
grace period on exit
1 parent 94abf0d commit 9625336

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cmd/main.go

+3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"net/http"
88
"os"
99
"os/signal"
10+
"time"
1011

1112
"github.com/aojea/kube-netpol/pkg/networkpolicy"
1213
"github.com/prometheus/client_golang/prometheus/promhttp"
@@ -88,4 +89,6 @@ func main() {
8889
case <-ctx.Done():
8990
}
9091

92+
// grace period to cleanup resources
93+
time.Sleep(5 * time.Second)
9194
}

0 commit comments

Comments
 (0)