Skip to content

Commit

Permalink
It can't be that easy
Browse files Browse the repository at this point in the history
  • Loading branch information
AidanHilt committed Feb 12, 2024
1 parent 87704ae commit 303cd15
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
11 changes: 11 additions & 0 deletions gen3/bin/kube-setup-revproxy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,17 @@ then
done
fi

if g3kubectl get namespace argo-va-testing > /dev/null 2>&1;
then
for argo in $(g3kubectl get services -n argo-va-testing -o jsonpath='{.items[*].metadata.name}');
do
filePath="$scriptDir/gen3.nginx.conf/${argo}.conf"
if [[ -f "$filePath" ]]; then
confFileList+=("--from-file" "$filePath")
fi
done
fi

if g3kubectl get namespace argocd > /dev/null 2>&1;
then
filePath="$scriptDir/gen3.nginx.conf/argocd-server.conf"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
location /argo/ {
error_page 403 @errorworkspace;
set $authz_resource "/argo";
set $authz_method "access";
set $authz_service "argo";
# be careful - sub-request runs in same context as this request
auth_request /gen3-authz;

set $proxy_service "argo";
set $upstream http://argo-va-testing-argo-workflows-server.argo-va-testing.svc.cluster.local:2746;

rewrite ^/argo/(.*) /$1 break;

proxy_set_header Connection '';
proxy_http_version 1.1;
chunked_transfer_encoding off;

proxy_pass $upstream;
}

0 comments on commit 303cd15

Please sign in to comment.