Skip to content

Commit 9571433

Browse files
authored
fix: agent k8s deployment (#3983)
1 parent 5b6fbc6 commit 9571433

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

k8s/agent/deploy-agent.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ API_KEY=""
2727
AGENT_VERSION="latest"
2828
SKIP_VERIFY=false
2929
SERVER_URL=""
30+
ENVIRONMENT=""
3031

3132
POSITIONAL_ARGS=()
3233

@@ -41,6 +42,11 @@ while [[ $# -gt 0 ]]; do
4142
shift
4243
shift
4344
;;
45+
--environment)
46+
ENVIRONMENT="$2"
47+
shift
48+
shift
49+
;;
4450
-h|--help)
4551
showUsageAndExit
4652
;;
@@ -83,6 +89,10 @@ if [ -n "$SERVER_URL" ]; then
8389
extraCmd+=("--server-url" "$SERVER_URL")
8490
fi
8591

92+
if [ -n "$ENVIRONMENT" ]; then
93+
extraCmd+=("--environment" "$ENVIRONMENT")
94+
fi
95+
8696

8797
kubectl create -n $NAMESPACE secret generic tracetest-agent-secret --from-literal=api-key=$API_KEY
8898
curl $FILE_PATH \

k8s/agent/deploy-agent.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ spec:
1717
containers:
1818
- name: tracetest-agent
1919
image: kubeshop/tracetest-agent:TAG
20-
command: [EXTRA_CMD]
20+
args: [EXTRA_CMD]
2121
env:
2222
- name: TRACETEST_API_KEY
2323
valueFrom:

0 commit comments

Comments
 (0)