100 lines
3.3 KiB
Plaintext

# Contributor: Stefan Reimer <stefan@zero-downtime.net>
# Maintainer: Stefan Reimer <stefan@zero-downtime.net>
pkgname=kubezero
pkgver=1.31.5
_containerd=1.7.25-r1337
_ecr=1.31.4
_iam=0.6.29
pkgrel=0
pkgdesc="KubeZero release package"
url="https://git.zero-downtime.net/ZeroDownTime/alpine-overlay/src/branch/master/kubezero/kubezero"
arch="x86_64"
license="AGPL-3.0"
makedepends="podman"
depends="
xz
cri-tools
crun
containerd=$_containerd
containerd-ctr=$_containerd
nerdctl
kubelet~$pkgver
kubectl~$pkgver
ecr-credential-provider~$_ecr
aws-iam-authenticator~$_iam
"
options="!check"
#install="$pkgname.post-install"
subpackages="
$pkgname-imagecache
"
IMAGES=""
# quay.io/cilium/cilium:v1.16.6
# ghcr.io/k8snetworkplumbingwg/multus-cni:v4.1.4
# "
#multus_version="4.0.2"
source="
shared-sys-fs.start
evictLocalNode.sh
credential-provider.yaml
kubelet.monit
containerd.conf
crictl.yaml
"
#multus-"$multus_version".tar.gz::https://github.com/k8snetworkplumbingwg/multus-cni/releases/download/v"$multus_version"/multus-cni_"$multus_version"_linux_amd64.tar.gz
# preinstall multus and cilium images
build() {
# pre loaded images
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() {
# drain local node
install -Dm755 "$srcdir"/evictLocalNode.sh "$pkgdir/usr/bin/evictLocalNode.sh"
mkdir -p $pkgdir/etc/kubernetes/manifests
install -Dm644 "$srcdir"/credential-provider.yaml "$pkgdir/etc/kubernetes/credential-provider.yaml"
# containerd settings
install -Dm644 "$srcdir"/containerd.conf "$pkgdir/etc/containerd/conf.d/kubezero.toml"
# crictl
install -Dm644 "$srcdir"/crictl.yaml "$pkgdir/etc/crictl.yaml"
# monit
install -Dm644 "$srcdir"/kubelet.monit "$pkgdir/etc/monit.d/kubelet.conf"
# multus
#install -Dm755 "$srcdir"/multus-cni_"$multus_version"_linux_amd64/multus $pkgdir/usr/libexec/cni/multus
}
# Preload container images all nodes need to speed up boot time and reduce data transfer
imagecache() {
mkdir -p "$subpkgdir/var/cache/zdt"
for i in $IMAGES; do
IMAGE_NAME=$(echo $i | sed -e 's/.*\///' -e 's/:.*//')
install -Dm644 "$srcdir"/$IMAGE_NAME.tar.xz "$subpkgdir/var/cache/zdt/$IMAGE_NAME.tar.xz"
done
}
sha512sums="
ecb33fc3a0ffc378723624858002f9f5e180e851b55b98ab6611ecc6a73d4719bc7de240f87683fc58de8bf577059e6f19b417655b5301ef8c32deff67a29dff shared-sys-fs.start
fce1013f7b1bfa8ee526de62e642a37fda3168889723e873d3fb69e257f4caa1423b5a14b9343b12a87f3b6f93c7d3861b854efda67ef2d6a42a5ca8cf3d1593 evictLocalNode.sh
92499ec9a8b3634c42b16c01d27f1c1bb650bcc074a2c8d9d16cfe2ea08942948989c6aae79bd2df562ff17df11bbc329e0971f15c4e64f944457825dee7aa79 credential-provider.yaml
8b81eb0fb66e6a739965db6af6a31c443e8f612c06146bd51107372abd833b527423299ee11b27e011f46cfbee11415234b3fa0dea695dbbb06711e0ad58f08d kubelet.monit
dda96910382f65c69672a60c789f0e0f9883f8a018a07fde2f16ad27e62af900a74d55d5892029346dafbe81c58bca8396a3f6691c75434a9977fcc61ea452b9 containerd.conf
b112ffd86f095aec47bf75179659af20720792c453d6cc9d11db26446aa2f3c237fe59b793dd8ef3ee93f6fd4230ff8abadfdada76e6452779b982a71eb37cb9 crictl.yaml
"