[games-on-whales] support for nvidia (#1145)

* initial release

* [games-on-whales] split tcp and udp services

* [games-on-whales] fix for retroarch (snd and shm)

* review fixes

* use GHCR images

* add ABeltramo as games-on-whales maintainer

* support for nvidia

Co-authored-by: angelnu <git@angelnucom>
This commit is contained in:
Angel Nunez Mencias 2021-08-30 12:34:48 +02:00 committed by GitHub
parent 5c75bb4b9e
commit efd1fae655
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 109 additions and 4 deletions

View File

@ -2,7 +2,7 @@ apiVersion: v2
appVersion: 1.0.0
description: Streams graphic applications/games (retroarch, firefox, steam) runing on Kubernetes
name: games-on-whales
version: 1.2.0
version: 1.3.0
kubeVersion: ">=1.19.0-0"
keywords:
- games-on-whales
@ -18,6 +18,8 @@ sources:
maintainers:
- name: angelnu
email: gits@angelnu.com
- name: ABeltramo
email: beltramo.ale@gmail.com
dependencies:
- name: common
repository: https://library-charts.k8s-at-home.com

View File

@ -1,6 +1,6 @@
# games-on-whales
![Version: 1.2.0](https://img.shields.io/badge/Version-1.2.0-informational?style=flat-square) ![AppVersion: 1.0.0](https://img.shields.io/badge/AppVersion-1.0.0-informational?style=flat-square)
![Version: 1.3.0](https://img.shields.io/badge/Version-1.3.0-informational?style=flat-square) ![AppVersion: 1.0.0](https://img.shields.io/badge/AppVersion-1.0.0-informational?style=flat-square)
Streams graphic applications/games (retroarch, firefox, steam) runing on Kubernetes
@ -67,7 +67,34 @@ helm install games-on-whales k8s-at-home/games-on-whales -f values.yaml
## Custom configuration
You need a real graphic card in your Kubernetes node to run Games on Whales.
### GPU
You need a real graphic card in your Kubernetes node to run Games on Whales:
#### Intel
It does not require any custom settings but if you use [intel-gpu-plugin](https://github.com/k8s-at-home/charts/tree/master/charts/stable/intel-gpu-plugin)
then you might use the `graphic_resources` value to specify the resource limits
such as:
```
graphic_resources:
gpu.intel.com/i915: 1 # requesting 1 i915 GPU
```
#### Nvidia
If you use the Nvidia propietary device driver then you will need the
[Nvidia device plugin](https://github.com/NVIDIA/k8s-device-plugin)
and set `graphic_resources` value to specify the resource limits.
Example:
```
graphic_resources:
nvidia.com/gpu: 1 # requesting 1 nvidia GPU
```
#### Proxmox
If you use Proxmox you might use PCI pass-through but you also need to ensure
the host does not load any modules for the graphic card. See the
@ -85,6 +112,7 @@ the host does not load any modules for the graphic card. See the
| firefox.image.tag | string | `"91.0.2-r1"` | image tag |
| firefox.logLevel | string | `"info"` | firefox log level |
| firefox.volumeMounts | list | `[]` | firefox extra volume mounts |
| graphic_resources | object | `nil` | Pass GPU resources to Xorg, steam and retroarch containers See Custom configuration section in the Readme |
| ingress.main | object | See values.yaml | Enable and configure ingress settings for the chart under this key. |
| mkhomeretrodirs.image.pullPolicy | string | `"IfNotPresent"` | image pull policy |
| mkhomeretrodirs.image.repository | string | `"busybox"` | image repository |
@ -128,6 +156,13 @@ All notable changes to this application Helm chart will be documented in this fi
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
### [1.3.0]
#### Added
- support for NVIDIA
- ABeltramo as maintainer
### [1.2.0]
#### Changed

View File

@ -9,6 +9,13 @@ All notable changes to this application Helm chart will be documented in this fi
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
### [1.3.0]
#### Added
- support for NVIDIA
- ABeltramo as maintainer
### [1.2.0]
#### Changed

View File

@ -5,7 +5,35 @@
{{- define "custom.custom.configuration" -}}
{{ template "custom.custom.configuration.header" . }}
You need a real graphic card in your Kubernetes node to run Games on Whales.
### GPU
You need a real graphic card in your Kubernetes node to run Games on Whales:
#### Intel
It does not require any custom settings but if you use [intel-gpu-plugin](https://github.com/k8s-at-home/charts/tree/master/charts/stable/intel-gpu-plugin)
then you might use the `graphic_resources` value to specify the resource limits
such as:
```
graphic_resources:
gpu.intel.com/i915: 1 # requesting 1 i915 GPU
```
#### Nvidia
If you use the Nvidia propietary device driver then you will need the
[Nvidia device plugin](https://github.com/NVIDIA/k8s-device-plugin)
and set `graphic_resources` value to specify the resource limits.
Example:
```
graphic_resources:
nvidia.com/gpu: 1 # requesting 1 nvidia GPU
```
#### Proxmox
If you use Proxmox you might use PCI pass-through but you also need to ensure
the host does not load any modules for the graphic card. See the

View File

@ -10,6 +10,14 @@ image:
securityContext:
privileged: true
{{- if .Values.graphic_resources }}
resources:
requests:
{{ .Values.graphic_resources | toYaml | nindent 4 }}
limits:
{{ .Values.graphic_resources | toYaml | nindent 4 }}
{{- end }}
env:
DISPLAY: {{ .Values.xorg.display }}
LOG_LEVEL: {{ .Values.sunshine.logLevel }}
@ -42,6 +50,13 @@ additionalContainers:
imagePullPolicy: {{ .Values.xorg.image.pullPolicy }}
securityContext:
privileged: true
{{- if .Values.graphic_resources }}
resources:
requests:
{{ .Values.graphic_resources | toYaml | nindent 8 }}
limits:
{{ .Values.graphic_resources | toYaml | nindent 8 }}
{{- end }}
env:
- name: DISPLAY
value: {{ .Values.xorg.display | quote }}
@ -74,6 +89,13 @@ additionalContainers:
imagePullPolicy: {{ .Values.retroarch.image.pullPolicy }}
securityContext:
privileged: true
{{- if .Values.graphic_resources }}
resources:
requests:
{{ .Values.graphic_resources | toYaml | nindent 8 }}
limits:
{{ .Values.graphic_resources | toYaml | nindent 8 }}
{{- end }}
env:
- name: DISPLAY
value: {{ .Values.xorg.display | quote }}
@ -111,6 +133,13 @@ additionalContainers:
imagePullPolicy: {{ .Values.steam.image.pullPolicy }}
securityContext:
privileged: true
{{- if .Values.graphic_resources }}
resources:
requests:
{{ .Values.graphic_resources | toYaml | nindent 8 }}
limits:
{{ .Values.graphic_resources | toYaml | nindent 8 }}
{{- end }}
env:
- name: DISPLAY
value: {{ .Values.xorg.display | quote }}

View File

@ -32,6 +32,10 @@ persistence:
type: emptyDir
mountPath: /home/retro
# -- (object) Pass GPU resources to Xorg, steam and retroarch containers
# See Custom configuration section in the Readme
graphic_resources:
sunshine:
image:
# -- sunshine image repository