first commit

This commit is contained in:
2025-07-04 19:51:51 +05:30
commit 42895beb8c
72 changed files with 2584 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
apiVersion: v2
name: ersatztv
description: A Helm chart for Ersatztv
type: application
version: 0.1.0
appVersion: "25.2.0"

View File

@@ -0,0 +1,33 @@
name: ersatztv
namespace: default
image:
repository: jasongdove/ersatztv
tag: v25.2.0
hwAccl:
enabled: true
nodeAffinity:
key: gpu
value: intel
securityContext:
supplementalGroups:
- 128
- 226
- 106
persistence:
enabled: true
exsistingClaim: true
claimName: longhorn-ersatztv
library:
enabled: true
server: 10.0.0.123
path: /merge
service:
type: LoadBalancer
port: 8409

View File

@@ -0,0 +1,16 @@
{{- if .Values.persistence.enabled }}
{{- if not .Values.persistence.existingClaim }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: "longhorn-{{ .Values.name }}"
namespace: {{ .Values.namespace }}
spec:
accessModes:
- ReadWriteMany
storageClassName: longhorn
resources:
requests:
storage: {{ .Values.persistence.size }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,22 @@
---
apiVersion: v1
kind: Service
metadata:
name: "{{ .Values.name }}-service"
namespace: {{ .Values.namespace }}
spec:
{{- if eq .Values.service.type "NodePort" }}
type: NodePort
{{- else if eq .Values.service.type "LoadBalancer" }}
type: LoadBalancer
{{- end }}
selector:
app: {{ .Values.name }}
ports:
- protocol: TCP
targetPort: 8409
{{- if eq .Values.service.type "NodePort" }}
nodePort: {{ .Values.service.nodePort }}
{{- else if eq .Values.service.type "LoadBalancer" }}
port: {{ .Values.service.port }}
{{- end }}

View File

@@ -0,0 +1,80 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Values.name }}
namespace: {{ .Values.namespace }}
spec:
replicas: 1
selector:
matchLabels:
app: {{ .Values.name }}
template:
metadata:
labels:
app: {{ .Values.name }}
spec:
{{- if .Values.hwAccl.enabled }}
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: {{ .Values.nodeAffinity.key }}
operator: In
values:
- "{{ .Values.nodeAffinity.value }}"
supplementalGroups: {{ .Values.securityContext.supplementalGroups | toYaml | nindent 8 }}
{{- end }}
securityContext:
runAsGroup: 0
runAsUser: 0
containers:
- name: {{ .Values.name }}
{{- if .Values.hwAccl.enabled }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}-vaapi"
{{- else }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
{{- end }}
volumeMounts:
- name: config
mountPath: /root/.local/share/ersatztv
{{- if .Values.hwAccl.enabled }}
- name: intel
mountPath: /dev/dri/renderD128
{{- end }}
- name: transcode
mountPath: /root/.local/share/etv-transcode
- name: content
mountPath: /mnt/merge
securityContext:
privileged: true
volumes:
{{- if and .Values.persistence.enabled .Values.persistence.existingClaim }}
- name: config
persistentVolumeClaim:
claimName: "{{ .Values.persistence.claimName }}"
{{- else if .Values.persistence.enabled }}
- name: config
persistentVolumeClaim:
claimName: "longhorn-{{ .Values.name }}"
{{- else }}
- name: config
emptyDir: {}
{{- end }}
- name: transcode
emptyDir: {}
{{- if .Values.hwAccl.enabled }}
- name: intel
hostPath:
path: /dev/dri/renderD128
{{- end }}
{{- if .Values.library.enabled}}
- name: content
nfs:
server: {{ .Values.library.server }}
path: {{ .Values.library.path }}
{{- else }}
- name: content
emptyDir: {}
{{- end }}