blob: 55d82cc82d63913d4df0d2427ad5bc0d92aecf1c [file] [log] [blame]
Jeremy Ronquillo11851d32020-06-08 15:13:08 -07001{{/*
Jeremy Ronquilloec2d3e42020-06-05 11:33:39 -07002# Copyright 2019-present Open Networking Foundation
Jeremy Ronquillo11851d32020-06-08 15:13:08 -07003
Scott Baker4cad5ee2022-06-09 14:17:35 -07004# SPDX-License-Identifier: Apache-2.0
Jeremy Ronquillo11851d32020-06-08 15:13:08 -07005*/}}
6
7{{ tuple "video-archive" . | include "cdn-remote.service_account" }}
8---
9apiVersion: apps/v1
10kind: StatefulSet
11metadata:
12 name: video-archive
13 labels:
14{{ tuple "video-archive" . | include "cdn-remote.metadata_labels" | indent 4 }}
15spec:
16 replicas: {{ .Values.config.videoArchive.replicas }}
17 selector:
18 matchLabels:
19{{ tuple "video-archive" . | include "cdn-remote.metadata_labels" | indent 6 }}
20 serviceName: "video-archive"
21 template:
22 metadata:
23 labels:
24{{ tuple "video-archive" . | include "cdn-remote.metadata_labels" | indent 8 }}
25 spec:
26 {{- if .Values.nodeSelectors.enabled }}
27 nodeSelector:
28 {{ .Values.nodeSelectors.videoArchive.label }}: {{ .Values.nodeSelectors.videoArchive.value }}
29 {{- end }}
30 serviceAccountName: video-archive
31 initContainers:
32 - name: video-archive-dep-check
33 image: {{ .Values.images.tags.depCheck | quote }}
34 imagePullPolicy: {{ .Values.images.pullPolicy }}
35 securityContext:
36 allowPrivilegeEscalation: false
37 readOnlyRootFilesystem: false
38 runAsUser: 0
39 env:
40 - name: POD_NAME
41 valueFrom:
42 fieldRef:
43 apiVersion: v1
44 fieldPath: metadata.name
45 - name: NAMESPACE
46 valueFrom:
47 fieldRef:
48 apiVersion: v1
49 fieldPath: metadata.namespace
50 - name: PATH
51 value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/
52 - name: COMMAND
53 value: "echo done"
54 - name: DEPENDENCY_POD_JSON
55 value: '[{"labels": {"app": "ant-media"}, "requireSameNode": false}]'
56 command:
57 - kubernetes-entrypoint
58 volumeMounts:
59 []
60 containers:
61{{- if .Values.config.videoArchive.q720p.enabled }}
62 - name: streaming-720
63 image: {{ .Values.images.tags.videoArchive | quote }}
64 imagePullPolicy: {{ .Values.images.pullPolicy }}
65 securityContext:
66 allowPrivilegeEscalation: false
67 readOnlyRootFilesystem: false
68 runAsUser: 0
69 stdin: true
70 tty: true
71 command: [ "bash", "-xc"]
72 args:
73 - /opt/start-stream.sh 720
74 {{- if .Values.resources.enabled }}
75 resources:
76{{ toYaml .Values.resources.videoArchive | indent 10 }}
77 {{- end }}
78 volumeMounts:
79 - name: start-script
80 mountPath: /opt/start-stream.sh
81 subPath: start-stream.sh
82{{- end }}
83{{- if .Values.config.videoArchive.q480p.enabled }}
84 - name: streaming-480
85 image: {{ .Values.images.tags.videoArchive | quote }}
86 imagePullPolicy: {{ .Values.images.pullPolicy }}
87 securityContext:
88 allowPrivilegeEscalation: false
89 readOnlyRootFilesystem: false
90 runAsUser: 0
91 stdin: true
92 tty: true
93 command: [ "bash", "-xc"]
94 args:
95 - /opt/start-stream.sh 480
96 {{- if .Values.resources.enabled }}
97 resources:
98{{ toYaml .Values.resources.videoArchive | indent 10 }}
99 {{- end }}
100 volumeMounts:
101 - name: start-script
102 mountPath: /opt/start-stream.sh
103 subPath: start-stream.sh
104{{- end }}
105{{- if .Values.config.videoArchive.q360p.enabled }}
106 - name: streaming-360
107 image: {{ .Values.images.tags.videoArchive | quote }}
108 imagePullPolicy: {{ .Values.images.pullPolicy }}
109 securityContext:
110 allowPrivilegeEscalation: false
111 readOnlyRootFilesystem: false
112 runAsUser: 0
113 stdin: true
114 tty: true
115 command: [ "bash", "-xc"]
116 args:
117 - /opt/start-stream.sh 360
118 {{- if .Values.resources.enabled }}
119 resources:
120{{ toYaml .Values.resources.videoArchive | indent 10 }}
121 {{- end }}
122 volumeMounts:
123 - name: start-script
124 mountPath: /opt/start-stream.sh
125 subPath: start-stream.sh
126{{- end }}
127 volumes:
128 - name: start-script
129 configMap:
130 name: start-stream
Jeremy Ronquillo6046ce32020-06-18 11:06:29 -0700131 defaultMode: 493