changeset 6:4bf137b25259

reformat
author drewp@bigasterisk.com
date Sun, 19 Mar 2023 17:18:17 -0700
parents 01128677024d
children 07aa4c3cddc4
files deploy.yaml roles.yaml skaffold.yaml update_job.yaml
diffstat 4 files changed, 63 insertions(+), 63 deletions(-) [+]
line wrap: on
line diff
--- a/deploy.yaml	Sun Mar 19 17:14:41 2023 -0700
+++ b/deploy.yaml	Sun Mar 19 17:18:17 2023 -0700
@@ -65,7 +65,7 @@
       volumes:
         - { name: photoprism-storage, persistentVolumeClaim: { claimName: photoprism-storage } }
         - { name: photoprism-originals, persistentVolumeClaim: { claimName: photoprism-originals } }
-        - { name: run-mysqld, emptyDir: {}}
+        - { name: run-mysqld, emptyDir: {} }
       containers:
         - name: photoprism
           # https://github.com/photoprism/photoprism/releases
@@ -75,18 +75,18 @@
             - { name: PHOTOPRISM_UPLOAD_NSFW, value: "true" }
             - { name: PHOTOPRISM_READONLY, value: "true" }
             - { name: PHOTOPRISM_LOG_LEVEL, value: "trace" }
-            - { name: PHOTOPRISM_TRACE, value: "true"}
+            - { name: PHOTOPRISM_TRACE, value: "true" }
             - { name: PHOTOPRISM_SITE_URL, value: "https://bigasterisk.com/photoprism/" }
             - { name: PHOTOPRISM_AUTH_MODE, value: "public" }
             - { name: PHOTOPRISM_WORKERS, value: "2" }
-   
+
             - { name: PHOTOPRISM_DISABLE_CHOWN, value: "true" }
             - { name: PHOTOPRISM_DISABLE_WEBDAV, value: "true" }
             - { name: PHOTOPRISM_DISABLE_CLASSIFICATION, value: "true" }
             - { name: PHOTOPRISM_DISABLE_RAW, value: "true" }
             - { name: PHOTOPRISM_JPEG_SIZE, value: "720" }
             - { name: PHOTOPRISM_THUMB_SIZE, value: "720" }
-   
+
             - { name: PHOTOPRISM_DATABASE_DRIVER, value: "mysql" }
             - { name: PHOTOPRISM_DATABASE_SERVER, value: "/run/mysqld/mysqld.sock" }
             - { name: PHOTOPRISM_DATABASE_NAME, value: "photoprism" }
@@ -110,7 +110,7 @@
           image: docker.io/mariadb:10.10.3
           securityContext:
             runAsUser: 1000
-            # let https://github.com/MariaDB/mariadb-docker/blob/749c720c63306d1572849afc6ab1cfa02fd08338/10.8/docker-entrypoint.sh 
+            # let https://github.com/MariaDB/mariadb-docker/blob/749c720c63306d1572849afc6ab1cfa02fd08338/10.8/docker-entrypoint.sh
             # do the startup. We could write to /etc/mysql/mariadb.conf.d if we really needed to config things.
           # command: suggested from photoprism docs
           #   - mysqld
@@ -129,8 +129,8 @@
             - { name: photoprism-storage, subPath: "mariadb", mountPath: "/var/lib/mysql" }
             - { name: run-mysqld, mountPath: "/run/mysqld" }
           env:
-          # https://hub.docker.com/_/mariadb/#:~:text=latest%20%2D%2Dverbose%20%2D%2Dhelp-,Environment%20Variables,-When%20you%20start
-          # says these only matter upon the first run.
+            # https://hub.docker.com/_/mariadb/#:~:text=latest%20%2D%2Dverbose%20%2D%2Dhelp-,Environment%20Variables,-When%20you%20start
+            # says these only matter upon the first run.
             - { name: MARIADB_AUTO_UPGRADE, value: "1" }
             - { name: MARIADB_INITDB_SKIP_TZINFO, value: "1" }
             - { name: MARIADB_DATABASE, value: "photoprism" }
@@ -139,38 +139,38 @@
             - { name: MARIADB_ROOT_PASSWORD, value: "insecure" }
         - name: mariadb-exporter
           # for this to work, run this once:
-          # 
+          #
           # k exec -it deploy/photoprism mariadb -- mysql --user=root --password=insecure
-          # 
+          #
           # CREATE USER 'exporter'@'localhost' IDENTIFIED BY 'XXXXXXXX';
           # GRANT PROCESS, REPLICATION CLIENT ON *.* TO 'exporter'@'localhost';
           # GRANT SELECT ON performance_schema.* TO 'exporter'@'localhost';
           # GRANT ALL ON photoprism.* TO 'exporter'@'localhost';
           image: prom/mysqld-exporter:v0.14.0
           args:
-           # see: k exec -it deploy/photoprism -c mariadb-exporter -- /bin/mysqld_exporter --help
-           - "--collect.info_schema.tables.databases=photoprism"
-           - "--collect.info_schema.tables"
-           - "--no-collect.slave_status"
-           - "--collect.info_schema.processlist"
-           - "--no-collect.info_schema.query_response_time"
-           - "--collect.perf_schema.tablelocks"
-           - "--collect.perf_schema.eventsstatements"
-           - "--collect.perf_schema.eventswaits"
-           - "--collect.perf_schema.tableiowaits"
-           - "--collect.perf_schema.indexiowaits"
-           - "--collect.perf_schema.file_events"
-           - "--collect.perf_schema.file_instances"
-           - "--collect.perf_schema.memory_events"
-           # need to turn on 'userstat' in mysql or something for these
-           #- "--collect.info_schema.tablestats"
-           #- "--collect.info_schema.schemastats"
-           - "--log.level=info"
+            # see: k exec -it deploy/photoprism -c mariadb-exporter -- /bin/mysqld_exporter --help
+            - "--collect.info_schema.tables.databases=photoprism"
+            - "--collect.info_schema.tables"
+            - "--no-collect.slave_status"
+            - "--collect.info_schema.processlist"
+            - "--no-collect.info_schema.query_response_time"
+            - "--collect.perf_schema.tablelocks"
+            - "--collect.perf_schema.eventsstatements"
+            - "--collect.perf_schema.eventswaits"
+            - "--collect.perf_schema.tableiowaits"
+            - "--collect.perf_schema.indexiowaits"
+            - "--collect.perf_schema.file_events"
+            - "--collect.perf_schema.file_instances"
+            - "--collect.perf_schema.memory_events"
+            # need to turn on 'userstat' in mysql or something for these
+            #- "--collect.info_schema.tablestats"
+            #- "--collect.info_schema.schemastats"
+            - "--log.level=info"
           ports:
-          - containerPort: 9104
+            - containerPort: 9104
           env:
-          - name: DATA_SOURCE_NAME
-            value: "exporter:XXXXXXXX@unix(/run/mysqld/mysqld.sock)/"
+            - name: DATA_SOURCE_NAME
+              value: "exporter:XXXXXXXX@unix(/run/mysqld/mysqld.sock)/"
           volumeMounts:
             - { name: run-mysqld, mountPath: "/run/mysqld" }
       affinity:
--- a/roles.yaml	Sun Mar 19 17:14:41 2023 -0700
+++ b/roles.yaml	Sun Mar 19 17:18:17 2023 -0700
@@ -3,20 +3,20 @@
 metadata:
   name: photoprism
 rules:
-- apiGroups:
-  - apps
-  resources:
-  - deployments
-  verbs: ["get", "list", "watch"]
-- apiGroups:
-  - ""
-  resources:
-  - pods
-  # for the exec in the cronjob
-  - pods/exec
-  verbs: ["*"]
-- nonResourceURLs: ["/metrics"]
-  verbs: ["get"]
+  - apiGroups:
+      - apps
+    resources:
+      - deployments
+    verbs: ["get", "list", "watch"]
+  - apiGroups:
+      - ""
+    resources:
+      - pods
+      # for the exec in the cronjob
+      - pods/exec
+    verbs: ["*"]
+  - nonResourceURLs: ["/metrics"]
+    verbs: ["get"]
 ---
 apiVersion: v1
 kind: ServiceAccount
@@ -32,9 +32,9 @@
   kind: ClusterRole
   name: photoprism
 subjects:
-- kind: ServiceAccount
-  name: photoprism
-  namespace: default
-- kind: ServiceAccount
-  name: default
-  namespace: default
\ No newline at end of file
+  - kind: ServiceAccount
+    name: photoprism
+    namespace: default
+  - kind: ServiceAccount
+    name: default
+    namespace: default
--- a/skaffold.yaml	Sun Mar 19 17:14:41 2023 -0700
+++ b/skaffold.yaml	Sun Mar 19 17:18:17 2023 -0700
@@ -4,14 +4,14 @@
   name: photoprism
 manifests:
   rawYaml:
-  - roles.yaml
-  - deploy.yaml
-  - ingress.yaml
-  - update_job.yaml
+    - roles.yaml
+    - deploy.yaml
+    - ingress.yaml
+    - update_job.yaml
 deploy:
   kubectl: {}
 
 build:
   artifacts:
     - image: bang5:5000/photoprism_update
-      context: update/
\ No newline at end of file
+      context: update/
--- a/update_job.yaml	Sun Mar 19 17:14:41 2023 -0700
+++ b/update_job.yaml	Sun Mar 19 17:18:17 2023 -0700
@@ -15,13 +15,13 @@
           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 }
-              
+            - 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 }
+
           affinity:
             nodeAffinity:
               requiredDuringSchedulingIgnoredDuringExecution:
@@ -29,6 +29,6 @@
                   - matchExpressions:
                       - key: "kubernetes.io/hostname"
                         operator: In
-                        values: ["ditto"]  # anything with nfs, but bang is fastest right now  
+                        values: ["ditto"] # anything with nfs, but bang is fastest right now
           restartPolicy: Never
       backoffLimit: 1