diff --git a/charts/immich/templates/immich-config.yml b/charts/immich/templates/immich-config.yml index 50eb981a..00bf4831 100644 --- a/charts/immich/templates/immich-config.yml +++ b/charts/immich/templates/immich-config.yml @@ -1,4 +1,7 @@ -{{- if .Values.immich.configuration }} +{{- if and .Values.immich.configuration .Values.immich.existingConfiguration }} +{{- fail "immich.configuration and immich.existingConfiguration are mutually exclusive." }} +{{- end }} +{{- if and .Values.immich.configuration (not .Values.immich.existingConfiguration) }} apiVersion: v1 kind: {{ .Values.immich.configurationKind }} metadata: diff --git a/charts/immich/templates/server.yaml b/charts/immich/templates/server.yaml index b50c9737..be7427c1 100644 --- a/charts/immich/templates/server.yaml +++ b/charts/immich/templates/server.yaml @@ -18,7 +18,7 @@ controllers: {{ if .Values.immich.metrics.enabled }} IMMICH_TELEMETRY_INCLUDE: all {{ end }} - {{- if .Values.immich.configuration }} + {{- if or .Values.immich.configuration .Values.immich.existingConfiguration }} IMMICH_CONFIG_FILE: /config/immich-config.yaml {{- end }} ports: @@ -93,7 +93,7 @@ serviceMonitor: scheme: http persistence: -{{- if .Values.immich.configuration }} +{{- if or .Values.immich.configuration .Values.immich.existingConfiguration }} config: enabled: true {{- if eq .Values.immich.configurationKind "Secret" }} @@ -101,7 +101,11 @@ persistence: {{- else }} type: configMap {{- end }} + {{- if .Values.immich.existingConfiguration }} + name: {{ .Values.immich.existingConfiguration }} + {{- else }} name: {{ .Release.Name }}-immich-config + {{- end }} {{- end }} data: enabled: true diff --git a/charts/immich/values.yaml b/charts/immich/values.yaml index f4b3801d..883e8ec8 100644 --- a/charts/immich/values.yaml +++ b/charts/immich/values.yaml @@ -25,7 +25,7 @@ immich: # Automatically creating the library volume is not supported by this chart # You have to specify an existing PVC to use existingClaim: - # configuration is immich-config.json converted to yaml + # configuration is immich-config.json converted to yaml. Ignored if existingConfiguration is set. # ref: https://immich.app/docs/install/config-file/ # configuration: {} @@ -38,6 +38,9 @@ immich: # Sets the resource Kind to store configuration in. Must be either ConfigMap or Secret. configurationKind: ConfigMap + # Specify existing configuration resource name here to skip creation of a new one + # existingConfiguration: + # Dependencies valkey: