wip: use persistent volumes for portage, binpkgs

pull/1/head
Dustin 2024-12-22 20:29:33 -06:00
parent 05e8dbcc5b
commit 3cf8eb4fef
2 changed files with 19 additions and 4 deletions

View File

@ -21,12 +21,21 @@ spec:
name: workspace-volume name: workspace-volume
subPath: gentoo subPath: gentoo
- mountPath: /usr/aarch64-unknown-linux-gnu/var/cache/binpkgs - mountPath: /usr/aarch64-unknown-linux-gnu/var/cache/binpkgs
name: workspace-volume name: binpkgs
subPath: binpkgs subPath: photoframe2
- mountPath: /var/cache/binpkgs - mountPath: /var/cache/binpkgs
name: workspace-volume name: binpkgs
subPath: binpkgs subPath: photoframe2
- mountPath: /var/cache/distfiles - mountPath: /var/cache/distfiles
name: workspace-volume name: workspace-volume
subPath: distfiles subPath: distfiles
- mountPath: /var/db/repos/gentoo
name: portage
hostUsers: false hostUsers: false
volumes:
- name: binpkgs
persistentVolumeClaim:
claimName: binpkgs
- name: portage
persistentVolumeClaim:
claimName: portage

View File

@ -1,5 +1,11 @@
#!/bin/sh #!/bin/sh
if [ ! -f /var/db/repos/gentoo/metadata/timestamp ]; then
emerge-webrsync
fi
if [ "$(find /var/db/repos/gentoo/metadata -newermt '-24 hours' | wc -l)" -eq 0 ]; then
emaint sync
fi
mkdir -p /etc/portage/package.use mkdir -p /etc/portage/package.use
mkdir -p /etc/portage/make.conf mkdir -p /etc/portage/make.conf