Compare commits

...

2 Commits

Author SHA1 Message Date
fca2d9530e Added kind-list-images
Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
2025-09-03 11:00:41 +01:00
Marcus Noble
3ad35f41c3 Update kind-create-cluster to v1.34 by default 2025-09-03 10:10:32 +01:00
3 changed files with 58 additions and 1 deletions

View File

@@ -3,7 +3,7 @@
source .utils
NAME=""
VERSION="1.32.0@sha256:c48c62eac5da28cdadcf560d1d8616cfa6783b58f0d94cf63ad1bf49600cb027"
VERSION="1.34.0@sha256:7416a61b42b1662ca6ca89f02028ac133a309a2a30ba309614e8ec94d976dc5a"
NODES="2"
FEATURE_GATES="MutatingAdmissionPolicy"
RUNTIME_CONFIG="admissionregistration.k8s.io/v1alpha1"

53
home/.bin/kind-list-images Executable file
View File

@@ -0,0 +1,53 @@
#!/usr/bin/env zsh
source .utils
TAG_COUNT=5
MINOR_VERSION="v1."
print_usage() {
orange "kind-list-images - List latest images for use with Kind nodes"
echo " "
underline "Usage:"
echo "kind-list-images [minor-version]"
echo " "
echo " "
underline "Options:"
echo "-h, --help show this help text"
echo "-n, --last-n-minors return the last n minor versions (default: ${TAG_COUNT})"
}
while test $# -gt 0; do
case "$1" in
-n|--last-n-minors)
shift
TAG_COUNT=$1
shift
;;
-h|--help)
print_usage
exit 0
;;
*)
MINOR_VERSION=$1
shift
;;
esac
done
TAGS=( $(crane ls kindest/node | sort | grep 'v1.' | grep -vE 'alpha|beta' | grep ${MINOR_VERSION}) )
declare -A latestMinor
for TAG in "${TAGS[@]}"; do
MINOR="${TAG%.*}"
latestMinor[$MINOR]=$TAG
done
RETURN_TAGS=( $(echo $latestMinor | tr ' ' '\n' | sort -r | head -n ${TAG_COUNT}) )
for TAG in "${RETURN_TAGS[@]}"; do
echo " - kindest/node:$(blue $TAG)@$(crane digest kindest/node:$TAG)"
done

View File

@@ -1 +1,5 @@
pinentry-program /opt/homebrew/bin//pinentry-mac
default-cache-ttl 0
max-cache-ttl 600
default-cache-ttl-ssh 0
max-cache-ttl-ssh 0