Skip to content

Commit 9b119ae

Browse files
authored
Fetch GNA secret when running IT locally (gardener#358)
1 parent de48356 commit 9b119ae

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

.ci/local_integration_test

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ if [ -z "$MACHINE_CONTROLLER_MANAGER_DEPLOYMENT_NAME" ]
175175
then
176176
MACHINE_CONTROLLER_MANAGER_DEPLOYMENT_NAME="machine-controller-manager"
177177
fi
178+
export MACHINE_CONTROLLER_MANAGER_DEPLOYMENT_NAME
178179

179180
if [ "$IS_CONTROL_CLUSTER_SEED" = true ]
180181
then
@@ -259,6 +260,14 @@ set -o allexport
259260
source .env
260261
set +o allexport
261262

263+
printf "\e[33mFetching the gardener-node-agent secret name. (If gardener-node-agent authorizer webhook is enabled, then this value is compulsory. Link to PR:https://github.com/gardener/gardener/pull/10535. The value can be found in machineClass.providerSpec.tags/labels. \e[0m\n"
264+
GNA_SECRET_NAME=$(kubectl --kubeconfig=$CONTROL_KUBECONFIG get mcc -n $CONTROL_CLUSTER_NAMESPACE -o jsonpath='{.items[0].providerSpec.spec.tags.worker\.gardener\.cloud-gardener-node-agent-secret-name}')
265+
if [ -z "$GNA_SECRET_NAME" ]
266+
then
267+
printf "\e[31m GNA Secret name is empty\e[0m\n"
268+
fi
269+
export GNA_SECRET_NAME=$GNA_SECRET_NAME
270+
262271
GARDEN_CORE_NAMESPACE=garden-core
263272

264273

@@ -274,6 +283,9 @@ fi
274283

275284
printf "\e[33mStarting integration tests...\e[0m\n"
276285

286+
# Create logs directory for controller tests
287+
mkdir -p .ci/controllers-test/logs
288+
277289
cd test/integration/controller
278290

279291
set +e

0 commit comments

Comments
 (0)