| --- |
| # Copyright 2018-present Open Networking Foundation |
| # |
| # Licensed under the Apache License, Version 2.0 (the "License"); |
| # you may not use this file except in compliance with the License. |
| # You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| |
| --- |
| apiVersion: v1 |
| kind: Service |
| metadata: |
| name: wowza |
| spec: |
| selector: |
| app: wowza |
| clusterIP: None |
| ports: |
| - name: rtmp-port |
| protocol: TCP |
| port: {{ .Values.wowza.ports.rtmp }} |
| - name: streammanager-port |
| protocol: TCP |
| port: {{ .Values.wowza.ports.streammanager }} |
| - name: rest-port |
| protocol: TCP |
| port: {{ .Values.wowza.ports.rest }} |
| - name: webui-port |
| protocol: TCP |
| port: {{ .Values.wowza.ports.webui }} |
| |
| --- |
| apiVersion: apps/v1 |
| kind: StatefulSet |
| metadata: |
| name: wowza |
| namespace: {{ .Values.namespace }} |
| spec: |
| serviceName: wowza |
| replicas: 1 |
| selector: |
| matchLabels: |
| name: wowza |
| release: {{ .Release.Name }} |
| template: |
| metadata: |
| labels: |
| name: wowza |
| app: wowza |
| spec: |
| hostNetwork: true |
| terminationGracePeriodSeconds: 0 |
| imagePullSecrets: |
| - name: nexus-docker-secret |
| nodeSelector: |
| kubernetes.io/hostname: {{ .Values.cdn_node_selector }} |
| initContainers: |
| - name: "wowza-init" |
| image: {{ .Values.wowza.images.wowza_image }} |
| imagePullPolicy: IfNotPresent |
| args: |
| - cp /config/*.sh /shared-vol |
| command: |
| - "/bin/bash" |
| - "-c" |
| volumeMounts: |
| - name: "shared-volume" |
| mountPath: "/shared-vol" |
| - name: "wowza-conf" |
| mountPath: "/config" |
| containers: |
| - name: wowza |
| image: {{ .Values.wowza.images.wowza_image }} |
| imagePullPolicy: IfNotPresent |
| args: |
| - chmod a+x /config/*.sh;/config/wowza_config.sh;/sbin/entrypoint.sh |
| command: |
| - "/bin/bash" |
| - "-c" |
| tty: true |
| securityContext: |
| privileged: true |
| env: |
| - name: WSE_MGR_USER |
| value: wowza |
| - name: WSE_MGR_PASS |
| value: wowza |
| - name: WSE_LIC |
| value: ET1E4-bze6X-EpP8Z-EF3ZQ-ABhdM-hrJDZ-8bG9dcbA9Hkm |
| - name: WSE_IP_PARAM |
| valueFrom: |
| fieldRef: |
| fieldPath: spec.nodeName |
| ports: |
| - containerPort: {{ .Values.wowza.ports.rtmp }} |
| - containerPort: {{ .Values.wowza.ports.streammanager }} |
| - containerPort: {{ .Values.wowza.ports.rest }} |
| - containerPort: {{ .Values.wowza.ports.webui }} |
| volumeMounts: |
| - name: wowza-logs |
| mountPath: /usr/local/WowzaStreamingEngine/logs |
| readOnly: false |
| - name: shared-volume |
| mountPath: /config |
| volumes: |
| - name: wowza-logs |
| hostPath: |
| path: /var/log |
| - name: wowza-conf |
| configMap: |
| name: wowza-config |
| items: |
| - key: wowza_config.sh |
| path: wowza_config.sh |
| - name: shared-volume |
| emptyDir: {} |