Add go2rtc chart

This commit is contained in:
sha committed 2026-11-26 00:50:20 +02:00
1 parent 8798d6d707
commit c80d0be2f7
7 files changed
+279

No files matched your search

+128
View File
@@ -0,0 +1,128 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}
labels:
app.kubernetes.io/name: {{ .Chart.Name }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
app.kubernetes.io/component: proxy
annotations:
version-source: {{ index .Chart.Annotations "version-source" }}
version-pattern: {{ index .Chart.Annotations "version-pattern" | quote }}
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app: {{ .Release.Name }}
template:
metadata:
labels:
app: {{ .Release.Name }}
annotations:
checksum/config: {{ .Values.config | sha256sum }}
spec:
{{- if .Values.hostNetwork }}
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.persistence.enabled }}
initContainers:
- name: init-state
image: busybox:1.37
command:
- /bin/sh
- -ec
- |
[ -f /data/state.yaml ] || echo "{}" > /data/state.yaml
volumeMounts:
- name: data
mountPath: /data
{{- end }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.persistence.enabled }}
args:
- -c
- /data/state.yaml
- -c
- /config/go2rtc.yaml
- -c
- /data/state.yaml
{{- else }}
args:
- -c
- /config/go2rtc.yaml
{{- end }}
ports:
- name: http
containerPort: {{ .Values.apiPort }}
protocol: TCP
- name: rtsp
containerPort: {{ .Values.rtspPort }}
protocol: TCP
- name: webrtc
containerPort: {{ .Values.webrtcPort }}
protocol: TCP
- name: webrtc-udp
containerPort: {{ .Values.webrtcPort }}
protocol: UDP
env:
- name: TZ
value: {{ .Values.timezone | quote }}
{{- if .Values.existingSecret }}
envFrom:
- secretRef:
name: {{ .Values.existingSecret }}
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
readinessProbe:
httpGet:
path: /api
port: http
initialDelaySeconds: 5
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 3
livenessProbe:
httpGet:
path: /api
port: http
initialDelaySeconds: 30
periodSeconds: 30
timeoutSeconds: 10
failureThreshold: 3
volumeMounts:
- name: config
mountPath: /config
readOnly: true
{{- if .Values.persistence.enabled }}
- name: data
mountPath: /data
{{- end }}
volumes:
- name: config
configMap:
name: {{ .Release.Name }}-config
{{- if .Values.persistence.enabled }}
- name: data
persistentVolumeClaim:
claimName: {{ .Values.persistence.existingClaim | default (printf "%s-data" .Release.Name) }}
{{- end }}