Woojoong Kim | 3f51f0c | 2019-09-06 11:31:13 -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 | {{ tuple "ant-media" . | include "cdn-remote.service_account" }} |
| 18 | --- |
| 19 | apiVersion: apps/v1 |
| 20 | kind: StatefulSet |
| 21 | metadata: |
| 22 | name: ant-media |
| 23 | labels: |
| 24 | {{ tuple "ant-media" . | include "cdn-remote.metadata_labels" | indent 4 }} |
| 25 | spec: |
| 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 }} |