Skip to content

Commit 042e5b9

Browse files
committed
Make load test tag confiruable via env var, defaulting to same as CC.
1 parent ec8f772 commit 042e5b9

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

hack/loadtest/deploy.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
CC_IMAGE_REPOSITORY="${IMAGE_REPOSITORY:-us-docker.pkg.dev/castai-hub/library/cluster-controller}"
44
CC_IMAGE_TAG="${IMAGE_TAG:-latest}"
5+
LOAD_TEST_IMAGE_REPOSITORY="${LOAD_TEST_IMAGE_REPOSITORY:-$CC_IMAGE_REPOSITORY}"
6+
LOAD_TEST_IMAGE_TAG="${LOAD_TEST_IMAGE_TAG:-$CC_IMAGE_TAG}"
57
DEPLOY_CLUSTER_CONTROLLER="${DEPLOY_CLUSTER_CONTROLLER:-true}"
68

79
# Determine the directory where the script resides.
@@ -28,4 +30,6 @@ if [ "$DEPLOY_CLUSTER_CONTROLLER" = "true" ]; then
2830
fi
2931

3032
echo "Deploying load testing components"
31-
kubectl apply -k "$SCRIPT_DIR"
33+
kubectl kustomize "$SCRIPT_DIR" | \
34+
LOADTEST_REPOSITORY="$LOAD_TEST_IMAGE_REPOSITORY" LOADTEST_TAG="$LOAD_TEST_IMAGE_TAG" envsubst \$LOADTEST_REPOSITORY,\$LOADTEST_TAG | \
35+
kubectl apply -f -

hack/loadtest/loadtest-components.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ spec:
167167
serviceAccountName: castai-loadtest-agent-sa
168168
containers:
169169
- name: castai-agent
170-
image: docker.io/lachezarcast/cluster-controller:loadtest2 # TODO!
170+
image: ${LOADTEST_REPOSITORY}:${LOADTEST_TAG}
171171
imagePullPolicy: Always
172172
ports:
173173
- containerPort: 8080

0 commit comments

Comments
 (0)