blob: b974c44a1183a6d5d26965790fc3ca4bf611c071 [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
53 nodeSelector:
54 kubernetes.io/hostname: {{ .Values.cdn_node_selector }}
55 containers:
56 - name: streaming
57 image: {{ .Values.remote_streaming.images.remote_streaming_image }}
58 imagePullPolicy: IfNotPresent
59 ports:
60 - containerPort: {{ .Values.remote_streaming.ports.vlc }}
61 - containerPort: {{ .Values.remote_streaming.ports.http }}
62 stdin: true
63 tty: true
64 command: [ "bash", "-xc"]
65 args:
66 - sed -i 's/geteuid/getppid/' /usr/bin/vlc;
67 /opt/start-remote-stream.sh
68 resources:
69 limits:
70 cpu: {{ .Values.remote_streaming.resources.cpu }}
71 memory: {{ .Values.remote_streaming.resources.mem }}
72 volumeMounts:
73 - name: start-script
74 mountPath: /opt/start-remote-stream.sh
75 subPath: start-remote-stream.sh
76 volumes:
77 - name: start-script
78 configMap:
79 name: start-remote-stream
80 defaultMode: 493