Skip to content

Instantly share code, notes, and snippets.

@agracey
Last active September 26, 2022 01:31
Show Gist options
  • Save agracey/f8c7e19745a5f4d86dd39f26a19c0d0f to your computer and use it in GitHub Desktop.
Save agracey/f8c7e19745a5f4d86dd39f26a19c0d0f to your computer and use it in GitHub Desktop.
apiVersion: v1
kind: ConfigMap
metadata:
name: xconfig
data:
.xinitrc: |-
#!/bin/bash
set -x
xset -dpms
xset s off
xset s noblank
xhost +
exec startlxde
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: wallboard
labels:
workload.user.cattle.io/workloadselector: apps.deployment-default-wallboard
namespace: default
spec:
selector:
matchLabels:
workload.user.cattle.io/workloadselector: apps.deployment-default-wallboard
template:
metadata:
labels:
workload.user.cattle.io/workloadselector: apps.deployment-default-wallboard
spec:
containers:
- name: wallboard
args:
- '-c'
- chromium http://game.workspace:8080 --start-fullscreen --disable-session-crashed-bubble --disable-infobars --disable-new-profile-management --no-sandbox
command:
- sh
env:
- name: DBUS_SESSION_BUS_ADDRESS
value: unix:path=/run/user/0/bus
- name: DISPLAY
value: ':0'
image: registry.opensuse.org/home/atgracey/wallboardos/15.4/chromium:withgtk
imagePullPolicy: IfNotPresent
securityContext:
allowPrivilegeEscalation: true
privileged: true
readOnlyRootFilesystem: false
volumeMounts:
- mountPath: /tmp
name: tmp
- mountPath: /home/user/
name: home
- mountPath: /root/
name: home
- mountPath: /run/user
name: runuser
- name: x11
args:
- '-c'
- |
startx -- -nocursor
command:
- /bin/bash
env:
- name: DBUS_SESSION_BUS_ADDRESS
value: unix:path=/run/user/0/bus
image: registry.opensuse.org/home/atgracey/wallboardos/15.4/wallboardos:lxde-15.4
imagePullPolicy: Always
securityContext:
allowPrivilegeEscalation: true
privileged: true
readOnlyRootFilesystem: false
volumeMounts:
- mountPath: /run/user
name: runuser
- mountPath: /tmp
name: tmp
- mountPath: /root
name: home
- mountPath: /root/.xinitrc
name: xconfig
subPath: .xinitrc
dnsPolicy: ClusterFirst
terminationGracePeriodSeconds: 5
volumes:
- hostPath:
path: /run/user
type: Directory
name: runuser
- name: tmp
emptyDir: {}
- name: home
emptyDir: {}
- configMap:
defaultMode: 0777
name: xconfig
items:
- key: .xinitrc
path: .xinitrc
name: xconfig
progressDeadlineSeconds: 600
replicas: 1
revisionHistoryLimit: 1
strategy:
type: Recreate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment