2022-10-19 06:00:00 +00:00
|
|
|
kind: Deployment
|
|
|
|
apiVersion: apps/v1
|
|
|
|
metadata:
|
|
|
|
name: qemu-
|
|
|
|
spec:
|
2022-10-20 07:35:45 +00:00
|
|
|
replicas: 1
|
|
|
|
strategy:
|
|
|
|
type: Recreate
|
2022-10-19 06:00:00 +00:00
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: qemu-
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: qemu-
|
|
|
|
spec:
|
|
|
|
imagePullSecrets:
|
|
|
|
- name: docker-ghcr
|
|
|
|
containers:
|
2022-10-20 07:35:45 +00:00
|
|
|
- name: audioserver
|
|
|
|
image: tonychee7000/pulseaudio
|
|
|
|
command:
|
|
|
|
- "/usr/bin/pulseaudio"
|
|
|
|
- "--system"
|
|
|
|
- "--disallow-exit"
|
|
|
|
- "--disallow-module-loading"
|
|
|
|
- "-n"
|
|
|
|
- "-L"
|
|
|
|
- "module-always-sink"
|
|
|
|
- "-L"
|
|
|
|
- "module-native-protocol-tcp auth-anonymous=1 auth-cookie-enabled=0"
|
|
|
|
resources:
|
|
|
|
limits:
|
|
|
|
cpu: 50m
|
|
|
|
memory: 8Mi
|
|
|
|
ports:
|
|
|
|
- name: audio
|
|
|
|
containerPort: 4713
|
|
|
|
lifecycle:
|
|
|
|
postStart:
|
|
|
|
exec:
|
|
|
|
command:
|
|
|
|
- /bin/sh
|
|
|
|
- "-c"
|
|
|
|
- "while true; do nc -vz localhost:4713 && break; done"
|
2022-10-19 06:00:00 +00:00
|
|
|
- name: qemu
|
|
|
|
image: system
|
|
|
|
env:
|
|
|
|
- name: ADDITIONAL_ARGS
|
2022-10-20 07:35:45 +00:00
|
|
|
value: "-enable-kvm"
|
2022-10-19 06:00:00 +00:00
|
|
|
ports:
|
|
|
|
- containerPort: 5900
|
|
|
|
name: vnc
|
|
|
|
resources:
|
|
|
|
requests:
|
|
|
|
memory: 192Mi
|
|
|
|
cpu: 100m
|
2022-10-20 07:35:45 +00:00
|
|
|
smarter-devices/kvm: "1"
|
2022-10-19 06:00:00 +00:00
|
|
|
limits:
|
2022-10-20 07:35:45 +00:00
|
|
|
memory: 256Mi
|
|
|
|
cpu: "1"
|
|
|
|
smarter-devices/kvm: "1"
|
2022-10-19 06:00:00 +00:00
|
|
|
readinessProbe:
|
|
|
|
tcpSocket:
|
|
|
|
port: vnc
|
|
|
|
periodSeconds: 10
|
|
|
|
successThreshold: 1
|
|
|
|
failureThreshold: 3
|
|
|
|
livenessProbe:
|
|
|
|
tcpSocket:
|
|
|
|
port: vnc
|
|
|
|
initialDelaySeconds: 5
|
|
|
|
periodSeconds: 10
|
|
|
|
successThreshold: 1
|
|
|
|
failureThreshold: 3
|