Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(mergerfs): Add extension #428

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
#
# Generated on 2024-07-04T10:11:27Z by kres 8c8b007.
# Generated on 2024-07-16T09:31:28Z by kres ac94478.

# common variables

Expand All @@ -13,7 +13,7 @@ IMAGE_TAG ?= $(TAG)
OPERATING_SYSTEM := $(shell uname -s | tr '[:upper:]' '[:lower:]')
GOARCH := $(shell uname -m | sed 's/x86_64/amd64/' | sed 's/aarch64/arm64/')
REGISTRY ?= ghcr.io
USERNAME ?= siderolabs
USERNAME ?= skyssolutions
REGISTRY_AND_USERNAME ?= $(REGISTRY)/$(USERNAME)
KRES_IMAGE ?= ghcr.io/siderolabs/kres:latest
CONFORMANCE_IMAGE ?= ghcr.io/siderolabs/conform:latest
Expand Down Expand Up @@ -73,6 +73,7 @@ TARGETS += intel-ucode
TARGETS += iscsi-tools
TARGETS += kata-containers
TARGETS += mdadm
TARGETS += mergerfs
TARGETS += nut-client
TARGETS += nvidia-container-toolkit
TARGETS += 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"
16 changes: 16 additions & 0 deletions storage/mergerfs/mergerfs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: mergerfs
depends:
- service: cri
- configuration: true
container:
entrypoint: /usr/local/bin/mergerfs
args:
- -o config=/usr/local/etc/mergerfs/config.ini
samip5 marked this conversation as resolved.
Show resolved Hide resolved
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 }}"