xgl.yml 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  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, display `:20` and `:21` should not be used in the host, may show an error if disallowed by the cluster
  20. # hostNetwork: true
  21. containers:
  22. - name: xgl
  23. # Change tag `latest` to Ubuntu versions such as `24.04`, use a persistent tag such as `24.04-20210101010101` to persist a certain container version
  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. # Number of threads for encoding frames with KasmVNC, default value is all threads
  53. # - name: KASMVNC_THREADS
  54. # value: "0"
  55. ###
  56. # Selkies-GStreamer parameters, for additional configurations see `selkies-gstreamer --help`
  57. ###
  58. # 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
  59. - name: SELKIES_ENCODER
  60. value: "nvh264enc"
  61. # Do NOT set to `true` if physical monitor is connected to video port
  62. - name: SELKIES_ENABLE_RESIZE
  63. value: "false"
  64. # Initial video bitrate in kilobits per second, may be changed later within web interface
  65. - name: SELKIES_VIDEO_BITRATE
  66. value: "8000"
  67. # Initial frames per second, may be changed later within web interface
  68. - name: SELKIES_FRAMERATE
  69. value: "60"
  70. # Initial audio bitrate in bits per second, may be changed later within web interface
  71. - name: SELKIES_AUDIO_BITRATE
  72. value: "128000"
  73. # Uncomment if network conditions rapidly fluctuate
  74. # - name: SELKIES_CONGESTION_CONTROL
  75. # value: "true"
  76. # Enable basic authentication with the web interface
  77. - name: SELKIES_ENABLE_BASIC_AUTH
  78. value: "true"
  79. # Defaults to `PASSWD` if unspecified, choose either `value:` or `secretKeyRef:` but not both at the same time
  80. # - name: SELKIES_BASIC_AUTH_PASSWORD
  81. # value: "mypasswd"
  82. # valueFrom:
  83. # secretKeyRef:
  84. # name: my-pass
  85. # key: my-pass
  86. # Enable HTTPS web interface from inside the container
  87. - name: SELKIES_ENABLE_HTTPS
  88. value: "false"
  89. # Volume mount trusted HTTPS certificate to new path for no web browser warnings
  90. # - name: SELKIES_HTTPS_CERT
  91. # value: /etc/ssl/certs/ssl-cert-snakeoil.pem
  92. # - name: SELKIES_HTTPS_KEY
  93. # value: /etc/ssl/private/ssl-cert-snakeoil.key
  94. ###
  95. # Uncomment below to use a TURN server for improved network compatibility
  96. ###
  97. # - name: SELKIES_TURN_HOST
  98. # value: "turn.example.com"
  99. # - name: SELKIES_TURN_PORT
  100. # value: "3478"
  101. # Change to `tcp` if the UDP protocol is throttled or blocked in your client network, or when the TURN server does not support UDP
  102. # - name: SELKIES_TURN_PROTOCOL
  103. # value: "udp"
  104. # You need a valid hostname and a certificate from authorities such as ZeroSSL or Let's Encrypt to enable this
  105. # - name: SELKIES_TURN_TLS
  106. # value: "false"
  107. # Internal TURN server settings, do not uncomment other TURN server settings below this when using an internal TURN server
  108. # - name: TURN_MIN_PORT
  109. # value: "65534"
  110. # - name: TURN_MAX_PORT
  111. # value: "65535"
  112. # 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
  113. # - name: SELKIES_TURN_SHARED_SECRET
  114. # valueFrom:
  115. # secretKeyRef:
  116. # name: turn-shared-secret
  117. # key: turn-shared-secret
  118. # - name: SELKIES_TURN_USERNAME
  119. # value: "username"
  120. # Choose either `value:` or `secretKeyRef:` but not both at the same time
  121. # - name: SELKIES_TURN_PASSWORD
  122. # value: "mypasswd"
  123. # valueFrom:
  124. # secretKeyRef:
  125. # name: turn-password
  126. # key: turn-password
  127. # TURN REST URI authentication, all TURN server settings above are ignored if enabled
  128. # - name: SELKIES_TURN_REST_URI
  129. # value: "http://localhost:8008"
  130. stdin: true
  131. tty: true
  132. ports:
  133. - name: http
  134. containerPort: 8080
  135. protocol: TCP
  136. # Internal TURN server settings
  137. # - containerPort: 3478
  138. # protocol: TCP
  139. # - containerPort: 65534
  140. # protocol: TCP
  141. # - containerPort: 65535
  142. # protocol: TCP
  143. # - containerPort: 3478
  144. # protocol: UDP
  145. # - containerPort: 65534
  146. # protocol: UDP
  147. # - containerPort: 65535
  148. # protocol: UDP
  149. resources:
  150. limits:
  151. memory: 64Gi
  152. cpu: "16"
  153. nvidia.com/gpu: 1
  154. requests:
  155. memory: 100Mi
  156. cpu: 100m
  157. volumeMounts:
  158. - mountPath: /dev/shm
  159. name: dshm
  160. - mountPath: /cache
  161. name: xgl-cache-vol
  162. - mountPath: /home/ubuntu
  163. name: xgl-root-vol
  164. volumes:
  165. - name: dshm
  166. emptyDir:
  167. medium: Memory
  168. - name: xgl-cache-vol
  169. emptyDir: {}
  170. # persistentVolumeClaim:
  171. # claimName: xgl-cache-vol
  172. - name: xgl-root-vol
  173. emptyDir: {}
  174. # persistentVolumeClaim:
  175. # claimName: xgl-root-vol