fukuops/k8s/charts/immich/templates/statefulset.yaml
cătălin 1fd2bfef3d
feat(helm): complete chart normalization with ConfigMap, HPA, and OCI migration
- Added debug mode, structured ConfigMap pattern, and README to all charts
- Migrated all flat-structure charts to hierarchical values under chartname key
- Fixed templates to use correct hierarchical paths
- Renamed helm-rustical key to rustical, added HPA support
- Fixed ingress YAML parsing (oxicloud), nested env vars (rustical)
- Pushed all normalized charts to OCI registry as 1.0.0+ and updated ArgoCD apps
2026-08-14 09:35:19 +02:00

72 lines
2.6 KiB
YAML

{{- if .Values.immich.machineLearning.enabled -}}
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: {{ include "immich.fullname" . }}-machine-learning
labels:
{{- include "immich.labels" . | nindent 4 }}
app.kubernetes.io/component: machine-learning
spec:
serviceName: {{ include "immich.fullname" . }}-machine-learning-headless
{{- if not .Values.immich.machineLearning.autoscaling.enabled }}
replicas: {{ .Values.immich.machineLearning.replicaCount }}
{{- end }}
selector:
matchLabels:
{{- include "immich.selectorLabels" . | nindent 6 }}
app.kubernetes.io/component: machine-learning
template:
metadata:
{{- with .Values.immich.machineLearning.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "immich.selectorLabels" . | nindent 8 }}
app.kubernetes.io/component: machine-learning
spec:
{{- with .Values.immich.machineLearning.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
securityContext:
{{- toYaml .Values.immich.machineLearning.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}-machine-learning
securityContext:
{{- toYaml .Values.immich.machineLearning.securityContext | nindent 12 }}
image: "{{ .Values.immich.machineLearning.image.repository }}:{{ .Values.immich.machineLearning.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.immich.machineLearning.image.pullPolicy }}
ports:
- name: http
containerPort: 3003
protocol: TCP
env:
- name: IMMICH_PORT
value: {{ .Values.immich.machineLearning.service.port | quote }}
- name: IMMICH_MACHINE_LEARNING_PORT
value: "3003"
resources:
{{- toYaml .Values.immich.machineLearning.resources | nindent 12 }}
volumeMounts:
- name: model-cache
mountPath: /cache
{{- with .Values.immich.machineLearning.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.immich.machineLearning.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.immich.machineLearning.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
restartPolicy: Always
automountServiceAccountToken: false
volumes:
- name: model-cache
persistentVolumeClaim:
claimName: {{ include "immich.fullname" . }}-model-cache
{{- end }}