blob: 1d9454aa6b278bf833172519635eea54385a9c55 [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---
Matteo Scandolo5628d4b2021-01-11 11:46:12 -080040apiVersion: apps/v1
Woojoong Kim79e408c2019-02-07 22:23:22 +090041kind: StatefulSet
42metadata:
43 name: wowza
44 namespace: {{ .Values.namespace }}
45spec:
46 serviceName: wowza
47 replicas: 1
Matteo Scandolo5628d4b2021-01-11 11:46:12 -080048 selector:
49 matchLabels:
50 name: wowza
51 release: {{ .Release.Name }}
Woojoong Kim79e408c2019-02-07 22:23:22 +090052 template:
53 metadata:
54 labels:
55 name: wowza
56 app: wowza
57 spec:
58 hostNetwork: true
59 terminationGracePeriodSeconds: 0
60 imagePullSecrets:
61 - name: nexus-docker-secret
62 nodeSelector:
Andy Baviera97d4832019-02-17 11:34:50 -080063 kubernetes.io/hostname: {{ .Values.cdn_node_selector }}
Woojoong Kim79e408c2019-02-07 22:23:22 +090064 initContainers:
65 - name: "wowza-init"
66 image: {{ .Values.wowza.images.wowza_image }}
67 imagePullPolicy: IfNotPresent
68 args:
69 - cp /config/*.sh /shared-vol
70 command:
71 - "/bin/bash"
72 - "-c"
73 volumeMounts:
74 - name: "shared-volume"
75 mountPath: "/shared-vol"
76 - name: "wowza-conf"
77 mountPath: "/config"
78 containers:
79 - name: wowza
80 image: {{ .Values.wowza.images.wowza_image }}
81 imagePullPolicy: IfNotPresent
82 args:
83 - chmod a+x /config/*.sh;/config/wowza_config.sh;/sbin/entrypoint.sh
84 command:
85 - "/bin/bash"
86 - "-c"
87 tty: true
88 securityContext:
89 privileged: true
90 env:
91 - name: WSE_MGR_USER
92 value: wowza
93 - name: WSE_MGR_PASS
94 value: wowza
95 - name: WSE_LIC
96 value: ET1E4-bze6X-EpP8Z-EF3ZQ-ABhdM-hrJDZ-8bG9dcbA9Hkm
97 - name: WSE_IP_PARAM
98 valueFrom:
99 fieldRef:
100 fieldPath: spec.nodeName
101 ports:
102 - containerPort: {{ .Values.wowza.ports.rtmp }}
103 - containerPort: {{ .Values.wowza.ports.streammanager }}
104 - containerPort: {{ .Values.wowza.ports.rest }}
105 - containerPort: {{ .Values.wowza.ports.webui }}
106 volumeMounts:
107 - name: wowza-logs
108 mountPath: /usr/local/WowzaStreamingEngine/logs
109 readOnly: false
110 - name: shared-volume
111 mountPath: /config
112 volumes:
113 - name: wowza-logs
114 hostPath:
115 path: /var/log
116 - name: wowza-conf
117 configMap:
118 name: wowza-config
119 items:
120 - key: wowza_config.sh
121 path: wowza_config.sh
122 - name: shared-volume
123 emptyDir: {}