Browse Source

GDrive Token Added

Fred Damstra (k8s1) 2 years ago
parent
commit
247d3a270b
4 changed files with 17 additions and 0 deletions
  1. 1 0
      .gitignore
  2. 7 0
      README.md
  3. 8 0
      k8s.midjourney-sort-and-upload.yaml
  4. 1 0
      sort_and_upload.sh

+ 1 - 0
.gitignore

@@ -1 +1,2 @@
 notes.secret.txt
+token_v2.json

+ 7 - 0
README.md

@@ -13,3 +13,10 @@ kubectl create secret generic midjourney-sort-and-upload \
   --from-literal=LARGE=longstringofnumbers
 ```
 
+## You also need a secret for the openid token. Again, not sure how I got this originally
+
+The file was in io's home in `.gdrive/token_v2.json`.
+
+```
+kubectl create secret generic gdrive-token --from-literal=TOKEN=$(cat token_v2.json)
+```

+ 8 - 0
k8s.midjourney-sort-and-upload.yaml

@@ -94,6 +94,8 @@ spec:
               mountPath: /scratch/
             - name: midjourney-sort-and-upload-workdir
               mountPath: /midjourney/
+            - name: gdrive-token
+              mountPath: /.gdrive/
           dnsPolicy: "None"
           dnsConfig:
             nameservers:
@@ -116,3 +118,9 @@ spec:
           - name: midjourney-sort-and-upload-workdir
             persistentVolumeClaim:
               claimName: midjourney-sort-and-upload-workdir
+          - name: gdrive-token
+            secret:
+              secretName: gdrive-token
+              items:
+                - key: TOKEN
+                  path: token_v2.json

+ 1 - 0
sort_and_upload.sh

@@ -6,6 +6,7 @@ MIDJOURNEYDIR=/midjourney/
 
 echo ""
 echo "Starting midjourney sync and upload - $(date)" 2>&1 | tee -a ${LOGFILE}
+echo "DEBUG: HOME IS: ${HOME}"
 
 if [[ ! -v SMALL ]]; then
   echo "ERROR: No gdrive key for SMALL" 2>&1 | tee -a ${LOGFILE}