Add kubezero-imagecache
This commit is contained in:
parent
094a11364e
commit
b3e8338df9
17
Dockerfile
17
Dockerfile
@ -1,12 +1,13 @@
|
|||||||
FROM alpine:3.17
|
FROM alpine:3.17
|
||||||
ARG ALPINE="v3.17"
|
ARG ALPINE="v3.17"
|
||||||
|
ARG BUILDUSER=alpine
|
||||||
|
|
||||||
RUN echo "http://dl-cdn.alpinelinux.org/alpine/${ALPINE}/main" > /etc/apk/repositories && \
|
RUN echo "http://dl-cdn.alpinelinux.org/alpine/${ALPINE}/main" > /etc/apk/repositories && \
|
||||||
echo "http://dl-cdn.alpinelinux.org/alpine/${ALPINE}/community" >> /etc/apk/repositories && \
|
echo "http://dl-cdn.alpinelinux.org/alpine/${ALPINE}/community" >> /etc/apk/repositories && \
|
||||||
echo "@edge-main http://dl-cdn.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories && \
|
echo "@edge-main http://dl-cdn.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories && \
|
||||||
echo "@edge-community http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories && \
|
echo "@edge-community http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories && \
|
||||||
echo "@kubezero https://cdn.zero-downtime.net/alpine/${ALPINE}/kubezero" >> /etc/apk/repositories && \
|
echo "@kubezero https://cdn.zero-downtime.net/alpine/${ALPINE}/kubezero" >> /etc/apk/repositories && \
|
||||||
wget -q -O /etc/apk/keys/stefan@zero-downtime.net-61bb6bfb.rsa.pub https://cdn.zero-downtime.net/alpine/stefan@zero-downtime.net-61bb6bfb.rsa.pub
|
wget -q -O /etc/apk/keys/stefan@zero-downtime.net-61bb6bfb.rsa.pub https://cdn.zero-downtime.net/alpine/stefan@zero-downtime.net-61bb6bfb.rsa.pub
|
||||||
|
|
||||||
RUN apk -U --no-cache upgrade && \
|
RUN apk -U --no-cache upgrade && \
|
||||||
apk --no-cache add \
|
apk --no-cache add \
|
||||||
@ -17,15 +18,17 @@ RUN apk -U --no-cache upgrade && \
|
|||||||
xz
|
xz
|
||||||
# gcc-gnat \
|
# gcc-gnat \
|
||||||
|
|
||||||
RUN adduser -D alpine && \
|
RUN adduser -D $BUILDUSER && \
|
||||||
addgroup alpine abuild && \
|
addgroup $BUILDUSER abuild && \
|
||||||
echo "permit nopass :abuild" > /etc/doas.d/doas.conf && \
|
echo "permit nopass :abuild" > /etc/doas.d/doas.conf && \
|
||||||
install -d -g abuild -m 775 /var/cache/distfiles && \
|
install -d -g abuild -m 775 /var/cache/distfiles && \
|
||||||
install -d -g abuild -m 775 /packages
|
install -d -g abuild -m 775 /packages && \
|
||||||
|
echo -e "$BUILDUSER:1:999\n$BUILDUSER:1001:64535" > /etc/subuid && \
|
||||||
|
echo -e "$BUILDUSER:1:999\n$BUILDUSER:1001:64535" > /etc/subgid
|
||||||
|
|
||||||
COPY abuilder aarch64-toolchain.sh /usr/bin/
|
COPY abuilder aarch64-toolchain.sh /usr/bin/
|
||||||
|
|
||||||
WORKDIR /home/alpine
|
WORKDIR /home/$BUILDUSER
|
||||||
USER alpine
|
USER $BUILDUSER
|
||||||
|
|
||||||
ENTRYPOINT ["abuilder"]
|
ENTRYPOINT ["abuilder"]
|
||||||
|
@ -8,7 +8,8 @@ url="https://git.zero-downtime.net/ZeroDownTime/alpine-overlay/src/branch/master
|
|||||||
arch="noarch"
|
arch="noarch"
|
||||||
license="AGPL-3.0"
|
license="AGPL-3.0"
|
||||||
depends="
|
depends="
|
||||||
podman
|
podman
|
||||||
|
xz
|
||||||
cri-tools
|
cri-tools
|
||||||
cri-o~$pkgver
|
cri-o~$pkgver
|
||||||
kubelet~$pkgver
|
kubelet~$pkgver
|
||||||
@ -17,15 +18,25 @@ depends="
|
|||||||
aws-iam-authenticator~0.6.2
|
aws-iam-authenticator~0.6.2
|
||||||
"
|
"
|
||||||
options="!check"
|
options="!check"
|
||||||
install="$pkgname.post-install"
|
#install="$pkgname.post-install"
|
||||||
|
|
||||||
|
subpackages="
|
||||||
|
$pkgname-imagecache
|
||||||
|
"
|
||||||
|
|
||||||
source="
|
source="
|
||||||
shared-sys-fs.start
|
shared-sys-fs.start
|
||||||
evictLocalNode.sh
|
evictLocalNode.sh
|
||||||
"
|
"
|
||||||
|
|
||||||
|
IMAGES="quay.io/cilium/cilium:v1.13.1 ghcr.io/k8snetworkplumbingwg/multus-cni:v3.9.3"
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
return 0
|
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() {
|
package() {
|
||||||
@ -36,6 +47,16 @@ package() {
|
|||||||
install -Dm755 "$srcdir"/evictLocalNode.sh "$pkgdir/usr/bin/evictLocalNode.sh"
|
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="
|
sha512sums="
|
||||||
b0cadf577ea912630efabf8d104f2edaa79bd1697a1f9224ce8a75354dd204196c6d3c15c0318afa44be10be9696ce20ef0015198ee0b74050897d164f77ae60 shared-sys-fs.start
|
b0cadf577ea912630efabf8d104f2edaa79bd1697a1f9224ce8a75354dd204196c6d3c15c0318afa44be10be9696ce20ef0015198ee0b74050897d164f77ae60 shared-sys-fs.start
|
||||||
fce1013f7b1bfa8ee526de62e642a37fda3168889723e873d3fb69e257f4caa1423b5a14b9343b12a87f3b6f93c7d3861b854efda67ef2d6a42a5ca8cf3d1593 evictLocalNode.sh
|
fce1013f7b1bfa8ee526de62e642a37fda3168889723e873d3fb69e257f4caa1423b5a14b9343b12a87f3b6f93c7d3861b854efda67ef2d6a42a5ca8cf3d1593 evictLocalNode.sh
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
CILIUM=v1.13.1
|
|
||||||
MULTUS=v3.9.3
|
|
||||||
|
|
||||||
# Pre-Pull CNI images
|
|
||||||
podman pull quay.io/cilium/cilium:$CILIUM
|
|
||||||
podman pull ghcr.io/k8snetworkplumbingwg/multus-cni:$MULTUS
|
|
Loading…
Reference in New Issue
Block a user