From d2eb37a915851610371f06397f22b85bc0331c0e Mon Sep 17 00:00:00 2001 From: Sense T Date: Thu, 20 Oct 2022 07:35:45 +0000 Subject: [PATCH] update --- guacamole/guacamole.yaml | 2 +- guacamole/guacd.yaml | 6 +-- vintage-os/base/deployment.yaml | 57 ++++++++++++++---------- vintage-os/happylinux/kustomization.yaml | 3 +- 4 files changed, 40 insertions(+), 28 deletions(-) diff --git a/guacamole/guacamole.yaml b/guacamole/guacamole.yaml index 820607b..5dc300a 100644 --- a/guacamole/guacamole.yaml +++ b/guacamole/guacamole.yaml @@ -16,7 +16,7 @@ spec: image: guacamole/guacamole resources: limits: - cpu: '1' + cpu: '200m' memory: '1024Mi' env: - name: GUACD_HOSTNAME diff --git a/guacamole/guacd.yaml b/guacamole/guacd.yaml index 7f0446a..3079199 100644 --- a/guacamole/guacd.yaml +++ b/guacamole/guacd.yaml @@ -16,9 +16,9 @@ spec: image: guacamole/guacd resources: limits: - cpu: 200m - memory: '512Mi' + cpu: 100m + memory: "32Mi" ports: - protocol: TCP name: guacd - containerPort: 4822 \ No newline at end of file + containerPort: 4822 diff --git a/vintage-os/base/deployment.yaml b/vintage-os/base/deployment.yaml index b9479f0..a574d39 100644 --- a/vintage-os/base/deployment.yaml +++ b/vintage-os/base/deployment.yaml @@ -3,6 +3,9 @@ apiVersion: apps/v1 metadata: name: qemu- spec: + replicas: 1 + strategy: + type: Recreate selector: matchLabels: app: qemu- @@ -14,26 +17,49 @@ spec: imagePullSecrets: - name: docker-ghcr containers: + - 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" - name: qemu image: system env: - name: ADDITIONAL_ARGS - value: '-enable-kvm' + value: "-enable-kvm" ports: - containerPort: 5900 name: vnc - volumeMounts: - - mountPath: /tmp - name: pipe resources: requests: memory: 192Mi cpu: 100m - smarter-devices/kvm: 1 + smarter-devices/kvm: "1" limits: - memory: 1Gi - cpu: '1' - smarter-devices/kvm: 1 + memory: 256Mi + cpu: "1" + smarter-devices/kvm: "1" readinessProbe: tcpSocket: port: vnc @@ -47,18 +73,3 @@ spec: periodSeconds: 10 successThreshold: 1 failureThreshold: 3 - lifecycle: - postStart: - exec: - command: - - sleep - - '1' - - name: audioserver - image: tonychee7000/pulseaudio - resources: - limits: - cpu: 200m - memory: 128Mi - ports: - - name: audio - containerPort: 4713 \ No newline at end of file diff --git a/vintage-os/happylinux/kustomization.yaml b/vintage-os/happylinux/kustomization.yaml index 08bd1c4..f94a976 100644 --- a/vintage-os/happylinux/kustomization.yaml +++ b/vintage-os/happylinux/kustomization.yaml @@ -3,9 +3,10 @@ nameSuffix: happylinux commonLabels: app: qemu-happylinux +namespace: vintage-os resources: - ../base images: - newName: tonychee7000/qemu-happy-linux newTag: pulseaudio-1 - name: system \ No newline at end of file + name: system