Skip to content

Commit

Permalink
It wasn't that easy. What we're going to do is use the manifest to te…
Browse files Browse the repository at this point in the history
…ll us what namespace to look in, and then look there
  • Loading branch information
AidanHilt committed Feb 12, 2024
1 parent 303cd15 commit f5be925
Showing 1 changed file with 13 additions and 20 deletions.
33 changes: 13 additions & 20 deletions gen3/bin/kube-setup-revproxy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,26 +111,19 @@ for name in $(g3kubectl get services -o json | jq -r '.items[] | .metadata.name'
fi
done

if g3kubectl get namespace argo > /dev/null 2>&1;
then
for argo in $(g3kubectl get services -n argo -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 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
if g3k_manifest_lookup .argo.argo_namespace 2> /dev/null; then
argo_namespace=$(g3k_manifest_lookup .argo.argo_namespace)

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

if g3kubectl get namespace argocd > /dev/null 2>&1;
Expand Down

0 comments on commit f5be925

Please sign in to comment.