diff --git a/charts/incubator/photoview/Chart.yaml b/charts/incubator/photoview/Chart.yaml index 0c47af3bbfd..a1ffb9921cd 100644 --- a/charts/incubator/photoview/Chart.yaml +++ b/charts/incubator/photoview/Chart.yaml @@ -3,11 +3,7 @@ appVersion: "2.3.13" dependencies: - name: common repository: https://library-charts.truecharts.org - version: 11.1.2 - - condition: postgresql.enabled - name: postgresql - repository: https://deps.truecharts.org/ - version: 11.0.31 + version: 12.14.6 description: Photoview is a simple and user-friendly photo gallery. home: https://truecharts.org/charts/incubator/photoview icon: https://truecharts.org/img/hotlink-ok/chart-icons/photoview.png @@ -23,7 +19,7 @@ name: photoview sources: - https://github.com/truecharts/charts/tree/master/charts/incubator/photoview - https://github.com/photoview/photoview -version: 8.0.0 +version: 9.0.0 annotations: truecharts.org/catagories: | - media diff --git a/charts/incubator/photoview/docs/installation_notes.md b/charts/incubator/photoview/docs/installation_notes.md index 00ff131e580..e0c23938eda 100644 --- a/charts/incubator/photoview/docs/installation_notes.md +++ b/charts/incubator/photoview/docs/installation_notes.md @@ -7,7 +7,6 @@ Under `Security and Permissions` - Check `Show Advanced Security Settings` - Uncheck `ReadOnly Root Filesystem` - - Uncheck `runAsNonRoot` Under `Pod Security Context` diff --git a/charts/incubator/photoview/questions.yaml b/charts/incubator/photoview/questions.yaml index ea8ca1d83ab..060a193e867 100644 --- a/charts/incubator/photoview/questions.yaml +++ b/charts/incubator/photoview/questions.yaml @@ -11,8 +11,6 @@ questions: # Include{podSpec} # Include{containerMain} - - # Docker specific env - variable: env group: "App Configuration" label: "Image Environment" @@ -26,6 +24,7 @@ questions: schema: type: string default: "" + private: true - variable: PHOTOVIEW_DISABLE_FACE_RECOGNITION label: "Disable Face Recognition" description: "Completely disable face recognition and hide the icon from the side menu." @@ -44,18 +43,21 @@ questions: schema: type: boolean default: false + - variable: PHOTOVIEW_LISTEN_IP + label: PhotoView Listen IP + schema: + type: string + required: true + $ref: + - definitions/nodeIP + # Include{containerBasic} # Include{containerAdvanced} + # Include{containerConfig} # Include{podOptions} # Include{serviceRoot} - - variable: main - label: "Main Service" - description: "The Primary service on which the healthcheck runs, often the webUI" - schema: - additional_attrs: true - type: dict - attrs: +# Include{serviceMain} # Include{serviceSelectorLoadBalancer} # Include{serviceSelectorExtras} - variable: main @@ -75,8 +77,16 @@ questions: # Include{serviceExpert} # Include{serviceList} # Include{persistenceRoot} + - variable: cache + label: "App Cache Storage" + description: "Stores the Application Cache." + schema: + additional_attrs: true + type: dict + attrs: +# Include{persistenceBasic} - variable: photos - label: "Photos Storage" + label: "App Photos Storage" description: "Stores the Application Photos." schema: additional_attrs: true diff --git a/charts/incubator/photoview/templates/NOTES.txt b/charts/incubator/photoview/templates/NOTES.txt new file mode 100644 index 00000000000..efcb74cb772 --- /dev/null +++ b/charts/incubator/photoview/templates/NOTES.txt @@ -0,0 +1 @@ +{{- include "tc.v1.common.lib.chart.notes" $ -}} diff --git a/charts/incubator/photoview/templates/_secrets.tpl b/charts/incubator/photoview/templates/_secrets.tpl new file mode 100644 index 00000000000..85d0784fcf7 --- /dev/null +++ b/charts/incubator/photoview/templates/_secrets.tpl @@ -0,0 +1,6 @@ +{{/* Define the secrets */}} +{{- define "photoview.secrets" -}} +enabled: true +data: + PHOTOVIEW_POSTGRES_URL: {{ (printf "%s?client_encoding=utf8" (.Values.cnpg.main.creds.std | trimAll "\"")) | quote }} +{{- end -}} diff --git a/charts/incubator/photoview/templates/common.yaml b/charts/incubator/photoview/templates/common.yaml index c1a366e1cf0..aa1c92cea2f 100644 --- a/charts/incubator/photoview/templates/common.yaml +++ b/charts/incubator/photoview/templates/common.yaml @@ -1 +1,11 @@ -{{ include "tc.common.loader.all" . }} +{{/* Make sure all variables are set properly */}} +{{- include "tc.v1.common.loader.init" . }} + +{{/* Render secrets for photoview */}} +{{- $secrets := include "photoview.secrets" . | fromYaml -}} +{{- if $secrets -}} + {{- $_ := set .Values.secret "secrets" $secrets -}} +{{- end -}} + +{{/* Render the templates */}} +{{ include "tc.v1.common.loader.apply" . }} diff --git a/charts/incubator/photoview/values.yaml b/charts/incubator/photoview/values.yaml index 907317c6df1..b3baa711ff7 100644 --- a/charts/incubator/photoview/values.yaml +++ b/charts/incubator/photoview/values.yaml @@ -3,25 +3,30 @@ image: tag: 2.3.13@sha256:2df4e8e7a7f9b15e7d4af8d3b85d20c37434cb8503f04f48c50d30f1982a757b pullPolicy: IfNotPresent -env: - PHOTOVIEW_DATABASE_DRIVER: "postgres" - PHOTOVIEW_LISTEN_PORT: "{{ .Values.service.main.ports.main.targetPort }}" - PHOTOVIEW_MEDIA_CACHE: "/cache" - MAPBOX_TOKEN: "" - PHOTOVIEW_DISABLE_FACE_RECOGNITION: false - PHOTOVIEW_DISABLE_VIDEO_ENCODING: false - PHOTOVIEW_DISABLE_RAW_PROCESSING: false - PHOTOVIEW_POSTGRES_URL: - secretKeyRef: - name: dbcreds - key: url - service: main: ports: main: port: 10159 - targetPort: 10159 + +workload: + main: + podSpec: + containers: + main: + env: + PHOTOVIEW_LISTEN_PORT: "{{ .Values.service.main.ports.main.port }}" + PHOTOVIEW_LISTEN_IP: "127.0.0.1" + PHOTOVIEW_DATABASE_DRIVER: "postgres" + PHOTOVIEW_MEDIA_CACHE: "/cache" + MAPBOX_TOKEN: "" + PHOTOVIEW_DISABLE_FACE_RECOGNITION: false + PHOTOVIEW_DISABLE_VIDEO_ENCODING: false + PHOTOVIEW_DISABLE_RAW_PROCESSING: false + PHOTOVIEW_POSTGRES_URL: + secretKeyRef: + name: secrets + key: PHOTOVIEW_POSTGRES_URL persistence: # Don't use emptyDir, it stores, thumbnails and optimized media @@ -32,11 +37,12 @@ persistence: enabled: true mountPath: "/photos" -postgresql: - enabled: true - existingSecret: "dbcreds" - postgresqlUsername: photoview - postgresqlDatabase: photoview +cnpg: + main: + enabled: true + user: photoview + database: photoview portal: - enabled: true + open: + enabled: true