Skip to content

Commit

Permalink
[gke-automated-test-tool] Create a new custom-driver hash on each bui…
Browse files Browse the repository at this point in the history
…ld (#2818)

This is to handle google internal bug id
384494459 . This creates a new image hash
for each new custom csi driver image build
to force gke cluster nodes to use them on
re-run.
  • Loading branch information
gargnitingoogle authored Dec 18, 2024
1 parent cf35893 commit 4480221
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions perfmetrics/scripts/testing_on_gke/examples/run-gke-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,17 @@ function ensureGcsFuseCsiDriverCode() {
fi
}
uuid() {
if ! which uuidgen; then
# try to install uuidgen
sudo apt-get update && sudo apt-get install -y uuid-runtime
# confirm that it got installed.
which uuidgen
fi
echo $(uuidgen) | sed -e "s/\-//g" ;
}
function createCustomCsiDriverIfNeeded() {
if ${use_custom_csi_driver}; then
echo "Disabling managed CSI driver ..."
Expand Down Expand Up @@ -554,9 +565,10 @@ function createCustomCsiDriverIfNeeded() {
make generate-spec-yaml
printf "\nBuilding a new custom CSI driver using the above GCSFuse binary ...\n\n"
registry=gcr.io/${project_id}/${USER}/${cluster_name}
make build-image-and-push-multi-arch REGISTRY=${registry} GCSFUSE_PATH=gs://${package_bucket}
stagingversion=$(uuid)
make build-image-and-push-multi-arch REGISTRY=${registry} GCSFUSE_PATH=gs://${package_bucket} STAGINGVERSION=${stagingversion}
printf "\nInstalling the new custom CSI driver built above ...\n\n"
make install PROJECT=${project_id} REGISTRY=${registry}
make install PROJECT=${project_id} REGISTRY=${registry} STAGINGVERSION=${stagingversion}
cd -
# Wait some time after csi driver installation before deploying pods
Expand Down

0 comments on commit 4480221

Please sign in to comment.