Skip to content

Commit

Permalink
Expose plaintext server for ingress (#122)
Browse files Browse the repository at this point in the history
* expose plaintext server for ingress

* Add error log for plaintext server
  • Loading branch information
jmorganca committed Jul 20, 2021
1 parent 84977b3 commit 9f892d2
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions internal/registry/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,18 @@ func Run(options Options) error {
)
v1.RegisterV1Server(grpcServer, server)
reflection.Register(grpcServer)
httpServer := http.Server{
Addr: ":80",
Handler: grpcHandlerFunc(grpcServer, mux),
}

go func() {
err := httpServer.ListenAndServe()
if err != nil {
zapLogger.Error(err.Error())
}
}()

tlsServer := &http.Server{
Addr: ":443",
TLSConfig: tlsConfig,
Expand Down

0 comments on commit 9f892d2

Please sign in to comment.