deployment.yaml 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. name: youtube-dl
  5. labels:
  6. app.kubernetes.io/name: youtube-dl
  7. app.kubernetes.io/part-of: youtube-dl
  8. spec:
  9. replicas: 1
  10. selector:
  11. matchLabels:
  12. app.kubernetes.io/name: youtube-dl
  13. app.kubernetes.io/part-of: youtube-dl
  14. template:
  15. metadata:
  16. labels:
  17. app.kubernetes.io/name: youtube-dl
  18. app.kubernetes.io/part-of: youtube-dl
  19. spec:
  20. serviceAccountName: youtube-dl
  21. securityContext:
  22. {}
  23. containers:
  24. - name: youtube-dl
  25. securityContext:
  26. capabilities:
  27. drop:
  28. - ALL
  29. image: "nixery.dev/shell/entr/youtube-dl"
  30. resources:
  31. limits:
  32. cpu: 100m
  33. memory: 128Mi
  34. requests:
  35. cpu: 100m
  36. memory: 128Mi
  37. volumeMounts:
  38. - mountPath: /downloads
  39. name: youtube-dl
  40. - mountPath: /usr/local/bin
  41. name: script
  42. - mountPath: /etc/youtube-dl.conf
  43. subPath: youtube-dl.conf
  44. name: youtube-dl-configuration
  45. command: ["/bin/sh"]
  46. args: ["/usr/local/bin/script.sh"]
  47. workingDir: /downloads
  48. - name: "youtube-dl-rsync"
  49. image: "nixery.dev/shell/rsync"
  50. imagePullPolicy: IfNotPresent
  51. ports:
  52. - name: rsync
  53. containerPort: 873
  54. protocol: TCP
  55. resources:
  56. limits:
  57. cpu: 100m
  58. memory: 128Mi
  59. requests:
  60. cpu: 100m
  61. memory: 128Mi
  62. volumeMounts:
  63. - mountPath: /downloads
  64. name: youtube-dl
  65. - mountPath: /etc/rsyncd.conf
  66. subPath: rsyncd.conf
  67. name: rsync-configuration
  68. command: ["rsync"]
  69. args: ["--daemon", "--no-detach"]
  70. workingDir: /downloads
  71. - name: "youtube-dl-python-http-server"
  72. securityContext:
  73. capabilities:
  74. drop:
  75. - ALL
  76. image: nixery.dev/python3
  77. imagePullPolicy: IfNotPresent
  78. ports:
  79. - name: http
  80. containerPort: 8000
  81. protocol: TCP
  82. # TODO: Fix HTTP 404 and provide 200
  83. # livenessProbe:
  84. # httpGet:
  85. # path: /
  86. # port: 8000
  87. # readinessProbe:
  88. # httpGet:
  89. # path: /
  90. # port: 8000
  91. resources:
  92. limits:
  93. cpu: 100m
  94. memory: 128Mi
  95. requests:
  96. cpu: 100m
  97. memory: 128Mi
  98. volumeMounts:
  99. - mountPath: /downloads
  100. name: youtube-dl
  101. - mountPath: /usr/local/bin
  102. name: python-http-server
  103. command: ["/bin/python3"]
  104. args: ["/usr/local/bin/python-http-server.py"]
  105. workingDir: /downloads
  106. volumes:
  107. - name: youtube-dl
  108. emptyDir: {}
  109. - name: script
  110. configMap:
  111. name: script
  112. - name: youtube-dl-configuration
  113. configMap:
  114. name: youtube-dl-configuration
  115. - name: rsync-configuration
  116. configMap:
  117. name: rsync-configuration
  118. - name: python-http-server
  119. configMap:
  120. name: python-http-server