70 lines
2.3 KiB
YAML
70 lines
2.3 KiB
YAML
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.autoscaling.enabled }}
|
|
replicas: {{ .Values.replicaCount }}
|
|
{{- end }}
|
|
selector:
|
|
matchLabels:
|
|
{{- include "immich.selectorLabels" . | nindent 6 }}
|
|
app.kubernetes.io/component: machine-learning
|
|
template:
|
|
metadata:
|
|
{{- with .Values.podAnnotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
labels:
|
|
{{- include "immich.selectorLabels" . | nindent 8 }}
|
|
app.kubernetes.io/component: machine-learning
|
|
spec:
|
|
{{- with .Values.imagePullSecrets }}
|
|
imagePullSecrets:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
securityContext:
|
|
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
|
containers:
|
|
- name: {{ .Chart.Name }}-machine-learning
|
|
securityContext:
|
|
{{- toYaml .Values.securityContext | nindent 12 }}
|
|
image: "{{ .Values.machineLearningImage.repository }}:{{ .Values.machineLearningImage.tag | default .Chart.AppVersion }}"
|
|
imagePullPolicy: {{ .Values.machineLearningImage.pullPolicy }}
|
|
ports:
|
|
- name: http
|
|
containerPort: 3003
|
|
protocol: TCP
|
|
env:
|
|
- name: IMMICH_PORT
|
|
value: {{ .Values.service.port | quote }}
|
|
- name: IMMICH_MACHINE_LEARNING_PORT
|
|
value: "3003"
|
|
resources:
|
|
{{- toYaml .Values.resources | nindent 12 }}
|
|
volumeMounts:
|
|
- name: model-cache
|
|
mountPath: /cache
|
|
{{- with .Values.nodeSelector }}
|
|
nodeSelector:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.affinity }}
|
|
affinity:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.tolerations }}
|
|
tolerations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
restartPolicy: Always
|
|
automountServiceAccountToken: false
|
|
volumes:
|
|
- name: model-cache
|
|
persistentVolumeClaim:
|
|
claimName: {{ include "immich.fullname" . }}-model-cache
|