blob: 1e9778a008da57bbd3725037399ea8050f0d63e9 [file] [log] [blame]
Woojoong Kim3f51f0c2019-09-06 11:31:13 -07001{{/*
2Copyright 2019-present Open Networking Foundation
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15*/}}
16
17{{ tuple "ant-media" . | include "cdn-remote.service_account" }}
18---
19apiVersion: apps/v1
20kind: StatefulSet
21metadata:
22 name: ant-media
23 labels:
24{{ tuple "ant-media" . | include "cdn-remote.metadata_labels" | indent 4 }}
25spec:
26 replicas: {{ .Values.config.antMedia.replicas }}
27 selector:
28 matchLabels:
29{{ tuple "ant-media" . | include "cdn-remote.metadata_labels" | indent 6 }}
30 serviceName: "ant-media"
31 template:
32 metadata:
33 labels:
34{{ tuple "ant-media" . | include "cdn-remote.metadata_labels" | indent 8 }}
35 spec:
36 {{- if .Values.nodeSelectors.enabled }}
37 nodeSelector:
38 {{ .Values.nodeSelectors.antMedia.label }}: {{ .Values.nodeSelectors.antMedia.value }}
39 {{- end }}
40 serviceAccountName: ant-media
41 containers:
42 - name: ant-media
43 image: {{ .Values.images.tags.antMedia | quote }}
44 imagePullPolicy: {{ .Values.images.pullPolicy }}
45 securityContext:
46 allowPrivilegeEscalation: false
47 readOnlyRootFilesystem: false
48 runAsUser: 0
49 stdin: true
50 tty: true
51 command: [ "bash", "-xc"]
52 args:
53 - cd /usr/local/antmedia && ./start.sh | tee /opt/start.log
54 {{- if .Values.resources.enabled }}
55 resources:
56{{ toYaml .Values.resources.antMedia | indent 10 }}
57 {{- end }}