xgl.yml 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  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. - name: SELKIES_ENABLE_RESIZE
  59. value: "false"
  60. # Enable if network conditions rapidly fluctuate
  61. # - name: SELKIES_CONGESTION_CONTROL
  62. # value: "false"
  63. # Enable basic authentication with the web interface
  64. - name: SELKIES_ENABLE_BASIC_AUTH
  65. value: "true"
  66. # Defaults to `PASSWD` if unspecified, choose either `value:` or `secretKeyRef:` but not both at the same time
  67. # - name: SELKIES_BASIC_AUTH_PASSWORD
  68. # value: "mypasswd"
  69. # valueFrom:
  70. # secretKeyRef:
  71. # name: my-pass
  72. # key: my-pass
  73. # Enable HTTPS web interface from inside the container
  74. - name: SELKIES_ENABLE_HTTPS
  75. value: "false"
  76. # Volume mount trusted HTTPS certificate to new path for no web browser warnings
  77. # - name: SELKIES_HTTPS_CERT
  78. # value: /etc/ssl/certs/ssl-cert-snakeoil.pem
  79. # - name: SELKIES_HTTPS_KEY
  80. # value: /etc/ssl/private/ssl-cert-snakeoil.key
  81. ###
  82. # Uncomment below to use a TURN server for improved network compatibility
  83. ###
  84. # - name: SELKIES_TURN_HOST
  85. # value: "turn.example.com"
  86. # - name: SELKIES_TURN_PORT
  87. # value: "3478"
  88. # 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
  89. # - name: SELKIES_TURN_SHARED_SECRET
  90. # valueFrom:
  91. # secretKeyRef:
  92. # name: turn-shared-secret
  93. # key: turn-shared-secret
  94. # - name: SELKIES_TURN_USERNAME
  95. # value: "username"
  96. # Choose either `value:` or `secretKeyRef:` but not both at the same time
  97. # - name: SELKIES_TURN_PASSWORD
  98. # value: "mypasswd"
  99. # valueFrom:
  100. # secretKeyRef:
  101. # name: turn-password
  102. # key: turn-password
  103. # TURN REST URI authentication, all TURN server settings above are ignored if enabled
  104. # - name: SELKIES_TURN_REST_URI
  105. # value: "http://localhost:8008"
  106. # Change to `tcp` if the UDP protocol is throttled or blocked in your client network, or when the TURN server does not support UDP
  107. # - name: SELKIES_TURN_PROTOCOL
  108. # value: "udp"
  109. # You need a valid hostname and a certificate from authorities such as ZeroSSL (Let's Encrypt may have issues) to enable this
  110. # - name: SELKIES_TURN_TLS
  111. # value: "false"
  112. stdin: true
  113. tty: true
  114. ports:
  115. - name: http
  116. containerPort: 8080
  117. protocol: TCP
  118. resources:
  119. limits:
  120. memory: 64Gi
  121. cpu: "16"
  122. nvidia.com/gpu: 1
  123. requests:
  124. memory: 100Mi
  125. cpu: 100m
  126. volumeMounts:
  127. - mountPath: /dev/shm
  128. name: dshm
  129. - mountPath: /cache
  130. name: xgl-cache-vol
  131. - mountPath: /home/ubuntu
  132. name: xgl-root-vol
  133. volumes:
  134. - name: dshm
  135. emptyDir:
  136. medium: Memory
  137. - name: xgl-cache-vol
  138. emptyDir: {}
  139. # persistentVolumeClaim:
  140. # claimName: xgl-cache-vol
  141. - name: xgl-root-vol
  142. emptyDir: {}
  143. # persistentVolumeClaim:
  144. # claimName: xgl-root-vol