Skip to content

Commit

Permalink
feat: add nfsd extension
Browse files Browse the repository at this point in the history
Use nfsd kernel module.

Signed-off-by: Andrey Smirnov <[email protected]>
  • Loading branch information
cm-enfuse authored and smira committed Mar 5, 2025
1 parent edc675e commit b28f3e1
Show file tree
Hide file tree
Showing 8 changed files with 63 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .kres.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ spec:
- mei
- metal-agent
- nebula
- nfsd
- nut-client
- nvidia-container-toolkit-lts
- nvidia-container-toolkit-production
Expand Down Expand Up @@ -69,7 +70,7 @@ spec:
- name: EXTENSIONS_IMAGE_REF
defaultValue: $(REGISTRY_AND_USERNAME)/extensions:$(TAG)
- name: PKGS
defaultValue: v1.10.0-alpha.0-49-g347ad26
defaultValue: v1.10.0-alpha.0-50-g023f092
- name: PKGS_PREFIX
defaultValue: ghcr.io/siderolabs
- name: TOOLS
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 2025-03-04T11:26:41Z by kres 1281806.
# Generated on 2025-03-04T14:42:58Z by kres 1281806.

# common variables

Expand Down Expand Up @@ -50,7 +50,7 @@ COMMON_ARGS += --build-arg=TOOLS_PREFIX="$(TOOLS_PREFIX)"
# extra variables

EXTENSIONS_IMAGE_REF ?= $(REGISTRY_AND_USERNAME)/extensions:$(TAG)
PKGS ?= v1.10.0-alpha.0-49-g347ad26
PKGS ?= v1.10.0-alpha.0-50-g023f092
PKGS_PREFIX ?= ghcr.io/siderolabs
TOOLS ?= v1.10.0-alpha.0-18-gfcee25b
TOOLS_PREFIX ?= ghcr.io/siderolabs
Expand Down Expand Up @@ -85,6 +85,7 @@ TARGETS += mdadm
TARGETS += mei
TARGETS += metal-agent
TARGETS += nebula
TARGETS += nfsd
TARGETS += nut-client
TARGETS += nvidia-container-toolkit-lts
TARGETS += nvidia-container-toolkit-production
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ cosign verify --certificate-identity-regexp '@siderolabs\.com$' --certificate-oi
| [v4l-uvc](drivers/v4l-uvc/) | [ghcr.io/siderolabs/v4l-uvc-drivers](https://github.com/siderolabs/extensions/pkgs/container/v4l-uvc-drivers) | USB Video Class (Webcam) drivers | `talos version` |

### Digital Video Broadcasting (DVB)

| Name | Image | Description | Version Format |
| ------------------------------- | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ | --------------- |
| [dvb-cx23885](dvb/dvb-cx23885/) | [ghcr.io/siderolabs/dvb-cx23885](https://github.com/siderolabs/extensions/pkgs/container/dvb-cx23885) | DVB kernel modules + firmware for Hauppage WinTV-quadHD PCIe | `talos version` |
Expand All @@ -103,7 +104,6 @@ cosign verify --certificate-identity-regexp '@siderolabs\.com$' --certificate-oi
| [lldpd](network/lldpd/) | [ghcr.io/siderolabs/lldpd](https://github.com/siderolabs/extensions/pkgs/container/lldpd) | [LLDP](https://github.com/lldpd/lldpd) | `upstream version` |
| [tailscale](network/tailscale/) | [ghcr.io/siderolabs/tailscale](https://github.com/siderolabs/extensions/pkgs/container/tailscale) | [Tailscale](https://tailscale.com) | `upstream version` |


### Storage

| Name | Image | Description | Version Format |
Expand All @@ -112,9 +112,9 @@ cosign verify --certificate-identity-regexp '@siderolabs\.com$' --certificate-oi
| [drbd](storage/drbd/) | [ghcr.io/siderolabs/drbd](https://github.com/siderolabs/extensions/pkgs/container/drbd) | DRBD driver module | `upstream version`-`talos version` |
| [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` |
| [mdadm](storage/mdadm/) | [ghcr.io/siderolabs/mdadm](https://github.com/siderolabs/extensions/pkgs/container/mdadm) | manage MD devices tool | `upstream version` |
| [nfsd](storage/nfsd/) | [ghcr.io/siderolabs/nfsd](https://github.com/siderolabs/extensions/pkgs/container/nfsd) | nfsd kernel module | `talos version` |
| [zfs](storage/zfs/) | [ghcr.io/siderolabs/zfs](https://github.com/siderolabs/extensions/pkgs/container/zfs) | ZFS driver module | `upstream version`-`talos version` |


### Power

| Name | Image | Description | Version Format |
Expand Down
6 changes: 6 additions & 0 deletions hack/release.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ Intel u-code: 20250211
title = "Nebula"
description = """\
[Nebula](https://github.com/slackhq/nebula) is now supported as a system extension.
"""

[notes.nfsd]
title = "NFS Server"
description = """\
The NFS server (nfds) as a kernel module is now supported as a system extension.
"""

[make_deps]
4 changes: 4 additions & 0 deletions storage/nfsd/files/modules.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
modules.order
modules.builtin
modules.builtin.modinfo
kernel/fs/nfsd/nfsd.ko
10 changes: 10 additions & 0 deletions storage/nfsd/manifest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: v1alpha1
metadata:
name: nfsd
version: "$VERSION"
author: Cameron Mehl
description: |
This system extension provides kernel module driver for NFSD built against a specific Talos version.
compatibility:
talos:
version: ">= v1.2.0"
34 changes: 34 additions & 0 deletions storage/nfsd/pkg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: nfsd
variant: scratch
shell: /bin/bash
dependencies:
- stage: base
# The pkgs version for a particular release of Talos as defined in
# https://github.com/siderolabs/talos/blob/<talos version>/pkg/machinery/gendata/data/pkgs
- image: "{{ .BUILD_ARG_PKGS_PREFIX }}/kernel:{{ .BUILD_ARG_PKGS }}"
steps:
- prepare:
- |
sed -i 's#$VERSION#{{ .VERSION }}#' /pkg/manifest.yaml
- install:
- |
export KERNELRELEASE=$(find /usr/lib/modules -type d -name "*-talos" -exec basename {} \+)
mkdir -p /rootfs
xargs -a /pkg/files/modules.txt -I {} install -D /usr/lib/modules/${KERNELRELEASE}/{} /rootfs/usr/lib/modules/${KERNELRELEASE}/{}
depmod -b /rootfs/usr ${KERNELRELEASE}
- test:
- |
# https://www.kernel.org/doc/html/v4.15/admin-guide/module-signing.html#signed-modules-and-stripping
find /rootfs/usr/lib/modules -name '*.ko' -exec grep -FL '~Module signature appended~' {} \+
- |
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: /
2 changes: 2 additions & 0 deletions storage/nfsd/vars.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# the first part is the driver version and the second the talos version for which the module is built against
VERSION: "{{ .BUILD_ARG_TAG }}"

0 comments on commit b28f3e1

Please sign in to comment.