mirror of
https://github.com/shadoll/helm-charts.git
synced 2026-08-28 03:27:08 +00:00
103 lines
3.5 KiB
YAML
103 lines
3.5 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "jellyfin.fullname" . }}
|
|
{{- if .Values.namespaceOverride }}
|
|
namespace: {{ .Values.namespaceOverride }}
|
|
{{- end }}
|
|
labels:
|
|
{{- include "jellyfin.labels" . | nindent 4 }}
|
|
spec:
|
|
replicas: {{ .Values.replicaCount }}
|
|
selector:
|
|
matchLabels:
|
|
{{- include "jellyfin.selectorLabels" . | nindent 6 }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
{{- include "jellyfin.selectorLabels" . | nindent 8 }}
|
|
spec:
|
|
containers:
|
|
- name: {{ .Chart.Name }}
|
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
ports:
|
|
- name: http
|
|
containerPort: 8096
|
|
protocol: TCP
|
|
env:
|
|
- name: POSTGRES_HOST
|
|
value: {{ .Values.postgres.host | quote }}
|
|
- name: POSTGRES_PORT
|
|
value: {{ .Values.postgres.port | quote }}
|
|
- name: POSTGRES_DB
|
|
value: {{ .Values.postgres.db | quote }}
|
|
- name: POSTGRES_USER
|
|
value: {{ .Values.postgres.user | quote }}
|
|
- name: POSTGRES_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: {{ .Values.postgres.existingSecret }}
|
|
key: JELLYFIN_POSTGRESQL_PASSWORD
|
|
volumeMounts:
|
|
{{- if .Values.persistence.media.enabled }}
|
|
- name: media
|
|
mountPath: {{ .Values.persistence.media.mountPath }}
|
|
{{- end }}
|
|
{{- if .Values.persistence.config.enabled }}
|
|
- name: config
|
|
mountPath: {{ .Values.persistence.config.mountPath }}
|
|
{{- end }}
|
|
{{- if .Values.persistence.dri.enabled }}
|
|
- name: dri
|
|
mountPath: {{ .Values.persistence.dri.mountPath }}
|
|
{{- end }}
|
|
{{- if .Values.persistence.extraVolumeMounts }}
|
|
{{- toYaml .Values.persistence.extraVolumeMounts | nindent 12 }}
|
|
{{- end }}
|
|
securityContext:
|
|
privileged: true
|
|
capabilities:
|
|
add: ["SYS_ADMIN"]
|
|
resources:
|
|
{{- toYaml .Values.resources | nindent 12 }}
|
|
volumes:
|
|
{{- if .Values.persistence.media.enabled }}
|
|
- name: media
|
|
hostPath:
|
|
path: {{ .Values.persistence.media.hostPath }}
|
|
type: DirectoryOrCreate
|
|
{{- end }}
|
|
{{- if .Values.persistence.config.enabled }}
|
|
- name: config
|
|
{{- if eq .Values.persistence.config.type "hostPath" }}
|
|
hostPath:
|
|
path: {{ .Values.persistence.config.hostPath }}
|
|
type: DirectoryOrCreate
|
|
{{- else }}
|
|
persistentVolumeClaim:
|
|
claimName: {{ .Values.persistence.config.existingClaim | default (include "jellyfin.fullname" .) }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if .Values.persistence.dri.enabled }}
|
|
- name: dri
|
|
hostPath:
|
|
path: {{ .Values.persistence.dri.hostPath }}
|
|
type: Directory
|
|
{{- end }}
|
|
{{- if .Values.persistence.extraVolumes }}
|
|
{{- toYaml .Values.persistence.extraVolumes | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.nodeSelector }}
|
|
nodeSelector:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.affinity }}
|
|
affinity:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.tolerations }}
|
|
tolerations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|