This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
IFS=$'\n\t' | |
set -eou pipefail | |
if [[ "$#" -ne 3 || "${1}" == '-h' || "${1}" == '--help' ]]; then | |
cat >&2 <<"EOF" | |
gcr-cleaner.sh will cleans up the gcr tags or untaged images pushed in a repository (image name with the specific tag) | |
and except the given number most recent images. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: gcr-cleaner | |
data: | |
# AUTH | |
SERVICE_ACCOUNT: [email protected] | |
GCR_URL_REGION: https://asia.gcr.io | |
# IMAGE_NAME must be full of image repository URL | |
IMAGE_NAME: asia.gcr.io/adept-primer-345706/alpine |