Skip to content

Commit

Permalink
feat(mergerfs): Add mergerfs extensions
Browse files Browse the repository at this point in the history
This will fix #396
  • Loading branch information
samip5 committed Jul 16, 2024
1 parent b48d3a6 commit 7481e9d
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 0 deletions.
1 change: 1 addition & 0 deletions .kres.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ spec:
- iscsi-tools
- kata-containers
- mdadm
- mergerfs
- nut-client
- nvidia-container-toolkit
- nvidia-fabricmanager
Expand Down
2 changes: 2 additions & 0 deletions Pkgfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ vars:
LIBTIRPC_VERSION: 1-3-3
# renovate: datasource=github-tags extractVersion=^v(?<version>.*)$ depName=madler/zlib
ZLIB_VERSION: 1.3.1
# renovate: datasource=github-releases depName=trapexit/mergerfs
MERGERFS_VERSION: 2.40.2

labels:
org.opencontainers.image.source: https://github.com/siderolabs/extensions
10 changes: 10 additions & 0 deletions storage/mergerfs/manifest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: v1alpha1
metadata:
name: mergerfs
version: "$VERSION"
author: Skyler Mäntysaari
description: |
mergerfs is a union filesystem geared towards simplifying storage and management of files across numerous commodity storage devices.
compatibility:
talos:
version: ">= v1.7.0"
15 changes: 15 additions & 0 deletions storage/mergerfs/mergerfs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: mergerfs
depends:
- configuration: true
container:
entrypoint: /usr/local/bin/mergerfs
args:
- -o config=/usr/local/etc/mergerfs/config.ini
mounts:
- source: /var/mnt
destination: /var/mnt
type: bind
options:
- bind
- rw
restart: always
38 changes: 38 additions & 0 deletions storage/mergerfs/pkg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: mergerfs
variant: scratch
shell: /toolchain/bin/bash
dependencies:
- stage: base
steps:
- sources:
# {{ if eq .ARCH "aarch64" }} This in fact is YAML comment, but Go templating instruction is evaluated by bldr
- url: https://github.com/trapexit/mergerfs/releases/download/{{ .MERGERFS_VERSION }}/mergerfs-static-linux_arm64.tar.gz
destination: mergerfs-static.tar.gz
sha256: 5a487019b4da69c1401d5a3ec10003af2f68291a777a0358e758c420beea0771
sha512: b6583f545c3d22541ae08513c3d8cfcda61a65a54cf3ab06b045ac62328d7ac526feb81926b809a1095a8c37016841ae2608293306201effc60ece6a5302e8af
# {{ else }} This in fact is YAML comment, but Go templating instruction is evaluated by bldr
- url: https://github.com/trapexit/mergerfs/releases/download/{{ .MERGERFS_VERSION }}/mergerfs-static-linux_amd64.tar.gz
destination: mergerfs-static.tar.gz
sha256: 524c7ec093b2339c5e3e90cf9876a01d6aa93706279f89beb9cff5efa9f6ba72
sha512: 24410f757f4cf2702ccb088dcceca147ce0e6a2f49c422e1898d1b7f5924d3037cb63243188e317492c8df5e1babccce84aa912d987f8362f8d97a2a3a8e1755
# {{ end }} This in fact is YAML comment, but Go templating instruction is evaluated by bldr
prepare:
- |
sed -i 's#$VERSION#{{ .VERSION }}#' /pkg/manifest.yaml
- |
mkdir -p /rootfs/usr/local/lib/containers/mergerfs
mkdir -p /rootfs/usr/local/etc/mergerfs
tar xf mergerfs-static.tar.gz -C /rootfs/usr/local/lib/containers/mergerfs
test:
- |
mkdir -p /extensions-validator-rootfs
cp -r /rootfs/ /extensions-validator-rootfs/rootfs
cp /pkg/manifest.yaml /extensions-validator-rootfs/manifest.yaml
/extensions-validator validate --rootfs=/extensions-validator-rootfs --pkg-name="${PKG_NAME}"
finalize:
- from: /rootfs
to: /rootfs
- from: /pkg/manifest.yaml
to: /
- from: /pkg/mergerfs.yaml
to: /rootfs/usr/local/etc/containers/
1 change: 1 addition & 0 deletions storage/mergerfs/vars.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VERSION: "{{ .MERGERFS_VERSION }}"

0 comments on commit 7481e9d

Please sign in to comment.