4 Commits

Author SHA1 Message Date
299f661f60 trying some steam containers 2024-09-30 15:18:19 +02:00
1a8f52cc58 update immich 2024-09-30 15:17:02 +02:00
4fb7234df8 switch to backblaze for backups 2024-09-30 15:15:24 +02:00
9f939b16bc update immich 2024-09-26 16:56:36 +02:00
12 changed files with 387 additions and 7 deletions

View File

@@ -0,0 +1,15 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: games
resources:
- namespace.yaml
helmCharts:
- name: games-on-whales
releaseName: games-on-whales
version: 2.0.0
valuesFile: values.yaml
repo: https://angelnu.github.io/helm-charts

View File

@@ -0,0 +1,6 @@
apiVersion: v1
kind: Namespace
metadata:
name: placeholder
labels:
pod-security.kubernetes.io/enforce: privileged

143
apps/games/values.yaml Normal file
View File

@@ -0,0 +1,143 @@
#
# IMPORTANT NOTE
#
# This chart inherits from our common library chart. You can check the default values/options here:
# https://github.com/k8s-at-home/library-charts/tree/main/charts/stable/common/values.yaml
#
ingress:
# -- Enable and configure ingress settings for the chart under this key.
# @default -- See values.yaml
main:
enabled: false
service:
# -- Enable and configure TCP service settings for the chart under this key.
# @default -- See values.yaml
main: {}
# type: LoadBalancer
# loadBalancerIP: 192.168.1.129
# -- Enable and configure UDP service settings for the chart under this key.
# @default -- See values.yaml
udp: {}
# type: LoadBalancer
# loadBalancerIP: 192.168.1.129
# -- Configure persistence settings for the chart under this key.
# @default -- See values.yaml
persistence:
home:
enabled: true
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
repository: ghcr.io/games-on-whales/sunshine
# -- sunshine image tag
tag: 1.0.0
# -- sunshine image pull policy
pullPolicy: IfNotPresent
# -- sunshine web interface user
user: admin
# -- sunshine web interface pasword
password: admin
# -- sunshine log level
logLevel: info
# -- sunshine additional env settings
env: {}
xorg:
image:
# -- xorg image repository
repository: ghcr.io/games-on-whales/xorg
# -- xorg image tag
tag: 1.0.0
# -- xorg image pull policy
pullPolicy: IfNotPresent
# -- xorg display ID
# display: :99
# -- xorg refresh rate
# refreshrate: 60
# -- xorg resolution
resolution: 1920x1080
pulseaudio:
image:
# -- pulseaudio image repository
repository: ghcr.io/games-on-whales/pulseaudio
# -- pulseaudio image tag
tag: 1.0.0
# -- pulseaudio image pull policy
pullPolicy: IfNotPresent
retroarch:
# -- enable/disable retroarch container
enabled: true
image:
# -- retroarch image repository
repository: ghcr.io/games-on-whales/retroarch
# -- retroarch image tag
tag: 1.0.0
# -- retroarch image pull policy
pullPolicy: IfNotPresent
# -- retroarch log level
logLevel: info
# -- retroarch extra volume mounts
volumeMounts: []
steam:
# -- enable/disable steam container
enabled: true
image:
# -- steam image repository
repository: ghcr.io/games-on-whales/steam
# -- steam image tag
tag: 1.0.0
# -- steam image pull policy
pullPolicy: IfNotPresent
# -- enable proton log
protonLog: 1
# -- steam extra volume mounts
volumeMounts: []
firefox:
# -- enable/disable firefox container
enabled: true
image:
# -- image repository
repository: andrewmackrodt/firefox-x11
# -- image tag
tag: 125.0.2-r1
# -- image pull policy
pullPolicy: IfNotPresent
# -- firefox log level
logLevel: info
# -- firefox extra volume mounts
volumeMounts: []
mkhomeretrodirs:
image:
# -- image repository
repository: busybox
# -- image tag
tag: 1.36.1
# -- image pull policy
pullPolicy: IfNotPresent
# -- Configure pulse audio settings
# @default -- See values.yaml
pulse:
config:
default.pa: |-
.fail
load-module module-null-sink sink_name=sunshine
set-default-sink sunshine
load-module module-native-protocol-unix auth-anonymous=1 socket=/tmp/pulse/pulse-socket
client.conf: |-
default-sink = sink-sunshine-stereo
autospawn = no
daemon-binary = /bin/true
daemon.conf: |-
exit-idle-time = -1
flat-volumes = yes

View File

@@ -21,9 +21,9 @@ helmCharts:
images:
- name: ghcr.io/immich-app/immich-machine-learning
newTag: v1.114.0
newTag: v1.116.2
- name: ghcr.io/immich-app/immich-server
newTag: v1.114.0
newTag: v1.116.2
patches:

106
apps/steam/deployment.yaml Normal file
View File

@@ -0,0 +1,106 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: steam-headless
spec:
replicas: 1
selector:
matchLabels:
app: steam-headless
template:
metadata:
labels:
app: steam-headless
spec:
hostNetwork: true
securityContext:
fsGroup: 1000
nodeSelector:
gpu: full
containers:
- name: steam-headless
securityContext:
privileged: true
image: josh5/steam-headless:latest
resources: #Change CPU and Memory below
requests:
memory: "4G"
cpu: "1"
limits:
memory: "12G"
cpu: "4"
# set nodeSelector to the node label that matches the node you want to run the pod on
volumeMounts:
- name: home-dir
mountPath: /home/default/
- name: games-dir
mountPath: /mnt/games/
- name: input-devices
mountPath: /dev/input/
- name: dshm
mountPath: /dev/shm
- name: dri
mountPath: /dev/dri/
env: #Environmental Vars
- name: NAME
value: 'SteamHeadless'
- name: TZ
value: 'Europe/Zurich'
- name: USER_LOCALES
value: 'en_US.UTF-8 UTF-8'
- name: DISPLAY
value: ':55'
- name: SHM_SIZE
value: '2G'
- name: PUID
value: '1000'
- name: PGID
value: '1000'
- name: UMASK
value: '000'
- name: USER_PASSWORD
value: 'password' #changeme
- name: MODE
value: 'primary'
- name: WEB_UI_MODE
value: 'vnc'
- name: ENABLE_VNC_AUDIO
value: 'false'
- name: PORT_NOVNC_WEB
value: '8083'
- name: ENABLE_SUNSHINE
value: 'true'
- name: SUNSHINE_USER
value: 'sam'
- name: SUNSHINE_PASS
value: 'password'
- name: ENABLE_EVDEV_INPUTS
value: 'false'
ports:
# novnc
- containerPort: 8083
# moonlight webui
- containerPort: 47990
# moonlight stream
- containerPort: 47989
- containerPort: 47984
- containerPort: 48010
- containerPort: 47998
- containerPort: 47999
- containerPort: 47800
volumes:
- name: home-dir
persistentVolumeClaim:
claimName: home
- name: games-dir
persistentVolumeClaim:
claimName: games
- name: input-devices
hostPath:
path: /dev/input/
- name: dri
hostPath:
path: /dev/dri/
- name: dshm
emptyDir:
medium: Memory

View File

@@ -0,0 +1,12 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: steam
resources:
- namespace.yaml
- deployment.yaml
- service.yaml
- pvc.yaml

View File

@@ -0,0 +1,6 @@
apiVersion: v1
kind: Namespace
metadata:
name: placeholder
labels:
pod-security.kubernetes.io/enforce: privileged

23
apps/steam/pvc.yaml Normal file
View File

@@ -0,0 +1,23 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: games
spec:
storageClassName: "nfs-client"
accessModes:
- ReadWriteOnce
resources:
requests:
storage: "25Gi"
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: home
spec:
storageClassName: "nfs-client"
accessModes:
- ReadWriteOnce
resources:
requests:
storage: "5Gi"

38
apps/steam/service.yaml Normal file
View File

@@ -0,0 +1,38 @@
apiVersion: v1
kind: Service
metadata:
name: steam-vnc
spec:
selector:
app: steam-headless
ports:
- port: 8083
targetPort: 8083
name: novnc
- port: 47990
targetPort: 47990
name: moonlight-web
- port: 47989
targetPort: 47989
name: moonlight0
- port: 47984
targetPort: 47984
name: moonlight1
- port: 48010
targetPort: 48010
name: moonlight2
protocol: UDP
- port: 47998
targetPort: 47998
name: moonlight3
protocol: UDP
- port: 47999
targetPort: 47999
name: moonlight4
protocol: UDP
- port: 47800
targetPort: 47800
name: moonlight5
protocol: UDP
type: LoadBalancer
loadBalancerIP: 192.168.3.5

View File

@@ -0,0 +1,19 @@
---
apiVersion: bitnami.com/v1alpha1
kind: SealedSecret
metadata:
creationTimestamp: null
name: backblaze-credentials
namespace: backup
spec:
encryptedData:
bucket-id: AgBwwjlkGjskxMXXpXrnfcT9fJGgDXtbOO/6WcpqsX0exoADw31dADjLTHztiddsGYipiGFf2DBWge69UEnL04NXIzh/xTwWtWaqlz6yOJm/89FMQE1mfbrrLc7tk98TO3oS8i+IDAnkUiYyvDXJexgJg56QLY595PXkpplYit2bAk43mAB02yUZAK0gMs3KRDIvhHFsMq8Uiqx78En5KGGXwEg6KbVDyNvI2k8suEyy+C0yNO/M6dlczoUQiIJbllQzbqIzuxbOp609PfvGFA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Uk4wgX4ia+gCBPMpTo6i00ZtSpRB3Ub9VfGJfRmiXZA7oh5j3yN9nJlXonbJYBp4DNWod76CF7s35HBnSzS7YfIV80R4lH4xAPgRbZ0tvPWkTLMhSBX8rJCEnxT7DjL2lS7WfyboLdL4Uy8WmP7n2difZSr7p2iic6SCP44YgQ8JY5UgXh2QZENQ6oLvjK/PpFTjQ4bfw3E1/dakg1EdCYc/6DPyK3YekccUe/pXvVBrazpgObxXWeKKT6RMDeYWLUXTBHWhJ5OaJHHePD5t9IM65FlFTtkuUFbxExTi/u+RczBlWWcy10Yow3I3LGrDPJ/PfBy4RPfHCeQDQ+WoLJkNT20nu5mBXEYYKgNvgdn4yogifSiNG8vsNpo4dO89aHppbnHdmdp7F9asfbn27btEoFoHzIFku/mEnY5srs+Smrhhzy0+iPKge9LOuW33Gi4oJban1UYFvLAjq8YsZGkbIO82r2p+v15UjwU3girWPl1KBUc8WzLJtnqBvRPWS1ul6/X9JIdmmrHJjC0KlcGiVMU/Ls9ljnQj7dgLXuDW7JzuK3MhTWV3Y2kS39ze3TskCKcbL
template:
metadata:
creationTimestamp: null
name: backblaze-credentials
namespace: backup
type: Opaque

View File

@@ -46,14 +46,27 @@ spec:
name: backup-nfs-access
env:
- name: RESTIC_REPOSITORY
value: rest:http://rclone-gcloud:8000/kluster
# lives in the same namespace
# secrets live in the same namespace as per kustomization.yaml
- name: RESTIC_PASSWORD
valueFrom:
secretKeyRef:
name: restic-gdrive-credentials
key: restic-password
- name: RESTIC_REPOSITORY
valueFrom:
secretKeyRef:
name: backblaze-credentials
key: repository-string
- name: AWS_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: backblaze-credentials
key: key-id
- name: AWS_ACCESS_KEY
valueFrom:
secretKeyRef:
name: backblaze-credentials
key: key-secret
volumes:
- name: backup-nfs-access
persistentVolumeClaim:

View File

@@ -8,7 +8,6 @@ resources:
- namespace.yaml
- pvc.yaml
- restic-password.sealedsecret.yaml
- rclone-config.sealedsecret.yaml
- rclone-gcloud.deployment.yaml
- backblaze-credentials.sealedsecret.yaml
- cronjobs-overlays/prune/
- cronjobs-overlays/backup/