| Giorgi Lekveishvili | 8ef6455 | 2025-07-11 13:45:39 +0400 | [diff] [blame^] | 1 | {{- define "immich.server.hardcodedValues" -}} |
| 2 | global: |
| 3 | nameOverride: server |
| 4 | |
| 5 | env: |
| 6 | {{ if .Values.immich.metrics.enabled }} |
| 7 | IMMICH_TELEMETRY_INCLUDE: all |
| 8 | {{ end }} |
| 9 | {{- if .Values.immich.existingConfiguration }} |
| 10 | IMMICH_CONFIG_FILE: /config/immich-config.json |
| 11 | {{- else if .Values.immich.configuration }} |
| 12 | IMMICH_CONFIG_FILE: /config/immich-config.yaml |
| 13 | {{- end }} |
| 14 | |
| 15 | {{- if .Values.immich.configuration }} |
| 16 | podAnnotations: |
| 17 | checksum/config: {{ .Values.immich.configuration | toYaml | sha256sum }} |
| 18 | {{- end }} |
| 19 | |
| 20 | controller: |
| 21 | strategy: RollingUpdate |
| 22 | |
| 23 | service: |
| 24 | main: |
| 25 | enabled: true |
| 26 | primary: true |
| 27 | type: ClusterIP |
| 28 | ports: |
| 29 | http: |
| 30 | enabled: true |
| 31 | primary: true |
| 32 | port: 2283 |
| 33 | protocol: HTTP |
| 34 | metrics-api: |
| 35 | enabled: {{ .Values.immich.metrics.enabled }} |
| 36 | port: 8081 |
| 37 | protocol: HTTP |
| 38 | metrics-ms: |
| 39 | enabled: {{ .Values.immich.metrics.enabled }} |
| 40 | port: 8082 |
| 41 | protocol: HTTP |
| 42 | |
| 43 | |
| 44 | serviceMonitor: |
| 45 | main: |
| 46 | enabled: {{ .Values.immich.metrics.enabled }} |
| 47 | endpoints: |
| 48 | - port: metrics-api |
| 49 | scheme: http |
| 50 | - port: metrics-ms |
| 51 | scheme: http |
| 52 | |
| 53 | probes: |
| 54 | liveness: &probes |
| 55 | enabled: true |
| 56 | custom: true |
| 57 | spec: |
| 58 | httpGet: |
| 59 | path: /api/server/ping |
| 60 | port: http |
| 61 | initialDelaySeconds: 0 |
| 62 | periodSeconds: 10 |
| 63 | timeoutSeconds: 1 |
| 64 | failureThreshold: 3 |
| 65 | readiness: *probes |
| 66 | startup: |
| 67 | enabled: true |
| 68 | custom: true |
| 69 | spec: |
| 70 | httpGet: |
| 71 | path: /api/server/ping |
| 72 | port: http |
| 73 | initialDelaySeconds: 0 |
| 74 | periodSeconds: 10 |
| 75 | timeoutSeconds: 1 |
| 76 | failureThreshold: 30 |
| 77 | |
| 78 | persistence: |
| 79 | {{- if .Values.immich.existingConfiguration }} |
| 80 | config: |
| 81 | enabled: true |
| 82 | type: configMap |
| 83 | name: {{ .Values.immich.existingConfiguration }} |
| 84 | {{- else if .Values.immich.configuration }} |
| 85 | config: |
| 86 | enabled: true |
| 87 | type: configMap |
| 88 | name: {{ .Release.Name }}-immich-config |
| 89 | {{- end }} |
| 90 | library: |
| 91 | enabled: true |
| 92 | mountPath: /usr/src/app/upload |
| 93 | existingClaim: {{ .Values.immich.persistence.library.existingClaim }} |
| 94 | {{- end }} |
| 95 | |
| 96 | {{ if .Values.server.enabled }} |
| 97 | {{- $ctx := deepCopy . -}} |
| 98 | {{- $_ := get .Values "server" | mergeOverwrite $ctx.Values -}} |
| 99 | {{- $_ = include "immich.server.hardcodedValues" . | fromYaml | merge $ctx.Values -}} |
| 100 | {{- include "bjw-s.common.loader.all" $ctx }} |
| 101 | {{ end }} |