[PR #49] Wolf-Agent DRA #50

Open
opened 2026-10-15 12:47:00 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/games-on-whales/fenrir/pull/49
Author: @axolotlite
Created: 7/23/2026
Status: 🔄 Open

Base: main ← Head: staging


📝 Commits (5)

  • a6949d0 Add Skaffold, .golangci, test ci steps, and change user into profile alongside new pairing method
  • 0e22074 [lint] create labels.go for centralized label management (#51)
  • 85e9e98 Wolf-Agent DRA: Development environment setup recipees in the Makefile (#50)
  • 03d3a02 Wolf-Agent DRA: Update App CRD & Session controller to use statefulsets instead of deployments (#53)
  • bd86c3b Wolf-Agent DRA: Update the code from golang 1.24 to 1.26 to use GA DRA Resources (#58)

📊 Changes

122 files changed (+7820 additions, -3208 deletions)

View changed files

➕ .air.toml (+18 -0)
📝 .dockerignore (+3 -0)
📝 .golangci.yml (+11 -5)
📝 Dockerfile (+3 -3)
➕ Dockerfile.dev (+22 -0)
📝 Makefile (+48 -1)
📝 charts/direwolf-operator/values.yaml (+20 -1)
📝 cmd/moonlight-proxy/main.go (+39 -19)
📝 cmd/operator/main.go (+29 -16)
📝 cmd/wolf-agent/main.go (+19 -10)
📝 crds/direwolf.games-on-whales.github.io_apps.yaml (+972 -279)
➕ crds/direwolf.games-on-whales.github.io_lobbies.yaml (+200 -0)
📝 crds/direwolf.games-on-whales.github.io_pairings.yaml (+4 -9)
📝 crds/direwolf.games-on-whales.github.io_profiles.yaml (+305 -36)
📝 crds/direwolf.games-on-whales.github.io_sessions.yaml (+7 -7)
📝 examples/firefox.yaml (+12 -2)
📝 examples/generic_devices/firefox.yaml (+20 -9)
📝 examples/generic_devices/generic-devices.yaml (+1 -1)
➕ examples/generic_devices/profile.yaml (+49 -0)
➖ examples/generic_devices/user.yaml (+0 -33)

...and 80 more files

📄 Description

Wolf-Agent DRA

This Draft aims to implement a DRA controller around wolf, allowing us to create a kubernetes wrap around wolf and finally move fenrir into alpha?
The goal is to allow the user to launch apps in a highly available way, on any node that has the wolf-agent.

Each section will be merged into staging branch until it's ready and any documentation and information will be added to this PR Draft.

This PR Task list / TODO:

  • Update the structs (can I auto generate the struct and rest api based on the api spec?)

    • Ensure the Session Struct is based on wolf__api__StreamSessionStartRequest
    • Ensure the Video Struct is based on wolf__core__events__VideoSession
    • Ensure the Audio Struct is based on wolf__core__events__AudioSession
    • Create the Lobby Struct based on wolf's wolf__api__CreateLobbyRequest
    • Update the Application CRD to implement a statefulset instead of a Deployment
    • Remove the existing wolf configs from the profile CRD
      • update the examples? probably just wait
    • Group together the labels into enums based on each relevant component and it's created resource for use in the created resources
      • direwolf/app: {app resource name}
      • direwolf/profile: {user paired profile resource name}
      • direwolf/user: {user name from pairing resource}
      • direwolf/lobby-type: {single or multiple users}
      • direwolf/lobby: {name from lobby resource}
      • direwolf/node: {node is ready to stream applications or not?}
      • direwolf/session: {session resource name}
    • Prepare for Development
      • Create the Daemonset Pod Manifests
        • wolf-dra container
        • wolf container
      • Create Local Development Environment
        • Create the kind-cluster-config.yaml (with feature gates)
        • Add the development steps to the Makefile
        • Rewrite the skaffold.yaml to accommodate the new DRA implementation and use kind directly instead of registry pushes
        • Install a storage provisioner with RWX
        • Create a README explaining how to setup the dev environment
  • Write the Driver

    • Set a configurable maximum number of allowed wayland/pulse sockets per node, and expose it as an env var
    • pick between:
      • consumable capacity (1.34 & 1.35 feature gated, 1.36 native)
      • discrete devices (1.34 native)
      • both???
    • Implement the mount dirs
      • plugins-dir: /var/lib/kubelet/plugins
      • plugins-reg: /var/lib/kubelet/plugins_registry
      • cdi-dir: /var/run/cdi
      • sockets-dir: /var/run/wolf/
      • wolf-sock: emptyDir{}
    • Create the DeviceClass configs to allow for wolf configurations:
      • renderNode
      • Anything else?
    • re-implement polling for the wolf.sock in wolf-dra as a requirement for the wolf-agent pod to be ready
    • Prepare the ResourceClaim structured parameters to implement
      • Video Struct
      • Audio Struct
      • Game Pads & Controllers? (I need to understand this part better)
      • Any available options for wolf session / lobby needed to configure the wayland and pulse audio sockets
    • Update the wolf-dra rest.api session / lobby creation process to:
      • have a mutex for socket creation
      • watch over the sockets-dir for the created socket before reporting
      • update the wayland / pulse socket information to manager / registry, maybe the resource slice object itself? I just need a state tracker to keep track of wayland-x.sock files for mounting and cleanup
    • Implement the CDI
      • Research the wolf env vars used in docker
      • Write the CDI structs (make sure they're similar to the wolf docker config for compatibility and any future changes in wolf)
      • Write a similar implementation that injects the Env Vars and Sockets into the application statefulset container
    • Update the SSE
      • To forward more events to the operator
      • monitor Audio and Video creation events (secondary method to check if sockets are ready)
    • Lifecycle Clean up
      • delete statefulset resource / pod (user defined pvc)
      • Unmount sockets
      • wolf-dra tells wolf to delete lobby + sessions
    • Manual provisioning of sockets
      • Manually create pods / resources that claim a wayland & pulse sockets without the operator
      • Write Tests for each component in the wolf dra
    • Create & test example resources for:
  • Update the operator

    • Create the statefulset(app) + resource claim(wayland & pulse sockets) + pod labels, then let the scheduler + kubelet handle the rest
    • Once app is scheduled on a node, create session(wayland socket) on same node, then once the app is ready join the session into the lobby
    • Monitor wolf resource lifecycle
    • Implement the Session Creation Request
    • Implement the Session Resume functionality, just like the dropped Lobby PR
    • Implement the Profile Persistent Volume
    • Implement the Profile Application defaults
    • Implement the Profile Resource Requests and Claims Limit
  • Clean up

    • Remove the wolf configs from the profile
    • Remove pulse audio pod reference
    • I'll add to this as I go
  • Pin wolf image version

  • Figure out a better pairing method

  • Update the Helm Chart

    • Implement the new env var for max sockets per node
    • put placeholders for nvidia, amd and intel?
  • Add steps for Installing Fenrir and setting up profiles + applications on:

    • TalosOS
      • Nvidia
      • AMD
    • K3s
    • Kubeadm

After this is done, I'll be moving any new CRD updates to another version that isn't v1alpha1, probably v2alpha1 with more features and stuff like how we can handle persistence and share profile and user data across nodes.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/games-on-whales/fenrir/pull/49 **Author:** [@axolotlite](https://github.com/axolotlite) **Created:** 7/23/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `staging` --- ### 📝 Commits (5) - [`a6949d0`](https://github.com/games-on-whales/fenrir/commit/a6949d0569a15c58e8d266de6d766dc63dc642c4) Add Skaffold, .golangci, test ci steps, and change user into profile alongside new pairing method - [`0e22074`](https://github.com/games-on-whales/fenrir/commit/0e220741be69248a469c09c34be913782ccf8586) [lint] create labels.go for centralized label management (#51) - [`85e9e98`](https://github.com/games-on-whales/fenrir/commit/85e9e98bd0951e6cc2a47609c1be810b7ad95371) Wolf-Agent DRA: Development environment setup recipees in the Makefile (#50) - [`03d3a02`](https://github.com/games-on-whales/fenrir/commit/03d3a0210735601cff10fe5b1b22e538ef815b03) Wolf-Agent DRA: Update App CRD & Session controller to use statefulsets instead of deployments (#53) - [`bd86c3b`](https://github.com/games-on-whales/fenrir/commit/bd86c3bb5c0d74f90a9a30a5b8a413b2bd50628c) Wolf-Agent DRA: Update the code from golang 1.24 to 1.26 to use GA DRA Resources (#58) ### 📊 Changes **122 files changed** (+7820 additions, -3208 deletions) <details> <summary>View changed files</summary> ➕ `.air.toml` (+18 -0) 📝 `.dockerignore` (+3 -0) 📝 `.golangci.yml` (+11 -5) 📝 `Dockerfile` (+3 -3) ➕ `Dockerfile.dev` (+22 -0) 📝 `Makefile` (+48 -1) 📝 `charts/direwolf-operator/values.yaml` (+20 -1) 📝 `cmd/moonlight-proxy/main.go` (+39 -19) 📝 `cmd/operator/main.go` (+29 -16) 📝 `cmd/wolf-agent/main.go` (+19 -10) 📝 `crds/direwolf.games-on-whales.github.io_apps.yaml` (+972 -279) ➕ `crds/direwolf.games-on-whales.github.io_lobbies.yaml` (+200 -0) 📝 `crds/direwolf.games-on-whales.github.io_pairings.yaml` (+4 -9) 📝 `crds/direwolf.games-on-whales.github.io_profiles.yaml` (+305 -36) 📝 `crds/direwolf.games-on-whales.github.io_sessions.yaml` (+7 -7) 📝 `examples/firefox.yaml` (+12 -2) 📝 `examples/generic_devices/firefox.yaml` (+20 -9) 📝 `examples/generic_devices/generic-devices.yaml` (+1 -1) ➕ `examples/generic_devices/profile.yaml` (+49 -0) ➖ `examples/generic_devices/user.yaml` (+0 -33) _...and 80 more files_ </details> ### 📄 Description ## Wolf-Agent DRA This Draft aims to implement a DRA controller around wolf, allowing us to create a kubernetes wrap around wolf and finally move fenrir into alpha? The goal is to allow the user to launch apps in a highly available way, on any node that has the wolf-agent. Each section will be merged into `staging` branch until it's ready and any documentation and information will be added to this PR Draft. **This PR Task list / TODO:** - [ ] Update the structs (can I auto generate the struct and rest api based on the api spec?) - [ ] Ensure the Session Struct is based on wolf__api__StreamSessionStartRequest - [ ] Ensure the Video Struct is based on wolf__core__events__VideoSession - [ ] Ensure the Audio Struct is based on wolf__core__events__AudioSession - [ ] Create the Lobby Struct based on wolf's wolf__api__CreateLobbyRequest - [ ] Update the Application CRD to implement a statefulset instead of a Deployment - [ ] Remove the existing wolf configs from the profile CRD - [ ] update the examples? probably just wait - [ ] Group together the labels into enums based on each relevant component and it's created resource for use in the created resources - [ ] direwolf/app: {app resource name} - [ ] direwolf/profile: {user paired profile resource name} - [ ] direwolf/user: {user name from pairing resource} - [ ] direwolf/lobby-type: {single or multiple users} - [ ] direwolf/lobby: {name from lobby resource} - [ ] direwolf/node: {node is ready to stream applications or not?} - [ ] direwolf/session: {session resource name} - [ ] Prepare for Development - [ ] Create the Daemonset Pod Manifests - wolf-dra container - wolf container - [ ] Create Local Development Environment - [ ] Create the `kind-cluster-config.yaml` (with feature gates) - [ ] Add the development steps to the Makefile - [ ] Rewrite the `skaffold.yaml` to accommodate the new DRA implementation and use kind directly instead of registry pushes - [ ] Install a storage provisioner with RWX - [ ] Create a README explaining how to setup the dev environment - [ ] Write the Driver - [ ] Set a configurable maximum number of allowed wayland/pulse sockets per node, and expose it as an env var - [ ] pick between: - [ ] consumable capacity (1.34 & 1.35 feature gated, 1.36 native) - [ ] discrete devices (1.34 native) - [ ] both??? - [ ] Implement the mount dirs - [ ] plugins-dir: `/var/lib/kubelet/plugins` - [ ] plugins-reg: `/var/lib/kubelet/plugins_registry` - [ ] cdi-dir: `/var/run/cdi` - [ ] sockets-dir: `/var/run/wolf/` - [ ] wolf-sock: emptyDir{} - [ ] Create the DeviceClass configs to allow for wolf configurations: - [ ] renderNode - [ ] Anything else? - [ ] re-implement polling for the wolf.sock in wolf-dra as a requirement for the wolf-agent pod to be ready - [ ] Prepare the ResourceClaim structured parameters to implement - [ ] Video Struct - [ ] Audio Struct - [ ] Game Pads & Controllers? (I need to understand this part better) - [ ] Any available options for wolf session / lobby needed to configure the wayland and pulse audio sockets - [ ] Update the wolf-dra rest.api session / lobby creation process to: - [ ] have a mutex for socket creation - [ ] watch over the `sockets-dir` for the created socket before reporting - [ ] update the wayland / pulse socket information to manager / registry, maybe the resource slice object itself? I just need a state tracker to keep track of wayland-x.sock files for mounting and cleanup - [ ] Implement the CDI - [ ] Research the wolf env vars used in docker - [ ] Write the CDI structs (make sure they're similar to the wolf docker config for compatibility and any future changes in wolf) - [ ] Write a similar implementation that injects the Env Vars and Sockets into the application statefulset container - [ ] Update the SSE - [ ] To forward more events to the operator - [ ] monitor Audio and Video creation events (secondary method to check if sockets are ready) - [ ] Lifecycle Clean up - [ ] delete statefulset resource / pod (user defined pvc) - [ ] Unmount sockets - [ ] wolf-dra tells wolf to delete lobby + sessions - [ ] Manual provisioning of sockets - [ ] Manually create pods / resources that claim a wayland & pulse sockets without the operator - [ ] Write Tests for each component in the wolf dra - [ ] Create & test example resources for: - [ ] hostPath - [ ] AMD - [ ] https://github.com/ROCm/gpu-operator - [ ] https://github.com/ROCm/k8s-device-plugin - [ ] https://github.com/ROCm/k8s-gpu-dra-driver - [ ] Nvidia - [ ] https://github.com/NVIDIA/gpu-operator - [ ] https://github.com/kubernetes-sigs/dra-driver-nvidia-gpu ? - [ ] Intel - [ ] https://github.com/intel/intel-device-plugins-for-kubernetes - [ ] Generic Devices implementation - [ ] Intel - [ ] AMD - [ ] Nvidia - [ ] Multi GPU nodes - [ ] Update the operator - [ ] Create the statefulset(app) + resource claim(wayland & pulse sockets) + pod labels, then let the scheduler + kubelet handle the rest - [ ] Once app is scheduled on a node, create session(wayland socket) on same node, then once the app is ready join the session into the lobby - [ ] Monitor wolf resource lifecycle - [ ] Implement the Session Creation Request - [ ] Implement the Session Resume functionality, just like the dropped Lobby PR - [ ] Implement the Profile Persistent Volume - [ ] Implement the Profile Application defaults - [ ] Implement the Profile Resource Requests and Claims Limit - [ ] Clean up - [ ] Remove the wolf configs from the profile - [ ] Remove pulse audio pod reference - [ ] I'll add to this as I go - [ ] **Pin wolf image version** - [ ] Figure out a better pairing method - [ ] Update the Helm Chart - [ ] Implement the new env var for max sockets per node - [ ] put placeholders for nvidia, amd and intel? - [ ] Add steps for Installing Fenrir and setting up profiles + applications on: - [ ] TalosOS - [ ] Nvidia - [ ] AMD - [ ] K3s - [ ] Kubeadm After this is done, I'll be moving any new CRD updates to another version that isn't v1alpha1, probably v2alpha1 with more features and stuff like how we can handle persistence and share profile and user data across nodes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
games-on-whales/fenrir#50
No description provided.