Woojoong Kim | 79e408c | 2019-02-07 22:23:22 +0900 | [diff] [blame] | 1 | --- |
| 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 | --- |
| 17 | apiVersion: v1 |
| 18 | kind: Service |
| 19 | metadata: |
| 20 | name: remote-vlc |
| 21 | spec: |
| 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 | --- |
| 34 | apiVersion: apps/v1 |
| 35 | kind: StatefulSet |
| 36 | metadata: |
| 37 | name: remote-vlc |
| 38 | namespace: {{ .Values.namespace }} |
| 39 | labels: |
| 40 | name: remote-vlc |
| 41 | app: remote-vlc |
| 42 | spec: |
| 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 Kim | 7042405 | 2019-02-14 15:23:03 +0900 | [diff] [blame] | 57 | kubernetes.io/hostname: {{ .Values.node_selector }} |
Woojoong Kim | 79e408c | 2019-02-07 22:23:22 +0900 | [diff] [blame] | 58 | 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 }} |