From 471985557ab6068d497ec01247512084284da661 Mon Sep 17 00:00:00 2001 From: Arnaud Meukam Date: Thu, 2 Mar 2023 16:56:52 +0100 Subject: [PATCH] remove retention policy for staging buckets Follow-up of: - https://github.com/kubernetes/kubernetes/pull/115634 The current retention policy prevent creation or update of new objects until the existing one are deleted based on the retention period. Signed-off-by: Arnaud Meukam --- cluster/gce/util.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cluster/gce/util.sh b/cluster/gce/util.sh index fafdbfa02ea..d287b1627a3 100755 --- a/cluster/gce/util.sh +++ b/cluster/gce/util.sh @@ -326,16 +326,17 @@ function upload-tars() { local node_binary_tar_urls=() for region in "${PREFERRED_REGION[@]}"; do - retention_period="1d" # https://cloud.google.com/storage/docs/bucket-lock#retention-periods suffix="-${region}" local staging_bucket="gs://kubernetes-staging-${project_hash}${suffix}" # Ensure the buckets are created if ! gsutil ls "${staging_bucket}" >/dev/null; then echo "Creating ${staging_bucket}" - gsutil mb -l "${region}" -p "${PROJECT}" --retention "${retention_period}" "${staging_bucket}" + gsutil mb -l "${region}" -p "${PROJECT}" "${staging_bucket}" fi + gsutil retention clear "${staging_bucket}" + local staging_path="${staging_bucket}/${INSTANCE_PREFIX}-devel" echo "+++ Staging tars to Google Storage: ${staging_path}"