blob: 62b9a5ea3c67fdb75c2389c6520a30669325bc0c [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:
Woojoong Kim70424052019-02-14 15:23:03 +090057 kubernetes.io/hostname: {{ .Values.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;
70 cvlc larva_360p.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;
71 resources:
72 limits:
73 cpu: {{ .Values.remote_vlc.resources.cpu }}
74 memory: {{ .Values.remote_vlc.resources.mem }}