Skip to content

Commit 0747816

Browse files
committed
fix flag forwarding microvm
Signed-off-by: npolshakova <nina.polshakova@solo.io>
1 parent 6f21366 commit 0747816

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

hack/run-microvm-demo.sh

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,24 @@
3131
# OUT asset dir (default: $PWD/bin/microvm-assets/$ARCH, gitignored).
3232
# ATE_INSTALL_KIND "true" for the kind path (stage assets to rustfs + install-ate-kind.sh);
3333
# default false uploads assets to GCS + uses install-ate.sh.
34+
#
35+
# Flags:
36+
# --egress Enable actor egress capture via agentgateway (forwarded to
37+
# install-ate.sh / install-ate-kind.sh).
3438

3539
set -o errexit -o nounset -o pipefail
3640

3741
ROOT="$(git rev-parse --show-toplevel)"
3842
cd "${ROOT}"
3943

44+
# Parse flags before sourcing the environment so they are available to all steps.
45+
EGRESS_FLAG=""
46+
for arg in "$@"; do
47+
case "${arg}" in
48+
--egress) EGRESS_FLAG="--egress" ;;
49+
esac
50+
done
51+
4052
# Source the environment (cluster, registry, bucket) like the other hack scripts;
4153
# hack/run-microvm-demo-kind.sh sets NO_DEV_ENV to skip this and use kind defaults.
4254
if [[ -r .ate-dev-env.sh ]] && [[ -z "${NO_DEV_ENV:-}" ]]; then
@@ -52,6 +64,7 @@ ATE_API_AUTH_MODE="${ATE_API_AUTH_MODE:-mtls}"
5264

5365
while [[ $# -gt 0 ]]; do
5466
case "$1" in
67+
--egress) EGRESS_FLAG="--egress" ;;
5568
--auth-mode=*) ATE_API_AUTH_MODE="${1#*=}" ;;
5669
--auth-mode)
5770
if [[ $# -lt 2 ]]; then
@@ -131,10 +144,10 @@ fi
131144
log "Deploying the ate control plane (--deploy-ate-system)..."
132145
if [[ "${ATE_INSTALL_KIND}" == "true" ]]; then
133146
# install-ate-kind.sh sets NO_DEV_ENV/KO_DOCKER_REPO/ARCH/ATE_INSTALL_KIND itself.
134-
KUBECTL_CONTEXT="${KUBECTL_CONTEXT}" hack/install-ate-kind.sh --deploy-ate-system --auth-mode="${ATE_API_AUTH_MODE}"
147+
KUBECTL_CONTEXT="${KUBECTL_CONTEXT}" hack/install-ate-kind.sh --deploy-ate-system --auth-mode="${ATE_API_AUTH_MODE}" ${EGRESS_FLAG}
135148
else
136149
# GKE path: pass KO_DOCKER_REPO/BUCKET_NAME/KUBECTL_CONTEXT through the env.
137-
KUBECTL_CONTEXT="${KUBECTL_CONTEXT}" hack/install-ate.sh --deploy-ate-system --auth-mode="${ATE_API_AUTH_MODE}"
150+
KUBECTL_CONTEXT="${KUBECTL_CONTEXT}" hack/install-ate.sh --deploy-ate-system --auth-mode="${ATE_API_AUTH_MODE}" ${EGRESS_FLAG}
138151
fi
139152

140153
# --- 4. apply the demo ------------------------------------------------------

0 commit comments

Comments
 (0)