File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package main
22
33import (
4+ "net"
45 "net/http"
56 "os"
7+ "time"
68
79 "github.com/cert-manager/cert-manager/pkg/acme/webhook/cmd"
810 "github.com/stackitcloud/stackit-cert-manager-webhook/internal/repository"
@@ -28,10 +30,24 @@ func main() {
2830 // You can register multiple DNS provider implementations with a single
2931 // webhook, where the Name() method will be used to disambiguate between
3032 // the different implementations.
33+
34+ httpClient := & http.Client {
35+ Timeout : 30 * time .Second ,
36+ Transport : & http.Transport {
37+ DialContext : (& net.Dialer {
38+ Timeout : 5 * time .Second ,
39+ KeepAlive : 30 * time .Second ,
40+ }).DialContext ,
41+ TLSHandshakeTimeout : 5 * time .Second ,
42+ ResponseHeaderTimeout : 10 * time .Second ,
43+ IdleConnTimeout : 30 * time .Second ,
44+ },
45+ }
46+
3147 cmd .RunWebhookServer (
3248 GroupName ,
3349 resolver .NewResolver (
34- & http. Client {} ,
50+ httpClient ,
3551 logger ,
3652 repository .NewZoneRepositoryFactory (),
3753 repository .NewRRSetRepositoryFactory (),
You can’t perform that action at this time.
0 commit comments