xgl.yml 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. name: xgl
  5. spec:
  6. replicas: 1
  7. selector:
  8. matchLabels:
  9. app: xgl
  10. template:
  11. metadata:
  12. labels:
  13. app: xgl
  14. spec:
  15. hostname: xgl
  16. # Uncomment the below line to disable network isolation for WebRTC connectivity, may show an error if disallowed by the cluster
  17. # hostNetwork: true
  18. containers:
  19. - name: xgl
  20. image: ghcr.io/ehfd/nvidia-glx-desktop:latest
  21. env:
  22. - name: TZ
  23. value: "UTC"
  24. - name: SIZEW
  25. value: "1920"
  26. - name: SIZEH
  27. value: "1080"
  28. - name: REFRESH
  29. value: "60"
  30. - name: DPI
  31. value: "96"
  32. - name: CDEPTH
  33. value: "24"
  34. # Change to DP-0 or any other DP-* port for larger resolution support if you are NOT using datacenter GPUs
  35. - name: VIDEO_PORT
  36. value: "DFP"
  37. # Choose either `value:` or `secretKeyRef:` but not both at the same time
  38. - name: PASSWD
  39. value: "mypasswd"
  40. # valueFrom:
  41. # secretKeyRef:
  42. # name: my-pass
  43. # key: my-pass
  44. # Uncomment this to enable noVNC, disabing selkies-gstreamer and ignoring all its parameters except `BASIC_AUTH_PASSWORD`, which will be used for authentication with noVNC, `BASIC_AUTH_PASSWORD` defaults to `PASSWD` if not provided
  45. # - name: NOVNC_ENABLE
  46. # value: "true"
  47. # Additional view-only password only applicable to the noVNC interface, choose either `value:` or `secretKeyRef:` but not both at the same time
  48. # - name: NOVNC_VIEWPASS
  49. # value: "mypasswd"
  50. # valueFrom:
  51. # secretKeyRef:
  52. # name: my-pass
  53. # key: my-pass
  54. ###
  55. # selkies-gstreamer parameters, for additional configurations see lines that start with "parser.add_argument" in https://github.com/selkies-project/selkies-gstreamer/blob/master/src/selkies_gstreamer/__main__.py
  56. ###
  57. # Change `WEBRTC_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
  58. - name: WEBRTC_ENCODER
  59. value: "nvh264enc"
  60. - name: WEBRTC_ENABLE_RESIZE
  61. value: "false"
  62. - name: ENABLE_AUDIO
  63. value: "true"
  64. - name: 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: BASIC_AUTH_PASSWORD
  68. # value: "mypasswd"
  69. # valueFrom:
  70. # secretKeyRef:
  71. # name: my-pass
  72. # key: my-pass
  73. ###
  74. # Uncomment below to use a TURN server for improved network compatibility
  75. ###
  76. # - name: TURN_HOST
  77. # value: "turn.example.com"
  78. # - name: TURN_PORT
  79. # value: "3478"
  80. # Provide only `TURN_SHARED_SECRET` for time-limited shared secret authentication or both `TURN_USERNAME` and `TURN_PASSWORD` for legacy long-term authentication, but do not provide both authentication methods at the same time
  81. # - name: TURN_SHARED_SECRET
  82. # valueFrom:
  83. # secretKeyRef:
  84. # name: turn-shared-secret
  85. # key: turn-shared-secret
  86. # - name: TURN_USERNAME
  87. # value: "username"
  88. # Choose either `value:` or `secretKeyRef:` but not both at the same time
  89. # - name: TURN_PASSWORD
  90. # value: "mypasswd"
  91. # valueFrom:
  92. # secretKeyRef:
  93. # name: turn-password
  94. # key: turn-password
  95. # Change to `tcp` if the UDP protocol is throttled or blocked in your client network, or when the TURN server does not support UDP
  96. # - name: TURN_PROTOCOL
  97. # value: "udp"
  98. # You need a valid hostname and a certificate from authorities such as ZeroSSL (Let's Encrypt may have issues) to enable this
  99. # - name: TURN_TLS
  100. # value: "false"
  101. stdin: true
  102. tty: true
  103. ports:
  104. - name: http
  105. containerPort: 8080
  106. protocol: TCP
  107. resources:
  108. limits:
  109. memory: 64Gi
  110. cpu: "16"
  111. nvidia.com/gpu: 1
  112. requests:
  113. memory: 100Mi
  114. cpu: 100m
  115. volumeMounts:
  116. - mountPath: /dev/shm
  117. name: dshm
  118. - mountPath: /cache
  119. name: xgl-cache-vol
  120. - mountPath: /home/user
  121. name: xgl-root-vol
  122. volumes:
  123. - name: dshm
  124. emptyDir:
  125. medium: Memory
  126. - name: xgl-cache-vol
  127. emptyDir: {}
  128. # persistentVolumeClaim:
  129. # claimName: xgl-cache-vol
  130. - name: xgl-root-vol
  131. emptyDir: {}
  132. # persistentVolumeClaim:
  133. # claimName: xgl-root-vol