31 lines
1.0 KiB
Bash
Executable File
31 lines
1.0 KiB
Bash
Executable File
#!/bin/sh -eu
|
|
# vim: ts=4 et:
|
|
|
|
[ -z "$DEBUG" ] || [ "$DEBUG" = 0 ] || set -x
|
|
|
|
SETUP=/tmp/setup.d
|
|
TARGET=/mnt
|
|
|
|
KUBE_VERSION=1.22
|
|
AWS_IAM_VERSION=0.5.6
|
|
|
|
# Enable ZDT repo
|
|
echo "@kubezero https://cdn.zero-downtime.net/alpine/v${VERSION}/kubezero" >> "$TARGET/etc/apk/repositories"
|
|
install -o root -g root -Dm600 -t $TARGET/etc/apk/keys $SETUP/stefan@zero-downtime.net-61bb6bfb.rsa.pub
|
|
|
|
apk -U --root "$TARGET" --no-cache add \
|
|
cri-tools@kubezero \
|
|
cri-o@kubezero=~$KUBE_VERSION \
|
|
kubelet@kubezero=~$KUBE_VERSION \
|
|
kubectl@kubezero=~$KUBE_VERSION
|
|
|
|
# aws-iam-authenticator
|
|
wget -qO $TARGET/usr/local/bin/aws-iam-authenticator https://github.com/kubernetes-sigs/aws-iam-authenticator/releases/download/v${AWS_IAM_VERSION}/aws-iam-authenticator_${AWS_IAM_VERSION}_linux_amd64
|
|
chmod +x $TARGET/usr/local/bin/aws-iam-authenticator
|
|
echo "Installed aws-iam-authenticator binary version $AWS_IAM_VERSION"
|
|
|
|
# Pre-load container images
|
|
# echo 'Pre-loaded Kubernetes control container images'
|
|
|
|
printf '\n\n# Zero Down Time config applied'
|