Skip to content

Commit 2dc665d

Browse files
saschagrunertk8s-ci-robot
authored andcommitted
Re-allow using http/1.1 for the metrics endpoint
Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
1 parent 632feeb commit 2dc665d

File tree

1 file changed

+5
-0
lines changed
  • cmd/security-profiles-operator

1 file changed

+5
-0
lines changed

cmd/security-profiles-operator/main.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -661,6 +661,10 @@ func runDaemon(ctx *cli.Context, info *version.Info) error {
661661
return fmt.Errorf("start metrics grpc server: %w", err)
662662
}
663663

664+
disableHTTP2 := func(c *tls.Config) {
665+
c.NextProtos = []string{"http/1.1"}
666+
}
667+
664668
ctrlOpts := ctrl.Options{
665669
Cache: cache.Options{SyncPeriod: &sync},
666670
HealthProbeBindAddress: fmt.Sprintf(":%d", config.HealthProbePort),
@@ -673,6 +677,7 @@ func runDaemon(ctx *cli.Context, info *version.Info) error {
673677
ExtraHandlers: map[string]http.Handler{
674678
metrics.HandlerPath: met.Handler(),
675679
},
680+
TLSOpts: []func(*tls.Config){disableHTTP2},
676681
},
677682
}
678683

0 commit comments

Comments
 (0)