xgl.yml 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  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` also defaulting 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` 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 your TURN server with shared secret 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. stdin: true
  95. tty: true
  96. ports:
  97. - name: http
  98. containerPort: 8080
  99. protocol: TCP
  100. resources:
  101. limits:
  102. memory: 64Gi
  103. cpu: "16"
  104. nvidia.com/gpu: 1
  105. requests:
  106. memory: 100Mi
  107. cpu: 100m
  108. volumeMounts:
  109. - mountPath: /dev/shm
  110. name: dshm
  111. - mountPath: /cache
  112. name: xgl-cache-vol
  113. - mountPath: /home/user
  114. name: xgl-root-vol
  115. volumes:
  116. - name: dshm
  117. emptyDir:
  118. medium: Memory
  119. - name: xgl-cache-vol
  120. emptyDir: {}
  121. # persistentVolumeClaim:
  122. # claimName: xgl-cache-vol
  123. - name: xgl-root-vol
  124. emptyDir: {}
  125. # persistentVolumeClaim:
  126. # claimName: xgl-root-vol