xgl.yml 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. # This Source Code Form is subject to the terms of the Mozilla Public
  2. # License, v. 2.0. If a copy of the MPL was not distributed with this
  3. # file, You can obtain one at https://mozilla.org/MPL/2.0/.
  4. apiVersion: apps/v1
  5. kind: Deployment
  6. metadata:
  7. name: xgl
  8. spec:
  9. replicas: 1
  10. selector:
  11. matchLabels:
  12. app: xgl
  13. template:
  14. metadata:
  15. labels:
  16. app: xgl
  17. spec:
  18. hostname: xgl
  19. # Uncomment the below line to disable network isolation for WebRTC connectivity, may show an error if disallowed by the cluster
  20. # hostNetwork: true
  21. containers:
  22. - name: xgl
  23. # Change tag `latest` to Ubuntu version such as `24.04`
  24. image: ghcr.io/selkies-project/nvidia-glx-desktop:latest
  25. env:
  26. - name: TZ
  27. value: "UTC"
  28. - name: DISPLAY_SIZEW
  29. value: "1920"
  30. - name: DISPLAY_SIZEH
  31. value: "1080"
  32. - name: DISPLAY_REFRESH
  33. value: "60"
  34. - name: DISPLAY_DPI
  35. value: "96"
  36. - name: DISPLAY_CDEPTH
  37. value: "24"
  38. # With driver versions lower than 550, change to `DP-0` or any other `DP-*` port for larger resolution support if NOT using datacenter GPUs
  39. - name: VIDEO_PORT
  40. value: "DFP"
  41. # Choose either `value:` or `secretKeyRef:` but not both at the same time
  42. - name: PASSWD
  43. value: "mypasswd"
  44. # valueFrom:
  45. # secretKeyRef:
  46. # name: my-pass
  47. # key: my-pass
  48. # Uncomment to enable KasmVNC instead of Selkies-GStreamer, `SELKIES_BASIC_AUTH_PASSWORD` is used for authentication with KasmVNC, defaulting to `PASSWD` if not provided
  49. # Uses: `SELKIES_ENABLE_BASIC_AUTH`, `SELKIES_BASIC_AUTH_USER`, `SELKIES_BASIC_AUTH_PASSWORD`, `SELKIES_ENABLE_RESIZE`, `SELKIES_ENABLE_HTTPS`, `SELKIES_HTTPS_CERT`, `SELKIES_HTTPS_KEY`
  50. # - name: KASMVNC_ENABLE
  51. # value: "true"
  52. ###
  53. # Selkies-GStreamer parameters, for additional configurations see `selkies-gstreamer --help`
  54. ###
  55. # Change `SELKIES_ENCODER` to `x264enc`, `vp8enc`, or `vp9enc` if your GPU does not support `H.264 (AVCHD)` under the `NVENC - Encoding` section in https://developer.nvidia.com/video-encode-and-decode-gpu-support-matrix-new
  56. - name: SELKIES_ENCODER
  57. value: "nvh264enc"
  58. # Do NOT set to `true` if physical monitor is connected to video port
  59. - name: SELKIES_ENABLE_RESIZE
  60. value: "false"
  61. # Initial video bitrate in kilobits per second, may be changed later within web interface
  62. - name: SELKIES_VIDEO_BITRATE
  63. value: "8000"
  64. # Initial frames per second, may be changed later within web interface
  65. - name: SELKIES_FRAMERATE
  66. value: "60"
  67. # Initial audio bitrate in bits per second, may be changed later within web interface
  68. - name: SELKIES_AUDIO_BITRATE
  69. value: "128000"
  70. # Uncomment if network conditions rapidly fluctuate
  71. # - name: SELKIES_CONGESTION_CONTROL
  72. # value: "true"
  73. # Enable basic authentication with the web interface
  74. - name: SELKIES_ENABLE_BASIC_AUTH
  75. value: "true"
  76. # Defaults to `PASSWD` if unspecified, choose either `value:` or `secretKeyRef:` but not both at the same time
  77. # - name: SELKIES_BASIC_AUTH_PASSWORD
  78. # value: "mypasswd"
  79. # valueFrom:
  80. # secretKeyRef:
  81. # name: my-pass
  82. # key: my-pass
  83. # Enable HTTPS web interface from inside the container
  84. - name: SELKIES_ENABLE_HTTPS
  85. value: "false"
  86. # Volume mount trusted HTTPS certificate to new path for no web browser warnings
  87. # - name: SELKIES_HTTPS_CERT
  88. # value: /etc/ssl/certs/ssl-cert-snakeoil.pem
  89. # - name: SELKIES_HTTPS_KEY
  90. # value: /etc/ssl/private/ssl-cert-snakeoil.key
  91. ###
  92. # Uncomment below to use a TURN server for improved network compatibility
  93. ###
  94. # - name: SELKIES_TURN_HOST
  95. # value: "turn.example.com"
  96. # - name: SELKIES_TURN_PORT
  97. # value: "3478"
  98. # Provide only `SELKIES_TURN_SHARED_SECRET` for time-limited shared secret authentication or both `SELKIES_TURN_USERNAME` and `SELKIES_TURN_PASSWORD` for legacy long-term authentication, but do not provide both authentication methods at the same time
  99. # - name: SELKIES_TURN_SHARED_SECRET
  100. # valueFrom:
  101. # secretKeyRef:
  102. # name: turn-shared-secret
  103. # key: turn-shared-secret
  104. # - name: SELKIES_TURN_USERNAME
  105. # value: "username"
  106. # Choose either `value:` or `secretKeyRef:` but not both at the same time
  107. # - name: SELKIES_TURN_PASSWORD
  108. # value: "mypasswd"
  109. # valueFrom:
  110. # secretKeyRef:
  111. # name: turn-password
  112. # key: turn-password
  113. # TURN REST URI authentication, all TURN server settings above are ignored if enabled
  114. # - name: SELKIES_TURN_REST_URI
  115. # value: "http://localhost:8008"
  116. # Change to `tcp` if the UDP protocol is throttled or blocked in your client network, or when the TURN server does not support UDP
  117. # - name: SELKIES_TURN_PROTOCOL
  118. # value: "udp"
  119. # You need a valid hostname and a certificate from authorities such as ZeroSSL (Let's Encrypt may have issues) to enable this
  120. # - name: SELKIES_TURN_TLS
  121. # value: "false"
  122. stdin: true
  123. tty: true
  124. ports:
  125. - name: http
  126. containerPort: 8080
  127. protocol: TCP
  128. resources:
  129. limits:
  130. memory: 64Gi
  131. cpu: "16"
  132. nvidia.com/gpu: 1
  133. requests:
  134. memory: 100Mi
  135. cpu: 100m
  136. volumeMounts:
  137. - mountPath: /dev/shm
  138. name: dshm
  139. - mountPath: /cache
  140. name: xgl-cache-vol
  141. - mountPath: /home/ubuntu
  142. name: xgl-root-vol
  143. volumes:
  144. - name: dshm
  145. emptyDir:
  146. medium: Memory
  147. - name: xgl-cache-vol
  148. emptyDir: {}
  149. # persistentVolumeClaim:
  150. # claimName: xgl-cache-vol
  151. - name: xgl-root-vol
  152. emptyDir: {}
  153. # persistentVolumeClaim:
  154. # claimName: xgl-root-vol