Skip to content

[Feature] Configure operations timeout for apiserver HTTP server #3306

Open
@dentiny

Description

@dentiny

Search before asking

  • I had searched in the issues and found no similar feature requirement.

Description

// Create a top level mux to include both Http gRPC servers and other endpoints like metrics
topMux := http.NewServeMux()
// Seems /apis (matches /apis/v1alpha1/clusters) works fine
topMux.Handle("/", runtimeMux)
topMux.Handle("/metrics", promhttp.Handler())
topMux.HandleFunc("/swagger/", serveSwaggerFile)
topMux.HandleFunc("/healthz", serveHealth)
serveSwaggerUI(topMux)
if err := http.ListenAndServe(*httpPortFlag, topMux); err != nil {
klog.Fatal(err)
}

golangci-lint suggests timeout configuration.

Use case

No response

Related issues

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Metadata

Metadata

Assignees

Labels

P2Important issue, but not time criticalapiserverenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions