Ver código fonte

Photoprism - typo in to_keep_versions (#2188)

* re-adds photoprism 1.1.3

* photoprism - typo
Stavros Kois 1 ano atrás
pai
commit
1077876d43

+ 2 - 0
charts/photoprism/1.1.3/.helmignore

@@ -0,0 +1,2 @@
+# Patterns to ignore when building packages.
+*.png

+ 6 - 0
charts/photoprism/1.1.3/Chart.lock

@@ -0,0 +1,6 @@
+dependencies:
+- name: common
+  repository: file://../../../common/2304.0.1
+  version: 2304.0.1
+digest: sha256:1ed155c6760e1166e2cb75b52bc5e81c6bdf0252c16ff5ede001157077c41670
+generated: "2023-04-24T13:40:53.604174144+03:00"

+ 24 - 0
charts/photoprism/1.1.3/Chart.yaml

@@ -0,0 +1,24 @@
+name: photoprism
+description: AI-powered app for browsing, organizing & sharing your photo collection.
+annotations:
+  title: PhotoPrism
+type: application
+version: 1.1.3
+apiVersion: v2
+appVersion: '231128'
+kubeVersion: '>=1.16.0-0'
+maintainers:
+  - name: truenas
+    url: https://www.truenas.com/
+    email: dev@ixsystems.com
+dependencies:
+  - name: common
+    repository: file://../../../common/2304.0.1
+    version: 2304.0.1
+home: https://photoprism.app/
+icon: https://media.sys.truenas.net/apps/photoprism/icons/icon.svg
+sources:
+  - https://photoprism.app/
+  - https://github.com/truenas/charts/tree/master/charts/photoprism
+keywords:
+  - media

+ 3 - 0
charts/photoprism/1.1.3/README.md

@@ -0,0 +1,3 @@
+# Photo Prism
+
+PhotoPrism is a server-based application for browsing, organizing and sharing your personal photo collection.

+ 3 - 0
charts/photoprism/1.1.3/app-readme.md

@@ -0,0 +1,3 @@
+# Photo Prism
+
+PhotoPrism is a server-based application for browsing, organizing and sharing your personal photo collection.

BIN
charts/photoprism/1.1.3/charts/common-2304.0.1.tgz


+ 21 - 0
charts/photoprism/1.1.3/ci/test-values.yaml

@@ -0,0 +1,21 @@
+appVolumeMounts:
+  import:
+    emptyDir: true
+    mountPath: /photoprism/import
+  original:
+    emptyDir: true
+    mountPath: /photoprism/originals
+  storage:
+    emptyDir: true
+    mountPath: /photoprism/storage
+dnsConfig:
+  options: []
+emptyDirVolumes: true
+environmentVariables: []
+extraAppVolumeMounts: []
+ownerGID: 568
+ownerUID: 568
+password: admin123
+public: false
+web_port: 32000
+global: {}

+ 4 - 0
charts/photoprism/1.1.3/ix_values.yaml

@@ -0,0 +1,4 @@
+image:
+  pullPolicy: IfNotPresent
+  repository: photoprism/photoprism
+  tag: '231128'

+ 36 - 0
charts/photoprism/1.1.3/metadata.yaml

@@ -0,0 +1,36 @@
+runAsContext:
+  - userName: root
+    groupName: root
+    gid: 0
+    uid: 0
+    description: Photoprism runs as root user.
+capabilities:
+  - name: CHOWN
+    description: Photoprism is able to chown files.
+  - name: FOWNER
+    description: Photoprism is able to bypass permission checks for it's sub-processes.
+  - name: SYS_CHROOT
+    description: Photoprism is able to use chroot.
+  - name: MKNOD
+    description: Photoprism is able to create device nodes.
+  - name: DAC_OVERRIDE
+    description: Photoprism is able to bypass permission checks.
+  - name: FSETID
+    description: Photoprism is able to set file capabilities.
+  - name: KILL
+    description: Photoprism is able to kill processes.
+  - name: SETGID
+    description: Photoprism is able to set group ID for it's sub-processes.
+  - name: SETUID
+    description: Photoprism is able to set user ID for it's sub-processes.
+  - name: SETPCAP
+    description: Photoprism is able to set process capabilities.
+  - name: NET_BIND_SERVICE
+    description: Photoprism is able to bind to privileged ports.
+  - name: SETFCAP
+    description: Photoprism is able to set file capabilities.
+  - name: NET_RAW
+    description: Photoprism is able to use raw sockets.
+  - name: AUDIT_WRITE
+    description: Photoprism is able to write to audit log.
+hostMounts: []

+ 315 - 0
charts/photoprism/1.1.3/questions.yaml

@@ -0,0 +1,315 @@
+groups:
+  - name: "Configuration"
+    description: "Photo Prism application configuration"
+  - name: "Storage"
+    description: "Configure storage for photo prism"
+  - name: "Networking"
+    description: "Networking Configuration for photo prism"
+  - name: "Advanced DNS Settings"
+    description: "Configure DNS settings"
+  - name: "Resource Reservation"
+    description: "Specify resources to be allocated to workload"
+  - name: "Resource Limits"
+    description: "Set CPU/memory limits for Kubernetes Pod"
+
+portals:
+  web_portal:
+    protocols:
+      - "http"
+    host:
+      - "$node_ip"
+    ports:
+      - "$variable-web_port"
+    path: "/"
+
+questions:
+  - variable: host_network
+    group: Networking
+    label: Host Network
+    description: |
+      Bind to the host network. It's recommended to keep this disabled but may be needed for photoprism to be reachable from a hostNetworked VPN.</br>
+    schema:
+      type: boolean
+      default: false
+
+  - variable: web_port
+    label: "Web Port for photo prism"
+    group: Networking
+    schema:
+      type: int
+      min: 8000
+      max: 65535
+      default: 20800
+      required: true
+
+  - variable: dnsConfig
+    label: "DNS Configuration"
+    group: "Advanced DNS Settings"
+    schema:
+      type: dict
+      attrs:
+        - variable: options
+          label: "DNS Options"
+          schema:
+            type: list
+            items:
+              - variable: optionsEntry
+                label: "Option Entry Configuration"
+                schema:
+                  type: dict
+                  attrs:
+                    - variable: name
+                      label: "Option Name"
+                      schema:
+                        type: string
+                        required: true
+                    - variable: value
+                      label: "Option Value"
+                      schema:
+                        type: string
+                        required: true
+
+  - variable: ownerUID
+    label: "Storage User ID"
+    description: "User ID of the storage volume being used (application will chown the storage volume path with specified UID)"
+    group: Configuration
+    schema:
+      type: int
+      default: 568
+      min: 1
+      max: 65535
+
+  - variable: ownerGID
+    label: "Storage Group ID"
+    description: "Group ID of the storage volume being used (application will chown the storage volume path with specified GID)"
+    group: Configuration
+    schema:
+      type: int
+      default: 568
+      min: 1
+      max: 65535
+
+  - variable: password
+    label: "Password"
+    group: "Configuration"
+    schema:
+      type: string
+      private: true
+      required: true
+      empty: false
+      immutable: true
+      default: "admin123"
+      show_if: [["public", "=", false]]
+
+  - variable: public
+    label: "Enable Public Access"
+    description: "Disable password authentication, WebDAV, and the advanced settings page"
+    group: "Configuration"
+    schema:
+      type: boolean
+      default: false
+
+  - variable: environmentVariables
+    label: "Photo Prism environment"
+    group: "Configuration"
+    schema:
+      type: list
+      default: []
+      items:
+        - variable: environmentVariable
+          label: "Environment Variable"
+          schema:
+            type: dict
+            attrs:
+              - variable: name
+                label: "Name"
+                schema:
+                  type: string
+              - variable: value
+                label: "Value"
+                schema:
+                  type: string
+
+  - variable: appVolumeMounts
+    label: "Photo Prism Storage"
+    group: "Storage"
+    schema:
+      type: dict
+      attrs:
+        - variable: original
+          label: "Storage Volume for Original Media"
+          schema:
+            type: dict
+            attrs:
+              - variable: datasetName
+                label: "Original Storage Volume Dataset Name"
+                schema:
+                  type: string
+                  hidden: true
+                  $ref:
+                    - "normalize/ixVolume"
+                  show_if: [["hostPathEnabled", "=", false]]
+                  default: "ix-photoprism_original"
+                  editable: false
+              - variable: mountPath
+                label: "Original Storage Mount Path"
+                description: "Path where the volume will be mounted inside the pod"
+                schema:
+                  type: path
+                  hidden: true
+                  editable: true
+                  default: "/photoprism/originals"
+              - variable: readOnly
+                label: "Read Only"
+                description: "Mount volume as read only"
+                schema:
+                  type: boolean
+                  default: false
+              - variable: hostPathEnabled
+                label: "Enable Custom Host Path for Photo Prism Original Storage Volume"
+                schema:
+                  type: boolean
+                  default: false
+                  show_subquestions_if: true
+                  subquestions:
+                    - variable: hostPath
+                      label: "Host Path for Photo Prism Original Storage Volume"
+                      schema:
+                        type: hostpath
+                        required: true
+        - variable: storage
+          label: "Storage Volume for sidecar/cache/database"
+          schema:
+            type: dict
+            attrs:
+              - variable: datasetName
+                label: "Storage Volume Dataset Name"
+                schema:
+                  type: string
+                  hidden: true
+                  $ref:
+                    - "normalize/ixVolume"
+                  show_if: [["hostPathEnabled", "=", false]]
+                  default: "ix-photoprism_storage"
+                  editable: false
+              - variable: mountPath
+                label: "Storage Mount Path"
+                description: "Path where the volume will be mounted inside the pod"
+                schema:
+                  type: path
+                  hidden: true
+                  editable: true
+                  default: "/photoprism/storage"
+              - variable: hostPathEnabled
+                label: "Enable Custom Host Path for Photo Prism Storage Volume"
+                schema:
+                  type: boolean
+                  default: false
+                  show_subquestions_if: true
+                  subquestions:
+                    - variable: hostPath
+                      label: "Host Path for Photo Prism Storage Volume"
+                      schema:
+                        type: hostpath
+                        required: true
+        - variable: import
+          label: "Storage Volume for imports"
+          schema:
+            type: dict
+            attrs:
+              - variable: datasetName
+                label: "Import Storage Volume Dataset Name"
+                schema:
+                  type: string
+                  hidden: true
+                  $ref:
+                    - "normalize/ixVolume"
+                  show_if: [["hostPathEnabled", "=", false]]
+                  default: "ix-photoprism_import"
+                  editable: false
+              - variable: mountPath
+                label: "Storage Mount Path"
+                description: "Path where the volume will be mounted inside the pod"
+                schema:
+                  type: path
+                  hidden: true
+                  editable: true
+                  default: "/photoprism/import"
+              - variable: hostPathEnabled
+                label: "Enable Custom Host Path for Photo Prism Import Storage Volume"
+                schema:
+                  type: boolean
+                  default: false
+                  show_subquestions_if: true
+                  subquestions:
+                    - variable: hostPath
+                      label: "Host Path for Photo Prism Import Storage Volume"
+                      schema:
+                        type: hostpath
+                        required: true
+
+  - variable: extraAppVolumeMounts
+    label: "Extra Host Path Volumes"
+    group: "Storage"
+    schema:
+      type: list
+      items:
+        - variable: extraAppVolume
+          label: "Host Path Volume"
+          description: "Add an extra host path volume for Photo Prism application"
+          schema:
+            type: dict
+            attrs:
+              - variable: mountPath
+                label: "Mount Path in Pod"
+                description: "Path where the volume will be mounted inside the pod"
+                schema:
+                  type: path
+                  required: true
+              - variable: readOnly
+                label: "Read Only"
+                description: "Mount volume as read only"
+                schema:
+                  type: boolean
+                  default: false
+              - variable: hostPath
+                label: "Host Path"
+                description: "Host path"
+                schema:
+                  type: hostpath
+                  required: true
+
+  # Specify GPU configuration
+  - variable: gpuConfiguration
+    label: "GPU Configuration"
+    group: "Resource Reservation"
+    schema:
+      type: dict
+      $ref:
+        - "definitions/gpuConfiguration"
+      attrs: []
+
+  - variable: enableResourceLimits
+    label: "Enable Pod resource limits"
+    group: "Resource Limits"
+    schema:
+      type: boolean
+      default: false
+  - variable: cpuLimit
+    label: "CPU Limit"
+    description: "CPU resource limit allow  plain integer values with suffix m(milli) e.g 1000m, 100."
+    group: "Resource Limits"
+    schema:
+      type: string
+      show_if: [["enableResourceLimits", "=", true]]
+      valid_chars: "^\\d+(?:\\.\\d+(?!.*m$)|m?$)"
+      default: "4000m"
+  - variable: memLimit
+    label: "Memory Limit"
+    group: "Resource Limits"
+    description: "Memory limits is specified by number of bytes. Followed by quantity suffix like E,P,T,G,M,k and Ei,Pi,Ti,Mi,Gi,Ki can also be used. e.g 129e6, 129M,  128974848000m, 123Mi"
+    schema:
+      type: string
+      show_if: [["enableResourceLimits", "=", true]]
+      valid_chars: "^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$"
+      default: "8Gi"

+ 93 - 0
charts/photoprism/1.1.3/templates/deployment.yaml

@@ -0,0 +1,93 @@
+{{ include "common.storage.hostPathValidate" .Values }}
+apiVersion: {{ template "common.capabilities.deployment.apiVersion" . }}
+kind: Deployment
+metadata:
+  name: {{ template "common.names.fullname" . }}-photoprism
+  labels:
+    app: {{ template "common.names.name" . }}
+    chart: {{ template "common.names.chart" . }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+  annotations:
+    rollme: {{ randAlphaNum 5 | quote }}
+spec:
+  replicas: {{ (default 1 .Values.replicas) }}
+  strategy:
+    type: "Recreate"
+  selector:
+    matchLabels:
+      app: {{ template "common.names.name" . }}
+      release: {{ .Release.Name }}
+  template:
+    metadata:
+      name: {{ template "common.names.fullname" . }}
+      labels:
+        app: {{ template "common.names.name" . }}
+        release: {{ .Release.Name }}
+        {{- include "common.labels.selectorLabels" . | nindent 8 }}
+      annotations: {{ include "common.annotations" . | nindent 8 }}
+    spec:
+      hostNetwork: {{ .Values.host_network }}
+      {{- if hasKey .Values "global" }}
+        {{- if hasKey .Values.global "ixChartContext" }}
+          {{- if .Values.global.ixChartContext.addNvidiaRuntimeClass }}
+      runtimeClassName: {{ .Values.global.ixChartContext.nvidiaRuntimeClassName }}
+          {{- end }}
+        {{- end }}
+      {{- end }}
+      containers:
+        - name: {{ .Chart.Name }}
+          {{ include "common.resources.limitation" . | nindent 10 }}
+          {{ include "common.containers.imageConfig" .Values.image | nindent 10 }}
+          volumeMounts: {{ include "common.storage.configureAppVolumeMountsInContainer" .Values | nindent 12 }}
+          {{ range $index, $hostPathConfiguration := .Values.extraAppVolumeMounts }}
+            - name: extrappvolume-{{ $index }}
+              mountPath: {{ $hostPathConfiguration.mountPath }}
+              readOnly: {{ $hostPathConfiguration.readOnly | default false }}
+          {{ end }}
+          ports:
+            - name: web
+              containerPort: {{ .Values.web_port }}
+          readinessProbe:
+            httpGet:
+              path: /
+              port: {{ .Values.web_port }}
+            initialDelaySeconds: 10
+            periodSeconds: 10
+            timeoutSeconds: 5
+            failureThreshold: 5
+            successThreshold: 2
+          livenessProbe:
+            httpGet:
+              path: /
+              port: {{ .Values.web_port }}
+            initialDelaySeconds: 10
+            periodSeconds: 10
+            timeoutSeconds: 5
+            failureThreshold: 5
+            successThreshold: 1
+          startupProbe:
+            httpGet:
+              path: /
+              port: {{ .Values.web_port }}
+            initialDelaySeconds: 10
+            periodSeconds: 5
+            timeoutSeconds: 2
+            failureThreshold: 60
+            successThreshold: 1
+          env:
+            {{ $secretName := (include "common.names.fullname" .) }}
+            {{ $envList := (default list .Values.environmentVariables) }}
+            {{ $envList = mustAppend $envList (dict "name" "PHOTOPRISM_HTTP_PORT" "value" .Values.web_port) }}
+            {{ $envList = mustAppend $envList (dict "name" "PHOTOPRISM_ADMIN_PASSWORD" "valueFromSecret" true "secretName" $secretName "secretKey" "password") }}
+            {{ if .Values.public }}
+            {{ $envList = mustAppend $envList (dict "name" "PHOTOPRISM_PUBLIC" "value" "true") }}
+            {{ end }}
+            {{ include "common.containers.environmentVariables" (dict "environmentVariables" $envList) | nindent 12 }}
+{{ include "common.networking.dnsConfiguration" .Values | nindent 6 }}
+      volumes: {{ include "common.storage.configureAppVolumes" .Values | nindent 8 }}
+      {{ range $index, $hostPathConfiguration := .Values.extraAppVolumeMounts }}
+        - name: extrappvolume-{{ $index }}
+          hostPath:
+            path: {{ $hostPathConfiguration.hostPath }}
+      {{ end }}

+ 34 - 0
charts/photoprism/1.1.3/templates/pre-install-job.yaml

@@ -0,0 +1,34 @@
+apiVersion: batch/v1
+kind: Job
+metadata:
+  name: "{{ template "common.names.fullname" . }}-preinstall-job"
+  labels:
+    app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
+    app.kubernetes.io/instance: {{ .Release.Name | quote }}
+    app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
+    helm.sh/chart: {{ template "common.names.chart" . }}
+  annotations:
+    "helm.sh/hook": pre-install
+    "helm.sh/hook-delete-policy": hook-succeeded
+spec:
+  template:
+    metadata:
+      name: "{{ template "common.names.fullname" . }}-preinstall-hook"
+      labels:
+        app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
+        app.kubernetes.io/instance: {{ .Release.Name | quote }}
+        helm.sh/chart: {{ template "common.names.chart" . }}
+    spec:
+      restartPolicy: Never
+      containers:
+      - name: pre-install-job
+        image: "alpine:latest"
+        command:
+          - "chown"
+          - "-R"
+          - "{{ .Values.ownerUID }}:{{ .Values.ownerGID }}"
+          - "{{ .Values.appVolumeMounts.storage.mountPath }}"
+          - "{{ .Values.appVolumeMounts.original.mountPath }}"
+          - "{{ .Values.appVolumeMounts.import.mountPath }}"
+        volumeMounts: {{ include "common.storage.configureAppVolumeMountsInContainer" .Values | nindent 12 }}
+      volumes: {{ include "common.storage.configureAppVolumes" .Values | nindent 8 }}

+ 8 - 0
charts/photoprism/1.1.3/templates/secret.yaml

@@ -0,0 +1,8 @@
+apiVersion: v1
+kind: Secret
+metadata:
+  name: {{ template "common.names.fullname" . }}
+  labels: {{ include "common.labels" . | nindent 4 }}
+type: Opaque
+data:
+  password: {{ .Values.password | b64enc | quote }}

+ 9 - 0
charts/photoprism/1.1.3/templates/service.yaml

@@ -0,0 +1,9 @@
+{{ $selectors := list }}
+{{ $selectors = mustAppend $selectors (dict "key" "app" "value" (include "common.names.name" .) ) }}
+{{ $selectors = mustAppend $selectors (dict "key" "release" "value" .Release.Name ) }}
+{{ $ports := list }}
+{{ $ports = mustAppend $ports (dict "name" "web" "port" .Values.web_port "nodePort" .Values.web_port "targetPort" .Values.web_port) }}
+{{ $params := . }}
+{{ $_ := set $params "commonService" (dict "type" "NodePort" "ports" $ports ) }}
+{{ $_1 := set .Values "extraSelectorLabels" $selectors }}
+{{ include "common.classes.service" $params }}

+ 21 - 0
charts/photoprism/1.1.3/templates/tests/deployment-check.yaml

@@ -0,0 +1,21 @@
+{{- $serviceName := (include "common.names.fullname" .) -}}
+apiVersion: v1
+kind: Pod
+metadata:
+  name: {{ .Release.Name }}-photoprism
+  labels:
+    app: {{ .Release.Name }}
+    release: {{ .Release.Name }}
+  annotations:
+    "helm.sh/hook": test
+spec:
+    containers:
+      - name: test-curl
+        image: alpine/curl
+        imagePullPolicy: "IfNotPresent"
+        command:
+          - /bin/sh
+          - -ec
+          - |
+            curl --connect-timeout 5 --max-time 10 --retry 5 --retry-delay 15 --retry-max-time 90 --retry-all-errors -ksf http://{{ $serviceName }}:{{.Values.web_port}}/
+    restartPolicy: Never

+ 1 - 1
library/ix-dev/charts/photoprism/Chart.yaml

@@ -3,7 +3,7 @@ description: AI-powered app for browsing, organizing & sharing your photo collec
 annotations:
   title: PhotoPrism
 type: application
-version: 2.0.1
+version: 2.0.2
 apiVersion: v2
 appVersion: '231128'
 kubeVersion: '>=1.16.0-0'

+ 1 - 1
library/ix-dev/charts/photoprism/to_keep_versions.md

@@ -1,4 +1,4 @@
-# 1.1.13
+# 1.1.3
 
 This version is kept because it contains a fix that is needed for migration to v2.x.x
 It should be safe to remove few months after v2.x.x is released.

+ 1 - 1
library/ix-dev/charts/photoprism/to_keep_versions.yaml

@@ -1 +1 @@
-- 1.1.13
+- 1.1.3