Skip to content

Commit 8a3ce37

Browse files
committed
lint + update external ip
1 parent c9a3250 commit 8a3ce37

File tree

6 files changed

+59
-149
lines changed

6 files changed

+59
-149
lines changed

Diff for: cmd/main.go

-26
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ import (
2121
"crypto/tls"
2222
"flag"
2323
"os"
24-
"os/signal"
25-
"sync"
26-
"syscall"
2724

2825
// Import all Kubernetes client auth plugins (e.g. Azure, GCP, OIDC, etc.)
2926
// to ensure that exec-entrypoint and run can make use of them.
@@ -49,29 +46,6 @@ var (
4946
setupLog = ctrl.Log.WithName("setup")
5047
)
5148

52-
func interruptHandler() (*sync.WaitGroup, context.Context) {
53-
// Handle interrupts
54-
interrupt := make(chan os.Signal, 1)
55-
signal.Notify(interrupt, os.Interrupt)
56-
signal.Notify(interrupt, syscall.SIGTERM)
57-
var wg sync.WaitGroup
58-
wg.Add(1)
59-
ctx, cancel := context.WithCancel(context.Background())
60-
61-
go func() {
62-
select {
63-
case <-ctx.Done():
64-
return
65-
66-
case <-interrupt:
67-
wg.Done()
68-
cancel()
69-
}
70-
}()
71-
72-
return &wg, ctx
73-
}
74-
7549
func init() {
7650
utilruntime.Must(clientgoscheme.AddToScheme(scheme))
7751

Diff for: go.mod

-16
Original file line numberDiff line numberDiff line change
@@ -17,24 +17,15 @@ require (
1717
)
1818

1919
require (
20-
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
21-
github.com/Microsoft/go-winio v0.4.14 // indirect
2220
github.com/antlr4-go/antlr/v4 v4.13.0 // indirect
2321
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a // indirect
2422
github.com/beorn7/perks v1.0.1 // indirect
2523
github.com/blang/semver/v4 v4.0.0 // indirect
2624
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
2725
github.com/cespare/xxhash v1.1.0 // indirect
2826
github.com/cespare/xxhash/v2 v2.3.0 // indirect
29-
github.com/containerd/fifo v1.1.0 // indirect
30-
github.com/containerd/log v0.1.0 // indirect
3127
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
3228
github.com/dgraph-io/ristretto v0.0.1 // indirect
33-
github.com/distribution/reference v0.6.0 // indirect
34-
github.com/docker/docker v27.5.1+incompatible // indirect
35-
github.com/docker/go-connections v0.5.0 // indirect
36-
github.com/docker/go-metrics v0.0.1 // indirect
37-
github.com/docker/go-units v0.5.0 // indirect
3829
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
3930
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
4031
github.com/fatih/color v1.7.0 // indirect
@@ -67,22 +58,15 @@ require (
6758
github.com/mattn/go-colorable v0.1.2 // indirect
6859
github.com/mattn/go-isatty v0.0.8 // indirect
6960
github.com/mitchellh/mapstructure v1.1.2 // indirect
70-
github.com/moby/docker-image-spec v1.3.1 // indirect
71-
github.com/moby/sys/userns v0.1.0 // indirect
72-
github.com/moby/term v0.5.0 // indirect
7361
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
7462
github.com/modern-go/reflect2 v1.0.2 // indirect
75-
github.com/morikuni/aec v1.0.0 // indirect
7663
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
77-
github.com/opencontainers/go-digest v1.0.0 // indirect
78-
github.com/opencontainers/image-spec v1.1.0 // indirect
7964
github.com/pelletier/go-toml v1.2.0 // indirect
8065
github.com/pkg/errors v0.9.1 // indirect
8166
github.com/prometheus/client_golang v1.19.1 // indirect
8267
github.com/prometheus/client_model v0.6.1 // indirect
8368
github.com/prometheus/common v0.55.0 // indirect
8469
github.com/prometheus/procfs v0.15.1 // indirect
85-
github.com/sirupsen/logrus v1.9.3 // indirect
8670
github.com/spf13/afero v1.1.2 // indirect
8771
github.com/spf13/cast v1.3.0 // indirect
8872
github.com/spf13/cobra v1.8.1 // indirect

0 commit comments

Comments
 (0)