Skip to content

Commit

Permalink
integration with ide-proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
iQQBot committed Aug 5, 2022
1 parent 18887ca commit 3de926c
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
18 changes: 16 additions & 2 deletions components/ide-proxy/conf/Caddyfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
{
auto_https off
admin off
servers {
protocol {
# gprc service required this, see detail https://github.com/gitpod-io/gitpod/pull/11542#discussion_r937947826
allow_h2c
}
}
}

(compression) {
Expand Down Expand Up @@ -63,7 +69,7 @@
}

@static_path {
path /*
path /code/* /image/*
}

handle @static_path {
Expand All @@ -77,8 +83,16 @@
}
}

@metrics_web {
path /metrics-api/*
}

handle @metrics_web {
reverse_proxy ide-metrics.{$KUBE_NAMESPACE}.{$KUBE_DOMAIN}:3000
}

handle {
respond "404 - Not Found" 404
reverse_proxy h2c://ide-metrics.{$KUBE_NAMESPACE}.{$KUBE_DOMAIN}:3000
}
}

Expand Down
4 changes: 4 additions & 0 deletions components/ide-proxy/debug.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

set -Eeuo pipefail
source /workspace/gitpod/scripts/ws-deploy.sh deployment ide-proxy false
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ https://ide.{{.Domain}} {
import ssl_configuration
reverse_proxy {
to {{.ReverseProxy}}
to h2c://{{.ReverseProxy}}
}
}
}

0 comments on commit 3de926c

Please sign in to comment.