xgl.yml 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  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 this to enable noVNC, disabing Selkies-GStreamer and ignoring all its parameters except `SELKIES_BASIC_AUTH_PASSWORD`, which will be used for authentication with noVNC, `SELKIES_BASIC_AUTH_PASSWORD` defaults to `PASSWD` if not provided
  48. # - name: NOVNC_ENABLE
  49. # value: "true"
  50. # Additional view-only password only applicable to the noVNC interface, choose either `value:` or `secretKeyRef:` but not both at the same time
  51. # - name: NOVNC_VIEWPASS
  52. # value: "mypasswd"
  53. # valueFrom:
  54. # secretKeyRef:
  55. # name: my-pass
  56. # key: my-pass
  57. ###
  58. # Selkies-GStreamer parameters, for additional configurations see `selkies-gstreamer --help`
  59. ###
  60. # 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
  61. - name: SELKIES_ENCODER
  62. value: "nvh264enc"
  63. - name: SELKIES_ENABLE_RESIZE
  64. value: "false"
  65. - name: SELKIES_ENABLE_BASIC_AUTH
  66. value: "true"
  67. - name: SELKIES_ENABLE_HTTPS_WEB
  68. value: "false"
  69. # Volume mount trusted HTTPS certificate to new path for no web browser warnings
  70. # - name: SELKIES_HTTPS_WEB_CERT
  71. # value: /etc/ssl/certs/ssl-cert-snakeoil.pem
  72. # - name: SELKIES_HTTPS_WEB_KEY
  73. # value: /etc/ssl/private/ssl-cert-snakeoil.key
  74. # Defaults to `PASSWD` if unspecified, choose either `value:` or `secretKeyRef:` but not both at the same time
  75. # - name: SELKIES_BASIC_AUTH_PASSWORD
  76. # value: "mypasswd"
  77. # valueFrom:
  78. # secretKeyRef:
  79. # name: my-pass
  80. # key: my-pass
  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. # Change to `tcp` if the UDP protocol is throttled or blocked in your client network, or when the TURN server does not support UDP
  104. # - name: SELKIES_TURN_PROTOCOL
  105. # value: "udp"
  106. # You need a valid hostname and a certificate from authorities such as ZeroSSL (Let's Encrypt may have issues) to enable this
  107. # - name: SELKIES_TURN_TLS
  108. # value: "false"
  109. stdin: true
  110. tty: true
  111. ports:
  112. - name: http
  113. containerPort: 8080
  114. protocol: TCP
  115. resources:
  116. limits:
  117. memory: 64Gi
  118. cpu: "16"
  119. nvidia.com/gpu: 1
  120. requests:
  121. memory: 100Mi
  122. cpu: 100m
  123. volumeMounts:
  124. - mountPath: /dev/shm
  125. name: dshm
  126. - mountPath: /cache
  127. name: xgl-cache-vol
  128. - mountPath: /home/ubuntu
  129. name: xgl-root-vol
  130. volumes:
  131. - name: dshm
  132. emptyDir:
  133. medium: Memory
  134. - name: xgl-cache-vol
  135. emptyDir: {}
  136. # persistentVolumeClaim:
  137. # claimName: xgl-cache-vol
  138. - name: xgl-root-vol
  139. emptyDir: {}
  140. # persistentVolumeClaim:
  141. # claimName: xgl-root-vol