Revision e6f34c3c98fe2e247fde581746e552d8cb18c33c authored by André Martins on 16 June 2021, 00:26:40 UTC, committed by André Martins on 16 June 2021, 00:40:51 UTC
Signed-off-by: André Martins <andre@cilium.io>
1 parent 435c9aa
microk8s-import.sh
#!/usr/bin/env bash
set -e
set -o pipefail
CONTAINER_ENGINE=${CONTAINER_ENGINE:-"docker"}
TARGET_IMAGE=${1:-""}
MICROK8S_CTR="microk8s.ctr"
main()
{
"$CONTAINER_ENGINE" image inspect "$TARGET_IMAGE" >/dev/null
LOCAL_IMAGE=$(mktemp "$(echo $TARGET_IMAGE | sed 's/\//-/g').XXXXXX")
trap "rm -f $LOCAL_IMAGE" EXIT
"$CONTAINER_ENGINE" image save "$TARGET_IMAGE" -o "$LOCAL_IMAGE"
"$MICROK8S_CTR" image import "$LOCAL_IMAGE"
echo "Update image tag like this when ready:"
echo " microk8s.kubectl -n kube-system set image ds/cilium cilium-agent=$TARGET_IMAGE"
echo "Or, redeploy the Cilium pods:"
echo " microk8s.kubectl -n kube-system delete pod -l k8s-app=cilium"
}
main "$@"
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...