blob: c3d4a617006ff2db69b8f1dd9af3e5c3b6854c21 [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
Woojoong Kim2ccf3242019-06-06 14:12:44 -070056 containers:
57 - name: antmedia
58 image: {{ .Values.antmedia.images.antmedia_image }}
59 imagePullPolicy: IfNotPresent
60 ports:
61 - containerPort: {{ .Values.antmedia.ports.httpui }}
62 - containerPort: {{ .Values.antmedia.ports.rtmp }}
63 stdin: true
64 tty: true
65 command: [ "bash", "-xc"]
66 args:
67 - cd /usr/local/antmedia && ./start.sh | tee /opt/start.log
68 resources:
69 limits:
70 cpu: {{ .Values.antmedia.resources.cpu }}
71 memory: {{ .Values.antmedia.resources.mem }}