mirror of https://github.com/k3s-io/k3s
GC kubemark image after cluster starts up
parent
14eb029fba
commit
63ce112d9e
|
@ -3130,3 +3130,8 @@ function ssh-to-node() {
|
||||||
function prepare-e2e() {
|
function prepare-e2e() {
|
||||||
detect-project
|
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}
|
NODE_OS_DISTRIBUTION=${KUBE_NODE_OS_DISTRIBUTION:-gci}
|
||||||
MASTER_IMAGE=${KUBE_GCE_MASTER_IMAGE:-cos-stable-65-10323-64-0}
|
MASTER_IMAGE=${KUBE_GCE_MASTER_IMAGE:-cos-stable-65-10323-64-0}
|
||||||
MASTER_IMAGE_PROJECT=${KUBE_GCE_MASTER_PROJECT:-cos-cloud}
|
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.
|
# GPUs supported in GCE do not have compatible drivers in Debian 7.
|
||||||
if [[ "${NODE_OS_DISTRIBUTION}" == "debian" ]]; then
|
if [[ "${NODE_OS_DISTRIBUTION}" == "debian" ]]; then
|
||||||
|
|
|
@ -220,6 +220,14 @@ function create-and-upload-hollow-node-image {
|
||||||
cd $CURR_DIR
|
cd $CURR_DIR
|
||||||
fi
|
fi
|
||||||
echo "Created and uploaded the kubemark hollow-node image to docker registry."
|
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
|
# Generate secret and configMap for the hollow-node pods to work, prepare
|
||||||
|
|
Loading…
Reference in New Issue