Skip to content

Commit 14c9ec6

Browse files
kvapsfrezbo
authored andcommitted
feat: add 'zfs' extension
ZFS is a powerful and flexible file system that ensures data integrity and offers features like snapshots and storage pooling. Signed-off-by: Andrei Kvapil <[email protected]> Signed-off-by: Noel Georgi <[email protected]>
1 parent cca830e commit 14c9ec6

File tree

7 files changed

+46
-3
lines changed

7 files changed

+46
-3
lines changed

Diff for: Makefile

+3-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ endif
1818

1919
# keep in sync with Pkgfile
2020
BLDR_RELEASE ?= v0.2.0
21-
PKGS ?= v1.5.0-alpha.0-37-gd0eaedc
21+
PKGS ?= v1.5.0-alpha.0-38-g84cdfb6
2222

2323
BUILD := docker buildx build
2424
PLATFORM ?= linux/amd64,linux/arm64
@@ -54,7 +54,8 @@ TARGETS = \
5454
nvidia-open-gpu-kernel-modules \
5555
qemu-guest-agent \
5656
tailscale \
57-
usb-modem-drivers
57+
usb-modem-drivers \
58+
zfs
5859

5960
# Temporarily disabled, as mellanox-ofed fails to build with Linux 6.1
6061
# mellanox-ofed \

Diff for: Pkgfile

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ vars:
66
PKGS_PREFIX: ghcr.io/siderolabs
77
LINUX_FIRMWARE_VERSION: "20230625" # update this when updating PKGS_VERSION in Makefile
88
DRBD_DRIVER_VERSION: 9.2.4 # update this when updating PKGS_VERSION in Makefile
9+
ZFS_DRIVER_VERSION: 2.1.12 # update this when updating PKGS_VERSION in Makefile
910

1011
labels:
1112
org.opencontainers.image.source: https://github.com/siderolabs/extensions

Diff for: README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ All system extensions provided by Sidero Labs can be found in the [ghcr.io regis
4848
| Name | Image | Description | Version Format |
4949
| ----------------------------------- | ----------------------------------------------------------------------------------------------------- | ------------------ | ---------------------------------- |
5050
| [iscsi-tools](storage/iscsi-tools/) | [ghcr.io/siderolabs/iscsi-tools](https://github.com/siderolabs/extensions/pkgs/container/iscsi-tools) | Open iSCSI tools | `v0.1.0` |
51-
| [drbd](storage/drbd/) *disabled* | [ghcr.io/siderolabs/drbd](https://github.com/siderolabs/extensions/pkgs/container/drbd) | DRBD driver module | `upstream version`-`talos version` |
51+
| [drbd](storage/drbd/) | [ghcr.io/siderolabs/drbd](https://github.com/siderolabs/extensions/pkgs/container/drbd) | DRBD driver module | `upstream version`-`talos version` |
52+
| [zfs](storage/zfs/) | [ghcr.io/siderolabs/zfs](https://github.com/siderolabs/extensions/pkgs/container/zfs) | ZFS driver module | `upstream version`-`talos version` |
5253

5354
### Power
5455

Diff for: hack/release.toml

+6
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ QEMU Guest Agent is now supported as Talos System Extension. Requires Talos v1.5
2525
title = "Tailscale"
2626
description = """\
2727
Tailscale is now supported as Talos System Extension. Requires Talos v1.5.0 or later.
28+
"""
29+
30+
[notes.zfs]
31+
title = "ZFS"
32+
description = """\
33+
ZFS is now supported as Talos System Extension. Requires Talos v1.5.0 or later.
2834
"""
2935

3036
[notes.updates]

Diff for: storage/zfs/manifest.yaml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: v1alpha1
2+
metadata:
3+
name: zfs
4+
version: "$VERSION"
5+
author: Andrei Kvapil
6+
description: |
7+
This system extension provides kernel module driver for ZFS built against a specific Talos version.
8+
compatibility:
9+
talos:
10+
version: ">= v1.5.0"

Diff for: storage/zfs/pkg.yaml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: zfs
2+
variant: scratch
3+
shell: /toolchain/bin/bash
4+
dependencies:
5+
- stage: base
6+
# The pkgs version for a particular release of Talos as defined in
7+
# https://github.com/siderolabs/talos/blob/<talos version>/pkg/machinery/gendata/data/pkgs
8+
- image: "{{ .PKGS_PREFIX }}/zfs-pkg:{{ .BUILD_ARG_PKGS }}"
9+
steps:
10+
- prepare:
11+
- |
12+
sed -i 's#$VERSION#{{ .VERSION }}#' /pkg/manifest.yaml
13+
- install:
14+
- |
15+
mkdir -p /rootfs/lib/modules
16+
17+
cp -R /lib/modules/* /rootfs/lib/modules
18+
finalize:
19+
- from: /rootfs
20+
to: /rootfs
21+
- from: /pkg/manifest.yaml
22+
to: /

Diff for: storage/zfs/vars.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# the first part is the driver version and the second the talos version for which the module is built against
2+
VERSION: "{{ .ZFS_DRIVER_VERSION }}-{{ .BUILD_ARG_TAG }}"

0 commit comments

Comments
 (0)