gphotos-uploader.yaml 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. apiVersion: v1
  2. kind: Service
  3. metadata:
  4. name: gphotos-uploader
  5. labels:
  6. run: gphotos-uploader
  7. spec:
  8. ports:
  9. - name: http
  10. port: 80
  11. targetPort: 29070
  12. selector:
  13. run: gphotos-uploader
  14. # type: LoadBalancer
  15. #status:
  16. # loadBalancer: {}
  17. ---
  18. apiVersion: v1
  19. kind: PersistentVolume
  20. metadata:
  21. name: gphotos-uploader-photos
  22. spec:
  23. capacity:
  24. storage: 10Ti
  25. volumeMode: Filesystem
  26. accessModes:
  27. - ReadWriteMany
  28. persistentVolumeReclaimPolicy: Retain # Keep 4eva
  29. storageClassName: default
  30. mountOptions:
  31. - hard
  32. - nfsvers=3
  33. nfs:
  34. path: /mnt/DroboFS/Shares/Public/midjourney
  35. server: 10.42.42.10
  36. claimRef:
  37. name: gphotos-uploader-photos
  38. namespace: default
  39. ---
  40. apiVersion: v1
  41. kind: PersistentVolumeClaim
  42. metadata:
  43. name: gphotos-uploader-photos
  44. spec:
  45. storageClassName: standard
  46. accessModes:
  47. - ReadWriteMany
  48. resources:
  49. requests:
  50. storage: 10Ti
  51. status: {}
  52. ---
  53. apiVersion: v1
  54. kind: PersistentVolume
  55. metadata:
  56. name: gphotos-uploader-config
  57. spec:
  58. capacity:
  59. storage: 5Mi
  60. volumeMode: Filesystem
  61. accessModes:
  62. - ReadWriteMany
  63. persistentVolumeReclaimPolicy: Retain # Keep 4eva
  64. storageClassName: default
  65. mountOptions:
  66. - hard
  67. - nfsvers=3
  68. nfs:
  69. path: /mnt/DroboFS/Shares/Kubernetes/volumes/static/gphotos-uploader-config
  70. server: 10.42.42.10
  71. claimRef:
  72. name: gphotos-uploader-config
  73. namespace: default
  74. ---
  75. apiVersion: v1
  76. kind: PersistentVolumeClaim
  77. metadata:
  78. name: gphotos-uploader-config
  79. annotations:
  80. nfs.io/storage-path: "gphotos-uploader-config"
  81. spec:
  82. storageClassName: default
  83. accessModes:
  84. - ReadWriteMany
  85. resources:
  86. requests:
  87. storage: 5Mi
  88. status: {}
  89. ---
  90. apiVersion: apps/v1
  91. kind: Deployment
  92. metadata:
  93. name: gphotos-uploader
  94. spec:
  95. replicas: 1
  96. selector:
  97. matchLabels:
  98. run: gphotos-uploader
  99. strategy:
  100. type: Recreate
  101. template:
  102. metadata:
  103. labels:
  104. run: gphotos-uploader
  105. spec:
  106. terminationGracePeriodSeconds: 30
  107. containers:
  108. - image: rfgamaral/gphotos-uploader:amd64-latest
  109. imagePullPolicy: "Always"
  110. name: gphotos-uploader
  111. env:
  112. - name: GPU_SCHEDULE
  113. value: "*/30 * * * *"
  114. - name: TZ
  115. value: US/Michigan
  116. ports:
  117. - containerPort: 29070
  118. resources:
  119. limits:
  120. memory: "500Mi"
  121. cpu: "500m"
  122. requests:
  123. memory: "300Mi"
  124. cpu: "250m"
  125. volumeMounts:
  126. - mountPath: /config
  127. name: gphotos-uploader-config
  128. - mountPath: /photos
  129. name: gphotos-uploader-photos
  130. restartPolicy: Always
  131. volumes:
  132. - name: gphotos-uploader-config
  133. persistentVolumeClaim:
  134. claimName: gphotos-uploader-config
  135. - name: gphotos-uploader-photos
  136. persistentVolumeClaim:
  137. claimName: gphotos-uploader-photos
  138. dnsPolicy: "None"
  139. dnsConfig:
  140. nameservers:
  141. - 10.42.42.239
  142. - 10.42.42.1
  143. searches:
  144. - default.svc.cluster.local
  145. - svc.cluster.local
  146. - cluster.local
  147. options:
  148. - name: ndots
  149. value: "2"
  150. - name: edns0
  151. - name: trust-ad
  152. status: {}
  153. ---
  154. # Hosting
  155. apiVersion: networking.k8s.io/v1
  156. kind: Ingress
  157. metadata:
  158. name: gphotos-uploader-ingress
  159. annotations:
  160. cert-manager.io/cluster-issuer: "letsencrypt-prod"
  161. ## No basic auth for gphotos-uploader
  162. ## type of authentication
  163. #nginx.ingress.kubernetes.io/auth-type: basic
  164. ## name of the secret that contains the user/password definitions
  165. #nginx.ingress.kubernetes.io/auth-secret: basic-auth
  166. ## message to display with an appropriate context why the authentication is required
  167. #nginx.ingress.kubernetes.io/auth-realm: 'Authentication Required - Octoprint'
  168. spec:
  169. tls:
  170. - hosts:
  171. - gphotos-uploader.monkeybox.org
  172. secretName: gphotos-uploader-tls
  173. rules:
  174. - host: gphotos-uploader.monkeybox.org
  175. http:
  176. paths:
  177. - path: /
  178. pathType: Prefix
  179. backend:
  180. service:
  181. name: gphotos-uploader
  182. port:
  183. number: 80