gphotos-uploader.yaml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  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:arm64v8-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. volumeMounts:
  120. - mountPath: /config
  121. name: gphotos-uploader-config
  122. - mountPath: /photos
  123. name: gphotos-uploader-photos
  124. restartPolicy: Always
  125. volumes:
  126. - name: gphotos-uploader-config
  127. persistentVolumeClaim:
  128. claimName: gphotos-uploader-config
  129. - name: gphotos-uploader-photos
  130. persistentVolumeClaim:
  131. claimName: gphotos-uploader-photos
  132. dnsPolicy: "None"
  133. dnsConfig:
  134. nameservers:
  135. - 10.42.42.239
  136. - 10.42.42.1
  137. searches:
  138. - default.svc.cluster.local
  139. - svc.cluster.local
  140. - cluster.local
  141. options:
  142. - name: ndots
  143. value: "2"
  144. - name: edns0
  145. - name: trust-ad
  146. status: {}
  147. ---
  148. # Hosting
  149. apiVersion: networking.k8s.io/v1
  150. kind: Ingress
  151. metadata:
  152. name: gphotos-uploader-ingress
  153. annotations:
  154. cert-manager.io/cluster-issuer: "letsencrypt-prod"
  155. ## No basic auth for gphotos-uploader
  156. ## type of authentication
  157. #nginx.ingress.kubernetes.io/auth-type: basic
  158. ## name of the secret that contains the user/password definitions
  159. #nginx.ingress.kubernetes.io/auth-secret: basic-auth
  160. ## message to display with an appropriate context why the authentication is required
  161. #nginx.ingress.kubernetes.io/auth-realm: 'Authentication Required - Octoprint'
  162. spec:
  163. tls:
  164. - hosts:
  165. - gphotos-uploader.monkeybox.org
  166. secretName: gphotos-uploader-tls
  167. rules:
  168. - host: gphotos-uploader.monkeybox.org
  169. http:
  170. paths:
  171. - path: /
  172. pathType: Prefix
  173. backend:
  174. service:
  175. name: gphotos-uploader
  176. port:
  177. number: 80