Skip to content

Commit

Permalink
Fix detection of GEODESIC_TRACE (#864)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nuru authored Jul 23, 2023
1 parent 17a8c1d commit 4db6e8b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export DOCKER_ORG ?= cloudposse
export DOCKER_IMAGE ?= $(DOCKER_ORG)/geodesic
export DOCKER_BASE_TAG ?= dev
export DOCKER_BASE_OS ?= alpine
export DOCKER_BASE_OS ?= debian
export DOCKER_TAG ?= $(DOCKER_BASE_TAG)-$(DOCKER_BASE_OS)
export DOCKER_IMAGE_NAME_BASE ?= $(DOCKER_IMAGE):$(DOCKER_BASE_TAG)
export DOCKER_IMAGE_NAME ?= $(DOCKER_IMAGE):$(DOCKER_TAG)
Expand Down
3 changes: 2 additions & 1 deletion rootfs/etc/profile.d/set-cluster.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/bin/bash

# Usage:
# set-cluster <cluster-short-name>|off
# set-cluster <cluster-short-name> [role-short-name]
# set-cluster off
#
# With <cluster-short-name> updates the kubecfg file for the cluster with that short name (e.g. "corp")
# and updates KUBECONFIG to point to that file.
Expand Down
12 changes: 8 additions & 4 deletions rootfs/templates/wrapper
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ function use() {
--env GEODESIC_HOST_GID="${GROUP_ID}"
--env GEODESIC_LOCALHOST="${GEODESIC_LOCALHOST:=/localhost.bindfs}"
--env GEODESIC_BINDFS_OPTIONS
)
)
fi
fi

Expand All @@ -117,6 +117,10 @@ function use() {
fi

if [[ ${GEODESIC_CUSTOMIZATION_DISABLED-false} == false ]]; then
if [ -n "${GEODESIC_TRACE}" ]; then
DOCKER_ARGS+=(--env GEODESIC_TRACE)
fi

if [ -n "${ENV_FILE}" ]; then
DOCKER_ARGS+=(--env-file ${ENV_FILE})
fi
Expand Down Expand Up @@ -178,8 +182,8 @@ function use() {
echo "# Mounting ${local_home} into container with workdir ${GEODESIC_HOST_CWD}"
fi
DOCKER_ARGS+=(
--volume="${local_home}:${GEODESIC_LOCALHOST:-/localhost}"
--env LOCAL_HOME="${local_home}"
--volume="${local_home}:${GEODESIC_LOCALHOST:-/localhost}"
--env LOCAL_HOME="${local_home}"
)
fi

Expand All @@ -193,7 +197,7 @@ function use() {
--env DOCKER_NAME="${DOCKER_NAME}"
--env DOCKER_TAG="${DOCKER_TAG}"
--env GEODESIC_HOST_CWD="${GEODESIC_HOST_CWD}"
)
)

trap run_exit_hooks EXIT
# the extra curly braces around .ID are because this file goes through go template substitution locally before being installed as a shell script
Expand Down

0 comments on commit 4db6e8b

Please sign in to comment.