You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: main.go
+34-1Lines changed: 34 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,9 @@ import (
26
26
"net/http"
27
27
_ "net/http/pprof"
28
28
"os"
29
+
"os/signal"
29
30
"path/filepath"
31
+
"syscall"
30
32
"time"
31
33
32
34
"github.com/go-logr/zapr"
@@ -117,6 +119,7 @@ var (
117
119
enableK8sCel=flag.Bool("enable-k8s-native-validation", true, "enable the validating admission policy driver")
118
120
externaldataProviderResponseCacheTTL=flag.Duration("external-data-provider-response-cache-ttl", 3*time.Minute, "TTL for the external data provider response cache. Specify the duration in 'h', 'm', or 's' for hours, minutes, or seconds respectively. Defaults to 3 minutes if unspecified. Setting the TTL to 0 disables the cache.")
119
121
enableReferential=flag.Bool("enable-referential-rules", true, "Enable referential rules. This flag defaults to true. Set this value to false if you want to disallow referential constraints. Because referential constraints read objects other than the object-under-test, they may be subject to race conditions. Users concerned about this may want to disable referential rules")
122
+
shutdownDelay=flag.Int("shutdown-delay", 10, "Time in seconds the controller runtime shutdown gets delayed after receiving a pod termination event. Prevents failing webhooks on pod shutdown. default: 10")
120
123
)
121
124
122
125
funcinit() {
@@ -310,9 +313,39 @@ func innerMain() int {
310
313
}
311
314
}
312
315
316
+
// Always enable downstream checking for the webhooks, if enabled.
0 commit comments