mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-19 09:52:49 +00:00
Merge pull request #68143 from shyamjvs/garbage-collect-kubemark-image
Automatic merge from submit-queue (batch tested with PRs 68127, 68143). If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md. GC kubemark image after cluster starts up Last piece to fix https://github.com/kubernetes/kubernetes/issues/59567 /cc @wojtek-t ```release-note NONE ```
This commit is contained in:
commit
1cfeede6d5
@ -3072,3 +3072,8 @@ function ssh-to-node() {
|
||||
function prepare-e2e() {
|
||||
detect-project
|
||||
}
|
||||
|
||||
# Delete the image given by $1.
|
||||
function delete-image() {
|
||||
gcloud container images delete --quiet "$1"
|
||||
}
|
||||
|
@ -39,6 +39,7 @@ MASTER_OS_DISTRIBUTION=${KUBE_MASTER_OS_DISTRIBUTION:-gci}
|
||||
NODE_OS_DISTRIBUTION=${KUBE_NODE_OS_DISTRIBUTION:-gci}
|
||||
MASTER_IMAGE=${KUBE_GCE_MASTER_IMAGE:-cos-stable-65-10323-64-0}
|
||||
MASTER_IMAGE_PROJECT=${KUBE_GCE_MASTER_PROJECT:-cos-cloud}
|
||||
CLEANUP_KUBEMARK_IMAGE=${CLEANUP_KUBEMARK_IMAGE:-true}
|
||||
|
||||
# GPUs supported in GCE do not have compatible drivers in Debian 7.
|
||||
if [[ "${NODE_OS_DISTRIBUTION}" == "debian" ]]; then
|
||||
|
@ -220,6 +220,14 @@ function create-and-upload-hollow-node-image {
|
||||
cd $CURR_DIR
|
||||
fi
|
||||
echo "Created and uploaded the kubemark hollow-node image to docker registry."
|
||||
# Cleanup the kubemark image after the script exits.
|
||||
if [[ "${CLEANUP_KUBEMARK_IMAGE:-}" == "true" ]]; then
|
||||
trap delete-kubemark-image EXIT
|
||||
fi
|
||||
}
|
||||
|
||||
function delete-kubemark-image {
|
||||
delete-image "${KUBEMARK_IMAGE_REGISTRY}/kubemark:${KUBEMARK_IMAGE_TAG}"
|
||||
}
|
||||
|
||||
# Generate secret and configMap for the hollow-node pods to work, prepare
|
||||
|
Loading…
Reference in New Issue
Block a user