apiVersion: v1
data:
  nextepc.conf: |
      db_uri: mongodb://mongodb-svc/nextepc

      logger:
        file: /root/nextepc/install/var/log/nextepc/nextepc.log
        trace: 
            app: 1
            s1ap: 1
            nas: 1
            diameter: 1
            gtpv2: 1
            gtp: 1

      # 
      # parameter:
      #
      #  o Number of output streams per SCTP associations.
      #      sctp_streams: 30
      #
      #  o Disable use of IPv4 addresses (only IPv6)
      #      no_ipv4: true
      #
      #  o Disable use of IPv6 addresses (only IPv4)
      #      no_ipv6: true
      #
      #  o Prefer IPv4 instead of IPv6 for estabishing new GTP connections.
      #      prefer_ipv4: true
      #
      #  o Enable Multicast traffic to the UE
      #      multicast: true
      #
      #  o Disable Stateless Address Autoconfiguration for IPv6
      #      no_slaac: true
      #
      #
      parameter:
        no_ipv6: true

      mme:
        freeDiameter:
          identity: mme.localdomain
          realm: localdomain
          no_sctp: true
          # listen_on addr: both IP/FQDN are supported
          listen_on: 192.188.2.2
          load_extension:
            - module: /root/nextepc/lib/freeDiameter-1.2.1/extensions/dbg_msg_dumps/.libs/dbg_msg_dumps.so
              conf: 0x8888
            - module: /root/nextepc/lib/freeDiameter-1.2.1/extensions/dict_rfc5777/.libs/dict_rfc5777.so
            - module: /root/nextepc/lib/freeDiameter-1.2.1/extensions/dict_mip6i/.libs/dict_mip6i.so
            - module: /root/nextepc/lib/freeDiameter-1.2.1/extensions/dict_nasreq/.libs/dict_nasreq.so
            - module: /root/nextepc/lib/freeDiameter-1.2.1/extensions/dict_nas_mipv6/.libs/dict_nas_mipv6.so
            - module: /root/nextepc/lib/freeDiameter-1.2.1/extensions/dict_dcca/.libs/dict_dcca.so
            - module: /root/nextepc/lib/freeDiameter-1.2.1/extensions/dict_dcca_3gpp/.libs/dict_dcca_3gpp.so
            - module: /root/nextepc/lib/freeDiameter-1.2.1/extensions/dict_s6a/.libs/dict_s6a.so
          connect:
            - identity: hss.localdomain
              # remote addr: both IP/FQDN are supported
              addr: 192.188.2.3

      #
      #  <S1AP Server>>
      #
      #  o S1AP Server(all address avaiable)
      #    s1ap:
      #
      #  o S1AP Server(0.0.0.0:36412)
      #    s1ap:
      #      addr: 0.0.0.0
      #
      #  o S1AP Server(127.0.0.1:36412, [::1]:36412)
      #    s1ap:
      #      - addr: 127.0.0.1
      #      - addr: ::1

      #  o S1AP Server(different port)
      #    s1ap:
      #      - addr: 127.0.0.1
      #        port: 36413
      #
      #  o S1AP Server(address avaiable in `eth0` interface)
      #    s1ap:
      #      dev: eth0
      #
        s1ap:
          addr: 192.188.2.2
      #
      #  <GTP-C Server>>
      #
      #  o GTP-C Server(all address avaiable)
      #    gtpc:
      #
      #  o GTP-C Server(127.0.0.1:2123, [::1]:2123)
      #    gtpc:
      #      - addr: 127.0.0.1
      #      - addr: ::1
      #
        gtpc:

      #
      #  <GUMMEI>
      #
      #  o Multiple GUMMEI
      #    gummei: 
      #      - plmn_id:
      #          mcc: 001
      #          mnc: 01
      #        mme_gid: 2
      #        mme_code: 1
      #      - plmn_id:
      #          - mcc: 002
      #            mnc: 02
      #          - mcc: 003
      #            mnc: 03
      #        mme_gid: [3, 4]
      #        mme_code:
      #          - 2
      #          - 3
      #
        gummei: 
          plmn_id:
            mcc: 460
            mnc: 99
          mme_gid: 1
          mme_code: 1

      #
      #  <TAI>
      #
      #  o Multiple TAI
      #    tai:
      #      - plmn_id:
      #          mcc: 001
      #          mnc: 01
      #        tac: [1, 2, 3]
      #    tai:
      #      - plmn_id:
      #          mcc: 002
      #          mnc: 02
      #        tac: 4
      #      - plmn_id:
      #          mcc: 003
      #          mnc: 03
      #        tac: 5
      #    tai:
      #      - plmn_id:
      #          mcc: 004
      #          mnc: 04
      #        tac: [6, 7]
      #      - plmn_id:
      #          mcc: 005
      #          mnc: 05
      #        tac: 8
      #      - plmn_id:
      #          mcc: 006
      #          mnc: 06
      #        tac: [9, 10]
      #
        tai:
          plmn_id:
            mcc: 460
            mnc: 99
          tac: 1

        security:
            integrity_order : [ EIA1, EIA2, EIA0 ]
            ciphering_order : [ EEA0, EEA1, EEA2 ]

      #
      #  <Network Name>
      #    network_name:
      #        full: NextEPC
      #        short: Next
      #

        network_name:
            full: NextEPC

      hss:
        #freeDiameter: hss.conf
        freeDiameter:
          identity: hss.localdomain
          realm: localdomain
          no_sctp: true
          # listen addr: both IP/FQDN are supported
          listen_on: 192.188.2.3
          load_extension:
            - module: /root/nextepc/lib/freeDiameter-1.2.1/extensions/dbg_msg_dumps/.libs/dbg_msg_dumps.so
              conf: 0x8888
            - module: /root/nextepc/lib/freeDiameter-1.2.1/extensions/dict_rfc5777/.libs/dict_rfc5777.so
            - module: /root/nextepc/lib/freeDiameter-1.2.1/extensions/dict_mip6i/.libs/dict_mip6i.so
            - module: /root/nextepc/lib/freeDiameter-1.2.1/extensions/dict_nasreq/.libs/dict_nasreq.so
            - module: /root/nextepc/lib/freeDiameter-1.2.1/extensions/dict_nas_mipv6/.libs/dict_nas_mipv6.so
            - module: /root/nextepc/lib/freeDiameter-1.2.1/extensions/dict_dcca/.libs/dict_dcca.so
            - module: /root/nextepc/lib/freeDiameter-1.2.1/extensions/dict_dcca_3gpp/.libs/dict_dcca_3gpp.so
            - module: /root/nextepc/lib/freeDiameter-1.2.1/extensions/dict_s6a/.libs/dict_s6a.so
          connect:
            - identity: mme.localdomain
              # remote addr: both IP/FQDN are supported
              addr: 192.188.2.2

      sgw:
      #
      #  ------------------------ MME --------------------------
      #
      #  o Specify SGW addresses the GTP-C must connect to
      #
      #  o One SGW is defined. If prefer_ipv4 is not true, [fe80::2%lo] is selected.
      #    gtpc:
      #      addr:
      #        - 127.0.0.2
      #        - fe80::2%lo
      #
      #  o Two SGW are defined. MME selects SGW with round-robin manner per UE
      #    gtpc:
      #      - addr: 127.0.0.2
      #      - addr: fe80::2%lo
      #
      #  o Three SGW are defined. MME selects SGW with round-robin manner per UE
      #    gtpc:
      #      - addr
      #        - 127.0.0.2
      #        - fe80::2%lo
      #      - addr
      #        - 127.0.0.12
      #        - fe80::12%lo
      #      - name: sgw3.nextepc.org
      #
      #  ------------------------ SGW --------------------------
      #
      #  o GTP-C Server(127.0.0.2:2123, [fe80::2%lo]:2123)
      #    gtpc:
      #      addr:
      #        - 127.0.0.2
      #        - fe80::2%lo
      #
      #  o On SGW, Same Configuration(127.0.0.2:2123, [fe80::2%lo]:2123) as below.
      #    gtpc:
      #      - addr: 127.0.0.2
      #      - addr: fe80::2%lo
      #
        gtpc:
          addr: 192.188.2.4

      #
      #  <GTP-U Server>>
      #
      #  o GTP-U Server(all address avaiable)
      #    gtpu:
      #    
        gtpu:
          addr: 192.188.2.4
      pgw:
        #freeDiameter: pgw.conf
        freeDiameter:
          identity: pgw.localdomain
          realm: localdomain
          no_sctp: true
          # listen addr: both IP/FQDN are supported
          listen_on: 192.188.2.5
          load_extension:
            - module: /root/nextepc/lib/freeDiameter-1.2.1/extensions/dbg_msg_dumps/.libs/dbg_msg_dumps.so
              conf: 0x8888
            - module: /root/nextepc/lib/freeDiameter-1.2.1/extensions/dict_rfc5777/.libs/dict_rfc5777.so
            - module: /root/nextepc/lib/freeDiameter-1.2.1/extensions/dict_mip6i/.libs/dict_mip6i.so
            - module: /root/nextepc/lib/freeDiameter-1.2.1/extensions/dict_nasreq/.libs/dict_nasreq.so
            - module: /root/nextepc/lib/freeDiameter-1.2.1/extensions/dict_nas_mipv6/.libs/dict_nas_mipv6.so
            - module: /root/nextepc/lib/freeDiameter-1.2.1/extensions/dict_dcca/.libs/dict_dcca.so
            - module: /root/nextepc/lib/freeDiameter-1.2.1/extensions/dict_dcca_3gpp/.libs/dict_dcca_3gpp.so
          connect:
            - identity: pcrf.localdomain
              # remote addr: both IP/FQDN are supported
              addr: 192.188.2.6

      #
      #  ------------------------ MME --------------------------
      #
      #  o Only first node is attempted. Others are ignored.
      #  o if HSS provide PGW addresss(per-UE), DB overwrites YAML-configuration.
      #
      #  o Two PGW are defined. 127.0.0.3:2123 is attempted. [fe80::3%lo]:2123 is ignored.
      #    gtpc:
      #      - addr: 127.0.0.3
      #      - addr: fe80::3%lo
      #
      #  o One PGW is defined. if prefer_ipv4 is not true, [fe80::3%lo] is selected.
      #    gtpc:
      #      - addr: 
      #        - 127.0.0.3
      #        - fe80::3%lo
      #
      #  ------------------------ PGW --------------------------
      #
      #  o GTP-C Server(127.0.0.3:2123, [fe80::3%lo]:2123)
      #    gtpc:
      #      addr:
      #        - 127.0.0.3
      #        - fe80::3%lo
      #
      #  o On PGW, Same configuration(127.0.0.3:2123, [fe80::3%lo]:2123) as below.
      #    gtpc:
      #      - addr: 127.0.0.3
      #      - addr: fe80::3%lo
      #
        gtpc:
          addr:
            - 192.188.2.5
            - ::1

      #
      #  <GTP-U Server>>
      #
      #  o GTP-U Server(127.0.0.3:2152, [::1]:2152)
      #    gtpu:
      #      - addr: 127.0.0.3
      #      - addr: ::1
      #
      #  o Same configuration(127.0.0.3:2152, [::1]:2152) as below.
      #    gtpu:
      #      name: localhost
      #
        gtpu:
          - addr: 192.188.2.5
          - addr: ::1

      #
      #  <UE Pool>
      #
      #  o IPv4 Pool
      #    $ sudo ip addr add 45.45.0.1/16 dev pgwtun
      #
      #    ue_pool:
      #      addr: 45.45.0.1/16
      #
      #  o IPv4/IPv6 Pool
      #    $ sudo ip addr add 45.45.0.1/16 dev pgwtun
      #    $ sudo ip addr add cafe:1::1/64 dev pgwtun
      #
      #    ue_pool:
      #      - addr: 45.45.0.1/16
      #      - addr: cafe:1::1/64
      #
      #
      #  o Specific APN(e.g 'volte') uses 45.46.0.1/16, cafe:2::1/64
      #    All other APNs use 45.45.0.1/16, cafe:1::1/64
      #    $ sudo ip addr add 45.45.0.1/16 dev pgwtun
      #    $ sudo ip addr add 45.46.0.1/16 dev pgwtun
      #    $ sudo ip addr add cafe:1::1/64 dev pgwtun
      #    $ sudo ip addr add cafe:2::1/64 dev pgwtun
      #
      #    ue_pool:
      #      - addr: 45.45.0.1/16
      #      - addr: cafe:1::1/64
      #      - addr: 45.46.0.1/16
      #        apn: volte
      #      - addr: cafe:2::1/64
      #        apn: volte
      #
      #  o Multiple Devices (default: pgwtun)
      #    $ sudo ip addr add 45.45.0.1/16 dev pgwtun
      #    $ sudo ip addr add cafe:1::1/64 dev pgwtun2
      #    $ sudo ip addr add 45.46.0.1/16 dev pgwtun3
      #    $ sudo ip addr add cafe:2::1/64 dev pgwtun3
      #
      #    ue_pool:
      #      - addr: 45.45.0.1/16
      #      - addr: cafe:1::1/64
      #        dev: pgwtun2
      #      - addr: 45.46.0.1/16
      #        apn: volte
      #        dev: pgwtun3
      #      - addr: cafe:2::1/64
      #        apn: volte
      #        dev: pgwtun3
      #
        ue_pool:
          - addr: 45.45.0.1/16
          - addr: cafe::1/64

      #
      #  <Domain Name Server>
      #
      #  o Primary/Secondary can be configured. Others are ignored.
      #
        dns:
          - 8.8.8.8
          - 8.8.4.4
          - 2001:4860:4860::8888
          - 2001:4860:4860::8844

      #
      #  <P-CSCF>
      #
      #  o Proxy Call Session Control Function
      #
      #    p-cscf:
      #      - 127.0.0.1
      #      - ::1
      #

      pcrf:
        #freeDiameter: pcrf.conf
        freeDiameter:
          identity: pcrf.localdomain
          realm: localdomain
          no_sctp: true
          # listen addr: both IP/FQDN are supported
          listen_on: 192.188.2.6
          load_extension:
            - module: /root/nextepc/lib/freeDiameter-1.2.1/extensions/dbg_msg_dumps/.libs/dbg_msg_dumps.so
              conf: 0x8888
            - module: /root/nextepc/lib/freeDiameter-1.2.1/extensions/dict_rfc5777/.libs/dict_rfc5777.so
            - module: /root/nextepc/lib/freeDiameter-1.2.1/extensions/dict_mip6i/.libs/dict_mip6i.so
            - module: /root/nextepc/lib/freeDiameter-1.2.1/extensions/dict_nasreq/.libs/dict_nasreq.so
            - module: /root/nextepc/lib/freeDiameter-1.2.1/extensions/dict_nas_mipv6/.libs/dict_nas_mipv6.so
            - module: /root/nextepc/lib/freeDiameter-1.2.1/extensions/dict_dcca/.libs/dict_dcca.so
            - module: /root/nextepc/lib/freeDiameter-1.2.1/extensions/dict_dcca_3gpp/.libs/dict_dcca_3gpp.so
          connect:
            - identity: pgw.localdomain
              # remote addr: both IP/FQDN are supported
              addr: 192.168.2.5
 
kind: ConfigMap
metadata:
  name: nextepc-config

