blob: 0dc8efc5446ebaaf314d99ed68fa245a1f0f564a [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: antmedia
21spec:
22 selector:
23 app: antmedia
24 type: NodePort
25 ports:
26 - name: httpui
27 port: {{ .Values.antmedia.ports.httpui }}
28 nodePort: {{ .Values.antmedia.ports.httpui_np }}
29 protocol: TCP
30 - name: rtmp
31 port: {{ .Values.antmedia.ports.rtmp }}
32 nodePort: {{ .Values.antmedia.ports.rtmp_np }}
33 protocol: TCP
34
35---
36apiVersion: apps/v1
37kind: StatefulSet
38metadata:
39 name: antmedia
40 labels:
41 name: antmedia
42 app: antmedia
43spec:
44 replicas: {{ .Values.antmedia.replicas }}
45 selector:
46 matchLabels:
47 app: antmedia
48 serviceName: "antmedia"
49 template:
50 metadata:
51 labels:
52 app: antmedia
53 name: antmedia
54 spec:
55 terminationGracePeriodSeconds: 1
56 nodeSelector:
57 kubernetes.io/hostname: {{ .Values.cdn_node_selector }}
58 containers:
59 - name: antmedia
60 image: {{ .Values.antmedia.images.antmedia_image }}
61 imagePullPolicy: IfNotPresent
62 ports:
63 - containerPort: {{ .Values.antmedia.ports.httpui }}
64 - containerPort: {{ .Values.antmedia.ports.rtmp }}
65 stdin: true
66 tty: true
67 command: [ "bash", "-xc"]
68 args:
69 - cd /usr/local/antmedia && ./start.sh | tee /opt/start.log
70 resources:
71 limits:
72 cpu: {{ .Values.antmedia.resources.cpu }}
73 memory: {{ .Values.antmedia.resources.mem }}