first commit
This commit is contained in:
16
clusters/default/apps/ersatztv/templates/ersatztv-pvc.yaml
Normal file
16
clusters/default/apps/ersatztv/templates/ersatztv-pvc.yaml
Normal 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 }}
|
||||
22
clusters/default/apps/ersatztv/templates/ersatztv-svc.yaml
Normal file
22
clusters/default/apps/ersatztv/templates/ersatztv-svc.yaml
Normal 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 }}
|
||||
80
clusters/default/apps/ersatztv/templates/ersatztv.yaml
Normal file
80
clusters/default/apps/ersatztv/templates/ersatztv.yaml
Normal 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 }}
|
||||
Reference in New Issue
Block a user