blob: dea3c0ae28041fd4bbe7d7c71f9148b4e999a5bd [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 Thakurc3cd6192020-10-12 20:12:38 -05008{{- $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 Ronquillo223db002020-06-05 10:28:22 -070019---
20apiVersion: v1
21kind: ConfigMap
22metadata:
23 name: spgwc
24 labels:
25{{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }}
26data:
Ajay Lotan Thakurb48ed2d2020-07-01 11:58:51 -070027 cp.cfg: |
28 [GLOBAL]
29 CP_TYPE = 03
Ajay Lotan Thakurc3cd6192020-10-12 20:12:38 -050030 GX_CONFIG = {{ .Values.config.spgwc.global.gx_config }}
Ajay Lotan Thakurb48ed2d2020-07-01 11:58:51 -070031 S5S8_PORT = 2123
Ajay Lotan Thakurb48ed2d2020-07-01 11:58:51 -070032 UPF_PFCP_PORT = 8805
Hyunsun Moon7f03a772020-09-27 23:23:50 -050033 S11_PORT = {{ .Values.config.spgwc.s11.port }}
34 PFCP_PORT = {{ .Values.config.spgwc.n4.port }}
Hyunsun Moon11d24f92020-08-26 14:55:19 -070035 PROMETHEUS_PORT = {{ .Values.config.spgwc.prometheus.port }}
Hyunsun Moon7f03a772020-09-27 23:23:50 -050036 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 Thakurb48ed2d2020-07-01 11:58:51 -070043 [NAMESERVER_CONFIG]
44 [CACHE]
Hyunsun Moon7f03a772020-09-27 23:23:50 -050045 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 Thakurb48ed2d2020-07-01 11:58:51 -070050 [APP]
Hyunsun Moon7f03a772020-09-27 23:23:50 -050051 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 Thakurb48ed2d2020-07-01 11:58:51 -070054 [OPS]
Hyunsun Moon7f03a772020-09-27 23:23:50 -050055 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 Thakurb48ed2d2020-07-01 11:58:51 -070058 [IP_POOL_CONFIG]
59 IP_POOL_IP= {{.Values.config.spgwc.ueIpPool.ip }}
60 IP_POOL_MASK= {{ .Values.config.spgwc.ueIpPool.mask }}
Ajay Lotan Thakurc3cd6192020-10-12 20:12:38 -050061 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 Ronquillo223db002020-06-05 10:28:22 -0700115 spgwc-run.sh: |
116{{ tuple "bin/_spgwc-run.sh.tpl" . | include "omec-control-plane.template" | indent 4 }}
Ajay Lotan Thakurb48ed2d2020-07-01 11:58:51 -0700117{{- range $key, $value := .Values.config.spgwc.jsonCfgFiles }}
Hyunsun Moon11d24f92020-08-26 14:55:19 -0700118 {{ $key }}: |-
119{{ toPrettyJson $value | indent 4 }}
Ajay Lotan Thakurb48ed2d2020-07-01 11:58:51 -0700120{{- end }}
Hyunsun Moon83ff7352020-07-09 11:03:52 -0700121{{- end }}