blob: e7719236455fa30a6b5fc46add7516cb357eab9b [file] [log] [blame]
Jeremy Ronquillo223db002020-06-05 10:28:22 -07001{{/*
Jeremy Ronquilloec2d3e42020-06-05 11:33:39 -07002# Copyright 2019-present Open Networking Foundation
Jeremy Ronquillo223db002020-06-05 10:28:22 -07003
Jeremy Ronquillo6046ce32020-06-18 11:06:29 -07004# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
Jeremy Ronquillo223db002020-06-05 10:28:22 -07005*/}}
6
Hyunsun Moon83ff7352020-07-09 11:03:52 -07007{{- if .Values.config.spgwc.deploy }}
Ajay Lotan Thakureb7bb5b2021-03-08 15:00:49 -06008{{- $cpJson := index .Values.config.spgwc.jsonCfgFiles "cp.json" }}
9{{- $global := index $cpJson "global" }}
Ajay Lotan Thakurc3cd6192020-10-12 20:12:38 -050010{{- $configJson := index .Values.config.spgwc.jsonCfgFiles "config.json" }}
11{{- $configJsonSpgwc := index $configJson "spgwc" }}
12{{- $configJsonGx := index $configJson "gx" }}
13
14{{- if not (hasKey $configJsonGx "host") -}}
15{{- $_ := tuple "pcrf" "identity" . | include "omec-control-plane.diameter_endpoint" | set $configJsonGx "host" -}}
16{{- end }}
17{{- if not (hasKey $configJsonGx "realm") -}}
18{{- $_ := tuple "pcrf" "realm" . | include "omec-control-plane.diameter_endpoint" | set $configJsonGx "realm" -}}
19{{- end }}
Ajay Lotan Thakureb7bb5b2021-03-08 15:00:49 -060020{{- if not (hasKey $global "httpPort") -}}
21{{- $_ := .Values.config.spgwc.rest.port | set $global "httpPort" -}}
22{{- end }}
23{{- if not (hasKey $global "pfcpPort") -}}
24{{- $_ := .Values.config.spgwc.n4.port | set $global "pfcpPort" -}}
25{{- end }}
26{{- if not (hasKey $global "s11Port") -}}
27{{- $_ := .Values.config.spgwc.s11.port | set $global "s11Port" -}}
28{{- end }}
29{{- if not (hasKey $global "prometheusPort") -}}
30{{- $_ := .Values.config.spgwc.prometheus.port | set $global "prometheusPort" -}}
31{{- end }}
Jeremy Ronquillo223db002020-06-05 10:28:22 -070032---
33apiVersion: v1
34kind: ConfigMap
35metadata:
36 name: spgwc
37 labels:
38{{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }}
39data:
Ajay Lotan Thakurb48ed2d2020-07-01 11:58:51 -070040 cp.cfg: |
41 [GLOBAL]
42 CP_TYPE = 03
Ajay Lotan Thakurc3cd6192020-10-12 20:12:38 -050043 GX_CONFIG = {{ .Values.config.spgwc.global.gx_config }}
Ajay Lotan Thakurf8f9bae2020-12-08 12:09:26 -070044 URR_CONFIG = {{ .Values.config.spgwc.global.urr_config }}
45 LOGGING_LEVEL = {{ .Values.config.spgwc.global.logging_level}}
Ajay Lotan Thakurb48ed2d2020-07-01 11:58:51 -070046 S5S8_PORT = 2123
Ajay Lotan Thakurb48ed2d2020-07-01 11:58:51 -070047 UPF_PFCP_PORT = 8805
Hyunsun Moon7f03a772020-09-27 23:23:50 -050048 S11_PORT = {{ .Values.config.spgwc.s11.port }}
49 PFCP_PORT = {{ .Values.config.spgwc.n4.port }}
Hyunsun Moon11d24f92020-08-26 14:55:19 -070050 PROMETHEUS_PORT = {{ .Values.config.spgwc.prometheus.port }}
Hyunsun Moon7f03a772020-09-27 23:23:50 -050051 HTTP_PORT = {{ .Values.config.spgwc.rest.port }}
52 TRANSMIT_TIMER = {{ .Values.config.spgwc.global.transmitTimerSec }}
53 PERIODIC_TIMER = {{ .Values.config.spgwc.global.periodicTimerSec }}
54 TRANSMIT_COUNT = {{ .Values.config.spgwc.global.transmitCount }}
55 REQUEST_TIMEOUT = {{ .Values.config.spgwc.global.requestTimeoutMilliSec }}
56 REQUEST_TRIES = {{ .Values.config.spgwc.global.requestTries }}
57 CP_LOGGER = {{ .Values.config.spgwc.global.cpLogger }}
Ajay Lotan Thakurb48ed2d2020-07-01 11:58:51 -070058 [NAMESERVER_CONFIG]
59 [CACHE]
Hyunsun Moon7f03a772020-09-27 23:23:50 -050060 concurrent = {{ .Values.config.spgwc.dns.cache.concurrent }}
61 percentage = {{ .Values.config.spgwc.dns.cache.percentage }}
62 interval_seconds = {{ .Values.config.spgwc.dns.cache.intervalSec }}
63 query_timeout_ms = {{ .Values.config.spgwc.dns.cache.queryTimeoutMilliSec }}
64 query_tries = {{ .Values.config.spgwc.dns.cache.queryTries }}
Ajay Lotan Thakurb48ed2d2020-07-01 11:58:51 -070065 [APP]
Hyunsun Moon7f03a772020-09-27 23:23:50 -050066 frequency_seconds = {{ .Values.config.spgwc.dns.app.frequencySec }}
67 filename = {{ .Values.config.spgwc.dns.app.filename }}
68 nameserver = {{ .Values.config.spgwc.dns.app.nameserver }}
Ajay Lotan Thakurb48ed2d2020-07-01 11:58:51 -070069 [OPS]
Hyunsun Moon7f03a772020-09-27 23:23:50 -050070 frequency_seconds = {{ .Values.config.spgwc.dns.ops.frequencySec }}
71 filename = {{ .Values.config.spgwc.dns.ops.filename }}
72 nameserver = {{ .Values.config.spgwc.dns.ops.nameserver }}
Ajay Lotan Thakurb48ed2d2020-07-01 11:58:51 -070073 [IP_POOL_CONFIG]
74 IP_POOL_IP= {{.Values.config.spgwc.ueIpPool.ip }}
75 IP_POOL_MASK= {{ .Values.config.spgwc.ueIpPool.mask }}
Ajay Lotan Thakurac5c1812021-02-22 12:23:20 -060076 [STATIC_IP_POOL_CONFIG]
77 IP_POOL_IP= {{.Values.config.spgwc.staticUeIpPool.ip }}
78 IP_POOL_MASK= {{ .Values.config.spgwc.staticUeIpPool.mask }}
79
Ajay Lotan Thakurc3cd6192020-10-12 20:12:38 -050080 gx.conf: |
81 Identity = {{ tuple "spgwc" "identity" . | include "omec-control-plane.diameter_endpoint" | quote }};
82 Realm = {{ tuple "spgwc" "realm" . | include "omec-control-plane.diameter_endpoint" | quote }};
83 TLS_Cred = "config/{{ tuple "spgwc" "host" . | include "omec-control-plane.diameter_endpoint" }}.cert.pem",
84 "config/{{ tuple "spgwc" "host" . | include "omec-control-plane.diameter_endpoint" }}.key.pem";
85 TLS_CA = "config/cacert.pem";
86 AppServThreads = 40;
87 SCTP_streams = 3;
88 NoRelay;
89 No_IPv6;
90 #Port = 3868;
91 #SecPort = 3869;
92
93 ConnectPeer = {{ index $configJsonGx "host" | quote }} { No_TLS; port = 3868; };
94
95 LoadExtension = "/usr/local/lib/freeDiameter/dict_3gpp2_avps.fdx";
96 LoadExtension = "/usr/local/lib/freeDiameter/dict_draftload_avps.fdx";
97 LoadExtension = "/usr/local/lib/freeDiameter/dict_etsi283034_avps.fdx";
98 LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc4004_avps.fdx";
99 LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc4006bis_avps.fdx";
100 LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc4072_avps.fdx";
101 LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc4590_avps.fdx";
102 LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc5447_avps.fdx";
103 LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc5580_avps.fdx";
104 LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc5777_avps.fdx";
105 LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc5778_avps.fdx";
106 LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc6734_avps.fdx";
107 LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc6942_avps.fdx";
108 LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc7155_avps.fdx";
109 LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc7683_avps.fdx";
110 LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc7944_avps.fdx";
111 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29061_avps.fdx";
112 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29128_avps.fdx";
113 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29154_avps.fdx";
114 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29173_avps.fdx";
115 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29212_avps.fdx";
116 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29214_avps.fdx";
117 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29215_avps.fdx";
118 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29217_avps.fdx";
119 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29229_avps.fdx";
120 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29272_avps.fdx";
121 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29273_avps.fdx";
122 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29329_avps.fdx";
123 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29336_avps.fdx";
124 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29337_avps.fdx";
125 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29338_avps.fdx";
126 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29343_avps.fdx";
127 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29344_avps.fdx";
128 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29345_avps.fdx";
129 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29368_avps.fdx";
130 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29468_avps.fdx";
131 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts32299_avps.fdx";
132 LoadExtension = "/usr/local/lib/freeDiameter/dict_CreditControl.fdx";
133 LoadExtension = "/usr/local/lib/freeDiameter/dict_Gx.fdx";
Jeremy Ronquillo223db002020-06-05 10:28:22 -0700134 spgwc-run.sh: |
135{{ tuple "bin/_spgwc-run.sh.tpl" . | include "omec-control-plane.template" | indent 4 }}
Ajay Lotan Thakurb48ed2d2020-07-01 11:58:51 -0700136{{- range $key, $value := .Values.config.spgwc.jsonCfgFiles }}
Hyunsun Moon11d24f92020-08-26 14:55:19 -0700137 {{ $key }}: |-
138{{ toPrettyJson $value | indent 4 }}
Ajay Lotan Thakurb48ed2d2020-07-01 11:58:51 -0700139{{- end }}
Hyunsun Moon83ff7352020-07-09 11:03:52 -0700140{{- end }}