Install and use a reverse proxy for staging devfile registry (#5922)

* Kubernetes Manifests to deploy nginx reverse proxy for staging devfile registry

* Get the external address of the loadBalancer service for devfile proxy

* If DEVFILE_PROXY is defined, use it as Devfile registry

* Fix get address from Windows

* Add some log displaying proxy address found

* Filter requests on user agent

* Add Go-http-client user-agent

* Add doc
This commit is contained in:
Philippe Martin
2022-07-20 11:31:25 +02:00
committed by GitHub
parent e7588e33ef
commit f4a860ec2e
6 changed files with 159 additions and 1 deletions

View File

@@ -12,6 +12,8 @@ cleanup_namespaces
export SKIP_USER_LOGIN_TESTS=true
(
set -e
export DEVFILE_PROXY="$(kubectl get svc -n devfile-proxy nginx -o jsonpath='{.status.loadBalancer.ingress[0].hostname}' || true)"
echo Using Devfile proxy: ${DEVFILE_PROXY}
make install
make test-integration
make test-e2e

View File

@@ -13,6 +13,8 @@ cleanup_namespaces
(
set -e
export DEVFILE_PROXY="$(kubectl get svc -n devfile-proxy nginx -o jsonpath='{.status.loadBalancer.ingress[0].hostname}' || true)"
echo Using Devfile proxy: ${DEVFILE_PROXY}
make install
make test-integration
make test-e2e

View File

@@ -64,6 +64,14 @@ function Run-Test {
oc login -u apikey -p ${API_KEY} ${IBM_OPENSHIFT_ENDPOINT}
Check-ExitCode $LASTEXITCODE
Shout "Getting Devfile proxy address"
$DEVFILE_PROXY=$(oc get svc -n devfile-proxy nginx -o jsonpath='{.status.loadBalancer.ingress[0].hostname}')
if ( $LASTEXITCODE -eq 0 )
{
Shout "Using Devfile proxy: $DEVFILE_PROXY"
[Environment]::SetEnvironmentVariable("DEVFILE_PROXY", "$DEVFILE_PROXY")
}
Shout "Create Binary"
make install
Shout "Running test"