Woojoong Kim | 2ccf324 | 2019-06-06 14:12:44 -0700 | [diff] [blame^] | 1 | --- |
| 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 | --- |
| 17 | apiVersion: v1 |
| 18 | kind: Service |
| 19 | metadata: |
| 20 | name: antmedia |
| 21 | spec: |
| 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 | --- |
| 36 | apiVersion: apps/v1 |
| 37 | kind: StatefulSet |
| 38 | metadata: |
| 39 | name: antmedia |
| 40 | labels: |
| 41 | name: antmedia |
| 42 | app: antmedia |
| 43 | spec: |
| 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 }} |