Skip to content

Commit

Permalink
Merge pull request #933 from stuggi/http2_follow_up
Browse files Browse the repository at this point in the history
disable http2 follow up
  • Loading branch information
openshift-ci[bot] authored Oct 25, 2023
2 parents 3d8c6d8 + 17cfa5b commit e0ce834
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,21 @@ func main() {

}

disableHTTP2 := func(c *tls.Config) {
if enableHTTP2 {
return
}
c.NextProtos = []string{"http/1.1"}
}

options := ctrl.Options{
Scheme: scheme,
MetricsBindAddress: metricsAddr,
Port: 9443,
HealthProbeBindAddress: probeAddr,
LeaderElection: enableLeaderElection,
LeaderElectionID: "576d6738.openstack.org",
TLSOpts: []func(config *tls.Config){disableHTTP2},
}

// create multi namespace cache if list of namespaces
Expand Down Expand Up @@ -159,13 +167,6 @@ func main() {
os.Exit(1)
}

disableHTTP2 := func(c *tls.Config) {
if enableHTTP2 {
return
}
c.NextProtos = []string{"http/1.1"}
}

checker := healthz.Ping
if strings.ToLower(os.Getenv("ENABLE_WEBHOOKS")) != "false" {
enableWebhooks = true
Expand Down

0 comments on commit e0ce834

Please sign in to comment.