Skip to content

Commit

Permalink
fix: agent k8s deployment (#3983)
Browse files Browse the repository at this point in the history
  • Loading branch information
mathnogueira committed Aug 23, 2024
1 parent 5b6fbc6 commit 9571433
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions k8s/agent/deploy-agent.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ API_KEY=""
AGENT_VERSION="latest"
SKIP_VERIFY=false
SERVER_URL=""
ENVIRONMENT=""

POSITIONAL_ARGS=()

Expand All @@ -41,6 +42,11 @@ while [[ $# -gt 0 ]]; do
shift
shift
;;
--environment)
ENVIRONMENT="$2"
shift
shift
;;
-h|--help)
showUsageAndExit
;;
Expand Down Expand Up @@ -83,6 +89,10 @@ if [ -n "$SERVER_URL" ]; then
extraCmd+=("--server-url" "$SERVER_URL")
fi

if [ -n "$ENVIRONMENT" ]; then
extraCmd+=("--environment" "$ENVIRONMENT")
fi


kubectl create -n $NAMESPACE secret generic tracetest-agent-secret --from-literal=api-key=$API_KEY
curl $FILE_PATH \
Expand Down
2 changes: 1 addition & 1 deletion k8s/agent/deploy-agent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
containers:
- name: tracetest-agent
image: kubeshop/tracetest-agent:TAG
command: [EXTRA_CMD]
args: [EXTRA_CMD]
env:
- name: TRACETEST_API_KEY
valueFrom:
Expand Down

0 comments on commit 9571433

Please sign in to comment.