Woojoong Kim | 79e408c | 2019-02-07 22:23:22 +0900 | [diff] [blame] | 1 | --- |
| 2 | # Copyright 2018-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: nginx-rtmp |
| 21 | spec: |
| 22 | selector: |
| 23 | app: nginx-rtmp |
| 24 | type: NodePort |
| 25 | ports: |
| 26 | - name: vlc |
| 27 | port: {{ .Values.nginx.ports.rtmp_orig }} |
| 28 | nodePort: {{ .Values.nginx.ports.rtmp_np }} |
| 29 | protocol: TCP |
| 30 | |
| 31 | --- |
Matteo Scandolo | 5628d4b | 2021-01-11 11:46:12 -0800 | [diff] [blame] | 32 | apiVersion: apps/v1 |
Woojoong Kim | 79e408c | 2019-02-07 22:23:22 +0900 | [diff] [blame] | 33 | kind: StatefulSet |
| 34 | metadata: |
| 35 | name: nginx-rtmp |
| 36 | spec: |
| 37 | serviceName: nginx-rtmp |
| 38 | replicas: 1 |
Matteo Scandolo | 5628d4b | 2021-01-11 11:46:12 -0800 | [diff] [blame] | 39 | selector: |
| 40 | matchLabels: |
| 41 | name: nginx-rtmp |
| 42 | release: {{ .Release.Name }} |
Woojoong Kim | 79e408c | 2019-02-07 22:23:22 +0900 | [diff] [blame] | 43 | template: |
| 44 | metadata: |
| 45 | labels: |
| 46 | name: nginx-rtmp |
| 47 | app: nginx-rtmp |
| 48 | annotations: |
| 49 | k8s.v1.cni.cncf.io/networks: '[ |
| 50 | { "name": "sgi-net", "interface": "sgi-net", "namespace": "default" } |
| 51 | ]' |
| 52 | spec: |
| 53 | #hostNetwork: true |
| 54 | nodeSelector: |
Andy Bavier | 4ffc1a0 | 2019-02-17 16:51:54 -0700 | [diff] [blame] | 55 | kubernetes.io/hostname: {{ .Values.cdn_node_selector }} |
Woojoong Kim | 79e408c | 2019-02-07 22:23:22 +0900 | [diff] [blame] | 56 | terminationGracePeriodSeconds: 0 |
| 57 | imagePullSecrets: |
| 58 | - name: nexus-docker-secret |
| 59 | initContainers: |
| 60 | - name: "nginx-rtmp-init" |
| 61 | image: {{ .Values.nginx.images.nginx_image }} |
| 62 | imagePullPolicy: "IfNotPresent" |
| 63 | args: |
| 64 | - cp /config/*.sh /shared-vol;cp /conf/* /shared-vol |
| 65 | command: |
| 66 | - "/bin/bash" |
| 67 | - "-c" |
| 68 | volumeMounts: |
| 69 | - name: "shared-volume" |
| 70 | mountPath: "/shared-vol" |
| 71 | - name: "nginx-rtmp-config" |
| 72 | mountPath: "/config" |
| 73 | - name: "nginx-rtmp-conf" |
| 74 | mountPath: "/conf" |
| 75 | containers: |
| 76 | - name: nginx-rtmp |
| 77 | image: {{ .Values.nginx.images.nginx_image }} |
| 78 | imagePullPolicy: IfNotPresent |
| 79 | args: |
| 80 | - chmod a+x /config/*.sh;/config/nginx_rtmp_config.sh |
| 81 | command: |
| 82 | - "/bin/bash" |
| 83 | - "-c" |
| 84 | tty: true |
| 85 | securityContext: |
| 86 | privileged: true |
| 87 | ports: |
| 88 | - containerPort: {{ .Values.nginx.ports.rtmp_orig }} |
| 89 | volumeMounts: |
| 90 | - name: shared-volume |
| 91 | mountPath: /config |
| 92 | - name: shared-volume |
| 93 | mountPath: /conf |
| 94 | resources: |
| 95 | limits: |
| 96 | intel.com/sriov: '2' |
| 97 | volumes: |
| 98 | - name: nginx-rtmp-config |
| 99 | configMap: |
| 100 | name: nginx-rtmp-config |
| 101 | items: |
| 102 | - key: nginx_rtmp_config.sh |
| 103 | path: nginx_rtmp_config.sh |
| 104 | - name: nginx-rtmp-conf |
| 105 | configMap: |
| 106 | name: nginx-rtmp-conf |
| 107 | items: |
| 108 | - key: nginx.conf |
| 109 | path: nginx.conf |
| 110 | - name: shared-volume |
Matteo Scandolo | 5628d4b | 2021-01-11 11:46:12 -0800 | [diff] [blame] | 111 | emptyDir: {} |