K8s: Build openapi defs in production (#79182)

This commit is contained in:
Todd Treece
2023-12-07 00:06:18 +02:00
committed by GitHub
parent deb8faf1e3
commit cf164145bf
+2 -1
View File
@@ -391,6 +391,8 @@ func (s *service) start(ctx context.Context) error {
s.handler = server.Handler
s.restConfig = server.LoopbackClientConfig
prepared := server.PrepareRun()
// When running in production, do not start a standalone https server
if !s.config.devMode {
return nil
@@ -401,7 +403,6 @@ func (s *service) start(ctx context.Context) error {
return err
}
prepared := server.PrepareRun()
go func() {
s.stoppedCh <- prepared.Run(s.stopCh)
}()