alpine-overlay/kubezero/kubezero/APKBUILD

67 lines
1.9 KiB
Plaintext

# Contributor: Stefan Reimer <stefan@zero-downtime.net>
# Maintainer: Stefan Reimer <stefan@zero-downtime.net>
pkgname=kubezero
pkgver=1.26
pkgrel=0
pkgdesc="KubeZero release package"
url="https://git.zero-downtime.net/ZeroDownTime/alpine-overlay/src/branch/master/kubezero/kubezero"
arch="noarch"
license="AGPL-3.0"
depends="
podman
xz
cri-tools
cri-o~$pkgver
kubelet~$pkgver
kubectl~$pkgver
ecr-credential-provider~$pkgver
aws-iam-authenticator~0.6.2
"
options="!check"
#install="$pkgname.post-install"
subpackages="
$pkgname-imagecache
"
source="
shared-sys-fs.start
evictLocalNode.sh
"
IMAGES="
quay.io/cilium/cilium:v1.13.4
ghcr.io/k8snetworkplumbingwg/multus-cni:v3.9.3
"
build() {
for i in $IMAGES; do
IMAGE_NAME=$(echo $i | sed -e 's/.*\///' -e 's/:.*//')
podman --storage-driver vfs pull $i
podman --storage-driver vfs save $i | xz -z -T 0 - > $IMAGE_NAME.tar.xz
done
}
package() {
# make /sys shared
install -Dm755 "$srcdir"/shared-sys-fs.start "$pkgdir/etc/local.d/shared-sys-fs.start"
# drain local node
install -Dm755 "$srcdir"/evictLocalNode.sh "$pkgdir/usr/bin/evictLocalNode.sh"
}
# Preload container images all nodes need to speed up boot time and reduce data transfer
imagecache() {
mkdir -p "$subpkgdir/mnt/zdt/cache"
for i in $IMAGES; do
IMAGE_NAME=$(echo $i | sed -e 's/.*\///' -e 's/:.*//')
install -Dm644 "$srcdir"/$IMAGE_NAME.tar.xz "$subpkgdir/mnt/zdt/cache/$IMAGE_NAME.tar.xz"
done
}
sha512sums="
ecb33fc3a0ffc378723624858002f9f5e180e851b55b98ab6611ecc6a73d4719bc7de240f87683fc58de8bf577059e6f19b417655b5301ef8c32deff67a29dff shared-sys-fs.start
fce1013f7b1bfa8ee526de62e642a37fda3168889723e873d3fb69e257f4caa1423b5a14b9343b12a87f3b6f93c7d3861b854efda67ef2d6a42a5ca8cf3d1593 evictLocalNode.sh
"