mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 05:57:25 +00:00
Make latest.txt files non-cacheable
This commit is contained in:
parent
8982776b54
commit
ec43cb0ed0
@ -1177,7 +1177,9 @@ function kube::release::gcs::publish() {
|
|||||||
|
|
||||||
local contents
|
local contents
|
||||||
if [[ ${KUBE_GCS_MAKE_PUBLIC} =~ ^[yY]$ ]]; then
|
if [[ ${KUBE_GCS_MAKE_PUBLIC} =~ ^[yY]$ ]]; then
|
||||||
|
kube::log::status "Making uploaded version file public and non-cacheable."
|
||||||
gsutil acl ch -R -g all:R "${publish_file_dst}" >/dev/null 2>&1 || return 1
|
gsutil acl ch -R -g all:R "${publish_file_dst}" >/dev/null 2>&1 || return 1
|
||||||
|
gsutil setmeta -h "Cache-Control:private, max-age=0" "${publish_file_dst}" >/dev/null 2>&1 || return 1
|
||||||
# If public, validate public link
|
# If public, validate public link
|
||||||
local -r public_link="https://storage.googleapis.com/${KUBE_GCS_RELEASE_BUCKET}/${publish_file}"
|
local -r public_link="https://storage.googleapis.com/${KUBE_GCS_RELEASE_BUCKET}/${publish_file}"
|
||||||
kube::log::status "Validating uploaded version file at ${public_link}"
|
kube::log::status "Validating uploaded version file at ${public_link}"
|
||||||
|
Loading…
Reference in New Issue
Block a user