xgl.yml 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  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. - name: VIDEO_PORT
  35. value: "DFP"
  36. # Choose either `value:` or `secretKeyRef:` but not both at the same time
  37. - name: PASSWD
  38. value: "mypasswd"
  39. # valueFrom:
  40. # secretKeyRef:
  41. # name: my-pass
  42. # key: my-pass
  43. # 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
  44. # - name: NOVNC_ENABLE
  45. # value: "true"
  46. # Additional view-only password only applicable to the noVNC interface, choose either `value:` or `secretKeyRef:` but not both at the same time
  47. # - name: NOVNC_VIEWPASS
  48. # value: "mypasswd"
  49. # valueFrom:
  50. # secretKeyRef:
  51. # name: my-pass
  52. # key: my-pass
  53. ###
  54. # 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
  55. ###
  56. # 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
  57. - name: WEBRTC_ENCODER
  58. value: "nvh264enc"
  59. - name: WEBRTC_ENABLE_RESIZE
  60. value: "false"
  61. - name: ENABLE_AUDIO
  62. value: "true"
  63. - name: ENABLE_BASIC_AUTH
  64. value: "true"
  65. # Defaults to `PASSWD` if unspecified, choose either `value:` or `secretKeyRef:` but not both at the same time
  66. # - name: BASIC_AUTH_PASSWORD
  67. # value: "mypasswd"
  68. # valueFrom:
  69. # secretKeyRef:
  70. # name: my-pass
  71. # key: my-pass
  72. ###
  73. # Uncomment below to use a TURN server for improved network compatibility
  74. ###
  75. # - name: TURN_HOST
  76. # value: "turn.example.com"
  77. # - name: TURN_PORT
  78. # value: "3478"
  79. # 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
  80. # - name: TURN_SHARED_SECRET
  81. # valueFrom:
  82. # secretKeyRef:
  83. # name: turn-shared-secret
  84. # key: turn-shared-secret
  85. # - name: TURN_USERNAME
  86. # value: "username"
  87. # Choose either `value:` or `secretKeyRef:` but not both at the same time
  88. # - name: TURN_PASSWORD
  89. # value: "mypasswd"
  90. # valueFrom:
  91. # secretKeyRef:
  92. # name: turn-password
  93. # key: turn-password
  94. # Change to `tcp` if the UDP protocol is throttled or blocked in your client network, or when the TURN server does not support UDP
  95. # - name: TURN_PROTOCOL
  96. # value: "udp"
  97. # You need a valid hostname and a certificate from authorities such as ZeroSSL (Let's Encrypt may have issues) to enable this
  98. # - name: TURN_TLS
  99. # value: "false"
  100. stdin: true
  101. tty: true
  102. ports:
  103. - name: http
  104. containerPort: 8080
  105. protocol: TCP
  106. resources:
  107. limits:
  108. memory: 64Gi
  109. cpu: "16"
  110. nvidia.com/gpu: 1
  111. requests:
  112. memory: 100Mi
  113. cpu: 100m
  114. volumeMounts:
  115. - mountPath: /dev/shm
  116. name: dshm
  117. - mountPath: /cache
  118. name: xgl-cache-vol
  119. - mountPath: /home/user
  120. name: xgl-root-vol
  121. volumes:
  122. - name: dshm
  123. emptyDir:
  124. medium: Memory
  125. - name: xgl-cache-vol
  126. emptyDir: {}
  127. # persistentVolumeClaim:
  128. # claimName: xgl-cache-vol
  129. - name: xgl-root-vol
  130. emptyDir: {}
  131. # persistentVolumeClaim:
  132. # claimName: xgl-root-vol