Skip to content

Commit c1d9ae9

Browse files
easyCZroboquat
authored andcommitted
[public-api] Route api.<domain> to public api service & deployment
1 parent beb02b6 commit c1d9ae9

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

components/proxy/conf/Caddyfile

+5
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,11 @@ https://{$GITPOD_DOMAIN} {
262262
}
263263
}
264264

265+
# public-api
266+
https://api.{$GITPOD_DOMAIN} {
267+
reverse_proxy public-api-server.{$KUBE_NAMESPACE}.{$KUBE_DOMAIN}:9000
268+
}
269+
265270
# workspaces
266271
https://*.*.{$GITPOD_DOMAIN} {
267272
import enable_log

components/public-api-server/main.go

+4
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ func main() {
2222
logger.WithError(err).Fatal("Failed to initialize public api server.")
2323
}
2424

25+
if err := register(srv); err != nil {
26+
logger.WithError(err).Fatal("Failed to register services.")
27+
}
28+
2529
if listenErr := srv.ListenAndServe(); listenErr != nil {
2630
logger.WithError(listenErr).Fatal("Failed to serve public api server")
2731
}

0 commit comments

Comments
 (0)