blob: f405551c25c8547c3700326a809307ee6b75f20a [file] [log] [blame]
Woojoong Kim79e408c2019-02-07 22:23:22 +09001---
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---
17apiVersion: v1
18kind: Service
19metadata:
20 name: wowza
21spec:
22 selector:
23 app: wowza
24 clusterIP: None
25 ports:
26 - name: rtmp-port
27 protocol: TCP
28 port: {{ .Values.wowza.ports.rtmp }}
29 - name: streammanager-port
30 protocol: TCP
31 port: {{ .Values.wowza.ports.streammanager }}
32 - name: rest-port
33 protocol: TCP
34 port: {{ .Values.wowza.ports.rest }}
35 - name: webui-port
36 protocol: TCP
37 port: {{ .Values.wowza.ports.webui }}
38
39---
40apiVersion: apps/v1beta1
41kind: StatefulSet
42metadata:
43 name: wowza
44 namespace: {{ .Values.namespace }}
45spec:
46 serviceName: wowza
47 replicas: 1
48 template:
49 metadata:
50 labels:
51 name: wowza
52 app: wowza
53 spec:
54 hostNetwork: true
55 terminationGracePeriodSeconds: 0
56 imagePullSecrets:
57 - name: nexus-docker-secret
58 nodeSelector:
Woojoong Kim70424052019-02-14 15:23:03 +090059 kubernetes.io/hostname: {{ .Values.node_selector }}
Woojoong Kim79e408c2019-02-07 22:23:22 +090060 initContainers:
61 - name: "wowza-init"
62 image: {{ .Values.wowza.images.wowza_image }}
63 imagePullPolicy: IfNotPresent
64 args:
65 - cp /config/*.sh /shared-vol
66 command:
67 - "/bin/bash"
68 - "-c"
69 volumeMounts:
70 - name: "shared-volume"
71 mountPath: "/shared-vol"
72 - name: "wowza-conf"
73 mountPath: "/config"
74 containers:
75 - name: wowza
76 image: {{ .Values.wowza.images.wowza_image }}
77 imagePullPolicy: IfNotPresent
78 args:
79 - chmod a+x /config/*.sh;/config/wowza_config.sh;/sbin/entrypoint.sh
80 command:
81 - "/bin/bash"
82 - "-c"
83 tty: true
84 securityContext:
85 privileged: true
86 env:
87 - name: WSE_MGR_USER
88 value: wowza
89 - name: WSE_MGR_PASS
90 value: wowza
91 - name: WSE_LIC
92 value: ET1E4-bze6X-EpP8Z-EF3ZQ-ABhdM-hrJDZ-8bG9dcbA9Hkm
93 - name: WSE_IP_PARAM
94 valueFrom:
95 fieldRef:
96 fieldPath: spec.nodeName
97 ports:
98 - containerPort: {{ .Values.wowza.ports.rtmp }}
99 - containerPort: {{ .Values.wowza.ports.streammanager }}
100 - containerPort: {{ .Values.wowza.ports.rest }}
101 - containerPort: {{ .Values.wowza.ports.webui }}
102 volumeMounts:
103 - name: wowza-logs
104 mountPath: /usr/local/WowzaStreamingEngine/logs
105 readOnly: false
106 - name: shared-volume
107 mountPath: /config
108 volumes:
109 - name: wowza-logs
110 hostPath:
111 path: /var/log
112 - name: wowza-conf
113 configMap:
114 name: wowza-config
115 items:
116 - key: wowza_config.sh
117 path: wowza_config.sh
118 - name: shared-volume
119 emptyDir: {}