blob: 8fd257435489a71b8c9218da2a500de330419ce1 [file] [log] [blame]
Woojoong Kim2ccf3242019-06-06 14:12:44 -07001---
2# Copyright 2019-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-streaming
21spec:
22 selector:
23 app: remote-streaming
24 type: NodePort
25 ports:
26 - name: vlc
27 port: {{ .Values.remote_streaming.ports.vlc }}
28 nodePort: {{ .Values.remote_streaming.ports.vlc_np }}
29 protocol: TCP
30 - name: http
31 port: {{ .Values.remote_streaming.ports.http }}
32 nodePort: {{ .Values.remote_streaming.ports.http_np }}
33 protocol: TCP
34
35---
36apiVersion: apps/v1beta1
37kind: StatefulSet
38metadata:
39 name: remote-streaming
40spec:
41 replicas: {{ .Values.remote_streaming.replicas }}
42 selector:
43 matchLabels:
44 app: remote-streaming
45 serviceName: "remote-streaming"
46 template:
47 metadata:
48 labels:
49 app: remote-streaming
50 name: remote-streaming
51 spec:
52 terminationGracePeriodSeconds: 1
Woojoong Kim2ccf3242019-06-06 14:12:44 -070053 containers:
54 - name: streaming
55 image: {{ .Values.remote_streaming.images.remote_streaming_image }}
56 imagePullPolicy: IfNotPresent
57 ports:
58 - containerPort: {{ .Values.remote_streaming.ports.vlc }}
59 - containerPort: {{ .Values.remote_streaming.ports.http }}
60 stdin: true
61 tty: true
62 command: [ "bash", "-xc"]
63 args:
64 - sed -i 's/geteuid/getppid/' /usr/bin/vlc;
65 /opt/start-remote-stream.sh
66 resources:
67 limits:
68 cpu: {{ .Values.remote_streaming.resources.cpu }}
69 memory: {{ .Values.remote_streaming.resources.mem }}
70 volumeMounts:
71 - name: start-script
72 mountPath: /opt/start-remote-stream.sh
73 subPath: start-remote-stream.sh
74 volumes:
75 - name: start-script
76 configMap:
77 name: start-remote-stream
78 defaultMode: 493