diff --git a/library/ix-dev/charts/photoprism/Chart.yaml b/library/ix-dev/charts/photoprism/Chart.yaml index f057d3f3db..9f61b26de2 100644 --- a/library/ix-dev/charts/photoprism/Chart.yaml +++ b/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: 1.0.32 +version: 1.1.0 apiVersion: v2 appVersion: '231021' kubeVersion: '>=1.16.0-0' diff --git a/library/ix-dev/charts/photoprism/questions.yaml b/library/ix-dev/charts/photoprism/questions.yaml index bc6791bd3d..f114d8979f 100644 --- a/library/ix-dev/charts/photoprism/questions.yaml +++ b/library/ix-dev/charts/photoprism/questions.yaml @@ -23,6 +23,15 @@ portals: 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.
+ schema: + type: boolean + default: false + - variable: web_port label: "Web Port for photo prism" group: Networking diff --git a/library/ix-dev/charts/photoprism/templates/deployment.yaml b/library/ix-dev/charts/photoprism/templates/deployment.yaml index 12397ef152..6441acd0ff 100644 --- a/library/ix-dev/charts/photoprism/templates/deployment.yaml +++ b/library/ix-dev/charts/photoprism/templates/deployment.yaml @@ -27,7 +27,7 @@ spec: {{- include "common.labels.selectorLabels" . | nindent 8 }} annotations: {{ include "common.annotations" . | nindent 8 }} spec: - hostNetwork: false + hostNetwork: {{ .Values.host_network }} {{- if hasKey .Values "global" }} {{- if hasKey .Values.global "ixChartContext" }} {{- if .Values.global.ixChartContext.addNvidiaRuntimeClass }} @@ -46,11 +46,11 @@ spec: {{ end }} ports: - name: web - containerPort: 2342 + containerPort: {{ .Values.web_port }} readinessProbe: httpGet: path: / - port: 2342 + port: {{ .Values.web_port }} initialDelaySeconds: 10 periodSeconds: 10 timeoutSeconds: 5 @@ -59,7 +59,7 @@ spec: livenessProbe: httpGet: path: / - port: 2342 + port: {{ .Values.web_port }} initialDelaySeconds: 10 periodSeconds: 10 timeoutSeconds: 5 @@ -68,7 +68,7 @@ spec: startupProbe: httpGet: path: / - port: 2342 + port: {{ .Values.web_port }} initialDelaySeconds: 10 periodSeconds: 5 timeoutSeconds: 2 @@ -77,6 +77,7 @@ spec: 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") }} diff --git a/library/ix-dev/charts/photoprism/templates/service.yaml b/library/ix-dev/charts/photoprism/templates/service.yaml index 6f9eafad6d..bec4be3b99 100644 --- a/library/ix-dev/charts/photoprism/templates/service.yaml +++ b/library/ix-dev/charts/photoprism/templates/service.yaml @@ -2,7 +2,7 @@ {{ $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" 2342) }} +{{ $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 }}