Files
feedc0de e9af5ed974
Validate, publish and promote Helm chart / Validate chart (push) Successful in 23s
Validate, publish and promote Helm chart / Publish and promote chart (push) Successful in 29s
Add reusable ImmichFrame Helm chart
2026-10-18 13:41:43 +02:00

121 lines
3.8 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "immichframe.fullname" . }}
labels:
{{- include "immichframe.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 0
maxSurge: 1
selector:
matchLabels:
{{- include "immichframe.selectorLabels" . | nindent 6 }}
template:
metadata:
annotations:
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
checksum/external-secret-revision: {{ .Values.config.secretRevision | quote }}
{{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "immichframe.labels" . | nindent 8 }}
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
automountServiceAccountToken: false
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- range . }}
- name: {{ if kindIs "string" . }}{{ . }}{{ else }}{{ .name }}{{ end }}
{{- end }}
{{- end }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- if .Values.affinity }}
affinity:
{{- toYaml .Values.affinity | nindent 8 }}
{{- else if .Values.podAntiAffinity.enabled }}
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchLabels:
{{- include "immichframe.selectorLabels" . | nindent 18 }}
topologyKey: kubernetes.io/hostname
{{- end }}
containers:
- name: immichframe
image: {{ include "immichframe.image" . | quote }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: 8080
protocol: TCP
env:
- name: TZ
value: {{ .Values.timezone | quote }}
startupProbe:
tcpSocket:
port: http
{{- toYaml .Values.startupProbe | nindent 10 }}
readinessProbe:
tcpSocket:
port: http
{{- toYaml .Values.readinessProbe | nindent 10 }}
livenessProbe:
tcpSocket:
port: http
{{- toYaml .Values.livenessProbe | nindent 10 }}
resources:
{{- toYaml .Values.resources | nindent 10 }}
securityContext:
{{- toYaml .Values.securityContext | nindent 10 }}
volumeMounts:
{{- if .Values.persistence.enabled }}
- name: config-data
mountPath: /app/Config
{{- end }}
- name: settings
mountPath: /app/Config/Settings.yml
subPath: Settings.yml
readOnly: true
- name: api-keys
mountPath: /app/Secrets
readOnly: true
volumes:
{{- if .Values.persistence.enabled }}
- name: config-data
persistentVolumeClaim:
claimName: {{ default (printf "%s-config" (include "immichframe.fullname" .)) .Values.persistence.existingClaim }}
{{- end }}
- name: settings
configMap:
name: {{ include "immichframe.fullname" . }}-config
- name: api-keys
projected:
defaultMode: 0440
sources:
{{- range $index, $account := .Values.config.accounts }}
- secret:
name: {{ $account.apiKeySecret.name }}
items:
- key: {{ $account.apiKeySecret.key }}
path: {{ printf "account-%d-api-key" $index }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}