blob: ed7afec6a1aa6113d7ec8fa4c8c87c39cba58341 [file] [log] [blame]
Woojoong Kim79e408c2019-02-07 22:23:22 +09001---
2# Copyright 2018-present Open Networking Foundation
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16---
17apiVersion: v1
18kind: Service
19metadata:
20 name: remote-vlc
21spec:
22 selector:
23 app: remote-vlc
24 clusterIP: None
25 ports:
26 - name: vlc
27 port: {{ .Values.remote_vlc.ports.vlc }}
28 protocol: TCP
29 - name: http
30 port: {{ .Values.remote_vlc.ports.http }}
31 protocol: TCP
32
33---
34apiVersion: apps/v1
35kind: StatefulSet
36metadata:
37 name: remote-vlc
38 namespace: {{ .Values.namespace }}
39 labels:
40 name: remote-vlc
41 app: remote-vlc
42spec:
43 replicas: {{ .Values.remote_vlc.replicas }}
44 selector:
45 matchLabels:
46 app: remote-vlc
47 serviceName: "remote-vlc"
48 template:
49 metadata:
50 labels:
51 app: remote-vlc
52 name: remote-vlc
53 spec:
54 hostNetwork: true
55 terminationGracePeriodSeconds: 1
56 nodeSelector:
Andy Baviera97d4832019-02-17 11:34:50 -080057 kubernetes.io/hostname: {{ .Values.cdn_node_selector }}
Woojoong Kim79e408c2019-02-07 22:23:22 +090058 containers:
59 - name: streaming
60 image: {{ .Values.remote_vlc.images.remote_vlc_image }}
61 imagePullPolicy: IfNotPresent
62 ports:
63 - containerPort: {{ .Values.remote_vlc.ports.vlc }}
64 - containerPort: {{ .Values.remote_vlc.ports.http }}
65 stdin: true
66 tty: true
67 command: [ "bash", "-xc"]
68 args:
69 - sed -i 's/geteuid/getppid/' /usr/bin/vlc;
Woojoong Kimfe426892019-02-15 15:39:20 +090070 cvlc {{ .Values.remote_vlc.video_quality }}.mp4 --sout "#transcode{vcodec=h264,acodec=mpga,ab=128,channels=2,samplerate=44100}:rtp{dst=0.0.0.0,port={{ .Values.remote_vlc.ports.vlc }},mux=ts,sap,name=Test}" --sout-keep --loop --ttl 10 --mtu 1200;
Woojoong Kim79e408c2019-02-07 22:23:22 +090071 resources:
72 limits:
73 cpu: {{ .Values.remote_vlc.resources.cpu }}
74 memory: {{ .Values.remote_vlc.resources.mem }}