This is an automated email from the ASF dual-hosted git repository.

chia7712 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/yunikorn-k8shim.git


The following commit(s) were added to refs/heads/master by this push:
     new a5e87508 [YUNIKORN-2182] Set ReadHeaderTimeout in http server (#872)
a5e87508 is described below

commit a5e875086fc8fd7e2bf4cdddf532d768d7a5f54c
Author: 0lai0 <[email protected]>
AuthorDate: Mon Jul 8 20:20:10 2024 +0800

    [YUNIKORN-2182] Set ReadHeaderTimeout in http server (#872)
    
    Closes: #872
    
    Signed-off-by: Chia-Ping Tsai <[email protected]>
---
 pkg/cmd/admissioncontroller/main.go | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/pkg/cmd/admissioncontroller/main.go 
b/pkg/cmd/admissioncontroller/main.go
index 08f2771e..db1aa306 100644
--- a/pkg/cmd/admissioncontroller/main.go
+++ b/pkg/cmd/admissioncontroller/main.go
@@ -27,6 +27,7 @@ import (
        "os"
        "os/signal"
        "syscall"
+       "time"
 
        "go.uber.org/zap"
 
@@ -160,7 +161,8 @@ func (wh *WebHook) Startup(certs *tls.Certificate) {
                        CipherSuites: wh.getCipherSuites(),       // limit 
cipher suite to secure ones
                        Certificates: []tls.Certificate{*certs},
                },
-               Handler: mux,
+               Handler:           mux,
+               ReadHeaderTimeout: 10 * time.Second,
        }
 
        go func() {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to