---
# Copyright 2019-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.

images:
  tags:
    nginx: docker.io/omecproject/cdn-nginx:1.0.0
  pullPolicy: IfNotPresent

nodeSelectors:
  enabled: false
  nginx:
    label: nginx
    value: enabled

resources:
  enabled: true
  nginx:
    requests:
      cpu: 3
      memory: 1Gi
    limits:
      cpu: 3
      memory: 1Gi

config:
  sriov:
    enabled: true # If you want to use Host Network, please unset this flag.
    netDevice:
      pfNames:
        - eno2
      drivers:
        - ixgbevf
        - i40evf
  nginx:
    ports:
      rtmp: 1935
      http: 8085
      nodePorts:
        enabled: true
        rtmp: 31935
        http: 31885
    # In case sriov is enabled, additional interface connected to sgi-network directly will be added
    # with the name and address specified below.
    # Otherwise, specify the interface name connected to SGI network in the host machine.
    # IP address will be ignored in that case.
    sgiInterface:
      name: sgi-net-cdn
      mtu: 1200
      ip: 192.168.250.249/24
    events:
      workerProcesses: 1
      workerConnections: 1024
    http:
      defaultType: application/octet-stream
      sendfile: "on"
      keepaliveTimeout: 65
      server:
        serverName: localhost
        location:
          root: html
          index: index.html index.htm
        error:
          code: 500 502 503 504
          page: /50x.html
          root: html
    rtmp:
      chunkSize: 4000
      appRemote:
        name: r
        live: "on"
      appLocal:
        name: l
        movieLocation: /opt/cdn/movies
    replicas: 1
  cdnRemotes:
  - name: remote-1
    ip: 10.90.0.131
    port: 30935
    streams:
    - name: 360p
      value: 360
    - name: 480p
      value: 480
    - name: 720p
      value: 720
#  - name: CDN-Remote-2
#    ip: 10.90.0.151
#    port: 30935
#    streams:
#    - name: 360p
#      value: 360
#    - name: 480p
#      value: 480
#    - name: 720p
#      value: 720

networks:
  cniPlugin: sriov # which means netdevice
  ipam: static
  sgi:
    subnet: 192.168.250.0/24
    mask: 255.255.255.0
    gateway: 192.168.250.250
  ue:
    subnet: 10.250.0.0/16
