Skip to content

Commit

Permalink
disable http2 follow up
Browse files Browse the repository at this point in the history
  • Loading branch information
stuggi committed Oct 25, 2023
1 parent 33a1270 commit 17cfa5b
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 17cfa5b

Please sign in to comment.