diff update_job.yaml @ 4:a248c94091e7

get updater working BAMN
author drewp@bigasterisk.com
date Thu, 16 Mar 2023 18:11:02 -0700
parents 781290b4a683
children 4bf137b25259
line wrap: on
line diff
--- a/update_job.yaml	Thu Mar 16 18:09:55 2023 -0700
+++ b/update_job.yaml	Thu Mar 16 18:11:02 2023 -0700
@@ -3,19 +3,32 @@
 metadata:
   name: photoprism-update
 spec:
+  # run one now with this:
+  #   k delete job/updatetest ; k create job --from=cronjob/photoprism-update updatetest
   schedule: "20 3 * * *"
   concurrencyPolicy: Replace
   jobTemplate:
     spec:
       template:
         spec:
+          serviceAccountName: photoprism
           volumes:
             - { name: my, persistentVolumeClaim: { claimName: my } }
           containers:
           - name: update
             image: bang5:5000/photoprism_update
             volumeMounts:
-              - { name: my, mountPath: /my/pic, subPath: pic }
-              - { name: my, mountPath: /my/pda/note10, subPath: pda/note10 }
+              #- { name: my, mountPath: /my/pic, subPath: pic }
+              #- { name: my, mountPath: /my/pda/note10, subPath: pda/note10 }
+              - { name: my, mountPath: /my }
+              
+          affinity:
+            nodeAffinity:
+              requiredDuringSchedulingIgnoredDuringExecution:
+                nodeSelectorTerms:
+                  - matchExpressions:
+                      - key: "kubernetes.io/hostname"
+                        operator: In
+                        values: ["ditto"]  # anything with nfs, but bang is fastest right now  
           restartPolicy: Never
       backoffLimit: 1