xgl.yml 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  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. image: ghcr.io/selkies-project/nvidia-glx-desktop:latest
  24. env:
  25. - name: TZ
  26. value: "UTC"
  27. - name: DISPLAY_SIZEW
  28. value: "1920"
  29. - name: DISPLAY_SIZEH
  30. value: "1080"
  31. - name: DISPLAY_REFRESH
  32. value: "60"
  33. - name: DISPLAY_DPI
  34. value: "96"
  35. - name: DISPLAY_CDEPTH
  36. value: "24"
  37. # Change to DP-0 or any other DP-* port for larger resolution support if you are NOT using datacenter GPUs
  38. - name: VIDEO_PORT
  39. value: "DFP"
  40. # Choose either `value:` or `secretKeyRef:` but not both at the same time
  41. - name: PASSWD
  42. value: "mypasswd"
  43. # valueFrom:
  44. # secretKeyRef:
  45. # name: my-pass
  46. # key: my-pass
  47. # Uncomment to enable KasmVNC instead of Selkies-GStreamer, `SELKIES_BASIC_AUTH_PASSWORD` is used for authentication with KasmVNC, defaulting to `PASSWD` if not provided
  48. # - name: KASMVNC_ENABLE
  49. # value: "true"
  50. ###
  51. # Selkies-GStreamer parameters, for additional configurations see `selkies-gstreamer --help`
  52. ###
  53. # Change `SELKIES_ENCODER` to `x264enc`, `vp8enc`, or `vp9enc` if your GPU doesn't support `H.264 (AVCHD)` under the `NVENC - Encoding` section in https://developer.nvidia.com/video-encode-and-decode-gpu-support-matrix-new
  54. - name: SELKIES_ENCODER
  55. value: "nvh264enc"
  56. - name: SELKIES_ENABLE_RESIZE
  57. value: "false"
  58. - name: SELKIES_ENABLE_BASIC_AUTH
  59. value: "true"
  60. - name: SELKIES_ENABLE_HTTPS_WEB
  61. value: "false"
  62. # Volume mount trusted HTTPS certificate to new path for no web browser warnings
  63. # - name: SELKIES_HTTPS_WEB_CERT
  64. # value: /etc/ssl/certs/ssl-cert-snakeoil.pem
  65. # - name: SELKIES_HTTPS_WEB_KEY
  66. # value: /etc/ssl/private/ssl-cert-snakeoil.key
  67. # Defaults to `PASSWD` if unspecified, choose either `value:` or `secretKeyRef:` but not both at the same time
  68. # - name: SELKIES_BASIC_AUTH_PASSWORD
  69. # value: "mypasswd"
  70. # valueFrom:
  71. # secretKeyRef:
  72. # name: my-pass
  73. # key: my-pass
  74. ###
  75. # Uncomment below to use a TURN server for improved network compatibility
  76. ###
  77. # - name: SELKIES_TURN_HOST
  78. # value: "turn.example.com"
  79. # - name: SELKIES_TURN_PORT
  80. # value: "3478"
  81. # 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
  82. # - name: SELKIES_TURN_SHARED_SECRET
  83. # valueFrom:
  84. # secretKeyRef:
  85. # name: turn-shared-secret
  86. # key: turn-shared-secret
  87. # - name: SELKIES_TURN_USERNAME
  88. # value: "username"
  89. # Choose either `value:` or `secretKeyRef:` but not both at the same time
  90. # - name: SELKIES_TURN_PASSWORD
  91. # value: "mypasswd"
  92. # valueFrom:
  93. # secretKeyRef:
  94. # name: turn-password
  95. # key: turn-password
  96. # Change to `tcp` if the UDP protocol is throttled or blocked in your client network, or when the TURN server does not support UDP
  97. # - name: SELKIES_TURN_PROTOCOL
  98. # value: "udp"
  99. # You need a valid hostname and a certificate from authorities such as ZeroSSL (Let's Encrypt may have issues) to enable this
  100. # - name: SELKIES_TURN_TLS
  101. # value: "false"
  102. stdin: true
  103. tty: true
  104. ports:
  105. - name: http
  106. containerPort: 8080
  107. protocol: TCP
  108. resources:
  109. limits:
  110. memory: 64Gi
  111. cpu: "16"
  112. nvidia.com/gpu: 1
  113. requests:
  114. memory: 100Mi
  115. cpu: 100m
  116. volumeMounts:
  117. - mountPath: /dev/shm
  118. name: dshm
  119. - mountPath: /cache
  120. name: xgl-cache-vol
  121. - mountPath: /home/ubuntu
  122. name: xgl-root-vol
  123. volumes:
  124. - name: dshm
  125. emptyDir:
  126. medium: Memory
  127. - name: xgl-cache-vol
  128. emptyDir: {}
  129. # persistentVolumeClaim:
  130. # claimName: xgl-cache-vol
  131. - name: xgl-root-vol
  132. emptyDir: {}
  133. # persistentVolumeClaim:
  134. # claimName: xgl-root-vol