Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 1 | {{/* |
Jeremy Ronquillo | ec2d3e4 | 2020-06-05 11:33:39 -0700 | [diff] [blame] | 2 | # Copyright 2019-present Open Networking Foundation |
Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 3 | |
Jeremy Ronquillo | 6046ce3 | 2020-06-18 11:06:29 -0700 | [diff] [blame] | 4 | # SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0 |
Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 5 | */}} |
| 6 | |
Hyunsun Moon | 83ff735 | 2020-07-09 11:03:52 -0700 | [diff] [blame] | 7 | {{- if .Values.config.spgwc.deploy }} |
Ajay Lotan Thakur | c3cd619 | 2020-10-12 20:12:38 -0500 | [diff] [blame] | 8 | {{- $configJson := index .Values.config.spgwc.jsonCfgFiles "config.json" }} |
| 9 | {{- $configJsonSpgwc := index $configJson "spgwc" }} |
| 10 | {{- $configJsonGx := index $configJson "gx" }} |
| 11 | |
| 12 | {{- if not (hasKey $configJsonGx "host") -}} |
| 13 | {{- $_ := tuple "pcrf" "identity" . | include "omec-control-plane.diameter_endpoint" | set $configJsonGx "host" -}} |
| 14 | {{- end }} |
| 15 | {{- if not (hasKey $configJsonGx "realm") -}} |
| 16 | {{- $_ := tuple "pcrf" "realm" . | include "omec-control-plane.diameter_endpoint" | set $configJsonGx "realm" -}} |
| 17 | {{- end }} |
| 18 | |
Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 19 | --- |
| 20 | apiVersion: v1 |
| 21 | kind: ConfigMap |
| 22 | metadata: |
| 23 | name: spgwc |
| 24 | labels: |
| 25 | {{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }} |
| 26 | data: |
Ajay Lotan Thakur | b48ed2d | 2020-07-01 11:58:51 -0700 | [diff] [blame] | 27 | cp.cfg: | |
| 28 | [GLOBAL] |
| 29 | CP_TYPE = 03 |
Ajay Lotan Thakur | c3cd619 | 2020-10-12 20:12:38 -0500 | [diff] [blame] | 30 | GX_CONFIG = {{ .Values.config.spgwc.global.gx_config }} |
Ajay Lotan Thakur | b48ed2d | 2020-07-01 11:58:51 -0700 | [diff] [blame] | 31 | S5S8_PORT = 2123 |
Ajay Lotan Thakur | b48ed2d | 2020-07-01 11:58:51 -0700 | [diff] [blame] | 32 | UPF_PFCP_PORT = 8805 |
Hyunsun Moon | 7f03a77 | 2020-09-27 23:23:50 -0500 | [diff] [blame] | 33 | S11_PORT = {{ .Values.config.spgwc.s11.port }} |
| 34 | PFCP_PORT = {{ .Values.config.spgwc.n4.port }} |
Hyunsun Moon | 11d24f9 | 2020-08-26 14:55:19 -0700 | [diff] [blame] | 35 | PROMETHEUS_PORT = {{ .Values.config.spgwc.prometheus.port }} |
Hyunsun Moon | 7f03a77 | 2020-09-27 23:23:50 -0500 | [diff] [blame] | 36 | HTTP_PORT = {{ .Values.config.spgwc.rest.port }} |
| 37 | TRANSMIT_TIMER = {{ .Values.config.spgwc.global.transmitTimerSec }} |
| 38 | PERIODIC_TIMER = {{ .Values.config.spgwc.global.periodicTimerSec }} |
| 39 | TRANSMIT_COUNT = {{ .Values.config.spgwc.global.transmitCount }} |
| 40 | REQUEST_TIMEOUT = {{ .Values.config.spgwc.global.requestTimeoutMilliSec }} |
| 41 | REQUEST_TRIES = {{ .Values.config.spgwc.global.requestTries }} |
| 42 | CP_LOGGER = {{ .Values.config.spgwc.global.cpLogger }} |
Ajay Lotan Thakur | b48ed2d | 2020-07-01 11:58:51 -0700 | [diff] [blame] | 43 | [NAMESERVER_CONFIG] |
| 44 | [CACHE] |
Hyunsun Moon | 7f03a77 | 2020-09-27 23:23:50 -0500 | [diff] [blame] | 45 | concurrent = {{ .Values.config.spgwc.dns.cache.concurrent }} |
| 46 | percentage = {{ .Values.config.spgwc.dns.cache.percentage }} |
| 47 | interval_seconds = {{ .Values.config.spgwc.dns.cache.intervalSec }} |
| 48 | query_timeout_ms = {{ .Values.config.spgwc.dns.cache.queryTimeoutMilliSec }} |
| 49 | query_tries = {{ .Values.config.spgwc.dns.cache.queryTries }} |
Ajay Lotan Thakur | b48ed2d | 2020-07-01 11:58:51 -0700 | [diff] [blame] | 50 | [APP] |
Hyunsun Moon | 7f03a77 | 2020-09-27 23:23:50 -0500 | [diff] [blame] | 51 | frequency_seconds = {{ .Values.config.spgwc.dns.app.frequencySec }} |
| 52 | filename = {{ .Values.config.spgwc.dns.app.filename }} |
| 53 | nameserver = {{ .Values.config.spgwc.dns.app.nameserver }} |
Ajay Lotan Thakur | b48ed2d | 2020-07-01 11:58:51 -0700 | [diff] [blame] | 54 | [OPS] |
Hyunsun Moon | 7f03a77 | 2020-09-27 23:23:50 -0500 | [diff] [blame] | 55 | frequency_seconds = {{ .Values.config.spgwc.dns.ops.frequencySec }} |
| 56 | filename = {{ .Values.config.spgwc.dns.ops.filename }} |
| 57 | nameserver = {{ .Values.config.spgwc.dns.ops.nameserver }} |
Ajay Lotan Thakur | b48ed2d | 2020-07-01 11:58:51 -0700 | [diff] [blame] | 58 | [IP_POOL_CONFIG] |
| 59 | IP_POOL_IP= {{.Values.config.spgwc.ueIpPool.ip }} |
| 60 | IP_POOL_MASK= {{ .Values.config.spgwc.ueIpPool.mask }} |
Ajay Lotan Thakur | c3cd619 | 2020-10-12 20:12:38 -0500 | [diff] [blame] | 61 | gx.conf: | |
| 62 | Identity = {{ tuple "spgwc" "identity" . | include "omec-control-plane.diameter_endpoint" | quote }}; |
| 63 | Realm = {{ tuple "spgwc" "realm" . | include "omec-control-plane.diameter_endpoint" | quote }}; |
| 64 | TLS_Cred = "config/{{ tuple "spgwc" "host" . | include "omec-control-plane.diameter_endpoint" }}.cert.pem", |
| 65 | "config/{{ tuple "spgwc" "host" . | include "omec-control-plane.diameter_endpoint" }}.key.pem"; |
| 66 | TLS_CA = "config/cacert.pem"; |
| 67 | AppServThreads = 40; |
| 68 | SCTP_streams = 3; |
| 69 | NoRelay; |
| 70 | No_IPv6; |
| 71 | #Port = 3868; |
| 72 | #SecPort = 3869; |
| 73 | |
| 74 | ConnectPeer = {{ index $configJsonGx "host" | quote }} { No_TLS; port = 3868; }; |
| 75 | |
| 76 | LoadExtension = "/usr/local/lib/freeDiameter/dict_3gpp2_avps.fdx"; |
| 77 | LoadExtension = "/usr/local/lib/freeDiameter/dict_draftload_avps.fdx"; |
| 78 | LoadExtension = "/usr/local/lib/freeDiameter/dict_etsi283034_avps.fdx"; |
| 79 | LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc4004_avps.fdx"; |
| 80 | LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc4006bis_avps.fdx"; |
| 81 | LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc4072_avps.fdx"; |
| 82 | LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc4590_avps.fdx"; |
| 83 | LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc5447_avps.fdx"; |
| 84 | LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc5580_avps.fdx"; |
| 85 | LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc5777_avps.fdx"; |
| 86 | LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc5778_avps.fdx"; |
| 87 | LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc6734_avps.fdx"; |
| 88 | LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc6942_avps.fdx"; |
| 89 | LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc7155_avps.fdx"; |
| 90 | LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc7683_avps.fdx"; |
| 91 | LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc7944_avps.fdx"; |
| 92 | LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29061_avps.fdx"; |
| 93 | LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29128_avps.fdx"; |
| 94 | LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29154_avps.fdx"; |
| 95 | LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29173_avps.fdx"; |
| 96 | LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29212_avps.fdx"; |
| 97 | LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29214_avps.fdx"; |
| 98 | LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29215_avps.fdx"; |
| 99 | LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29217_avps.fdx"; |
| 100 | LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29229_avps.fdx"; |
| 101 | LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29272_avps.fdx"; |
| 102 | LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29273_avps.fdx"; |
| 103 | LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29329_avps.fdx"; |
| 104 | LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29336_avps.fdx"; |
| 105 | LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29337_avps.fdx"; |
| 106 | LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29338_avps.fdx"; |
| 107 | LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29343_avps.fdx"; |
| 108 | LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29344_avps.fdx"; |
| 109 | LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29345_avps.fdx"; |
| 110 | LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29368_avps.fdx"; |
| 111 | LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29468_avps.fdx"; |
| 112 | LoadExtension = "/usr/local/lib/freeDiameter/dict_ts32299_avps.fdx"; |
| 113 | LoadExtension = "/usr/local/lib/freeDiameter/dict_CreditControl.fdx"; |
| 114 | LoadExtension = "/usr/local/lib/freeDiameter/dict_Gx.fdx"; |
Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 115 | spgwc-run.sh: | |
| 116 | {{ tuple "bin/_spgwc-run.sh.tpl" . | include "omec-control-plane.template" | indent 4 }} |
Ajay Lotan Thakur | b48ed2d | 2020-07-01 11:58:51 -0700 | [diff] [blame] | 117 | {{- range $key, $value := .Values.config.spgwc.jsonCfgFiles }} |
Hyunsun Moon | 11d24f9 | 2020-08-26 14:55:19 -0700 | [diff] [blame] | 118 | {{ $key }}: |- |
| 119 | {{ toPrettyJson $value | indent 4 }} |
Ajay Lotan Thakur | b48ed2d | 2020-07-01 11:58:51 -0700 | [diff] [blame] | 120 | {{- end }} |
Hyunsun Moon | 83ff735 | 2020-07-09 11:03:52 -0700 | [diff] [blame] | 121 | {{- end }} |