blob: 8d5d61ce4304b78281ddd565cdcae42c6824cb93 [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 }}
Hyunsun Moond9a09e82021-03-17 12:16:53 -07008{{- if not .Values.config.useExistingConfigMap }}
Hyunsun Moonb76c6f02021-06-04 10:24:10 -07009{{- $cpJson := index .Values.config.spgwc.cfgFiles "cp.json" }}
Ajay Lotan Thakureb7bb5b2021-03-08 15:00:49 -060010{{- $global := index $cpJson "global" }}
Hyunsun Moonb76c6f02021-06-04 10:24:10 -070011{{- $configJson := index .Values.config.spgwc.cfgFiles "config.json" }}
Ajay Lotan Thakurc3cd6192020-10-12 20:12:38 -050012{{- $configJsonSpgwc := index $configJson "spgwc" }}
13{{- $configJsonGx := index $configJson "gx" }}
14
15{{- if not (hasKey $configJsonGx "host") -}}
16{{- $_ := tuple "pcrf" "identity" . | include "omec-control-plane.diameter_endpoint" | set $configJsonGx "host" -}}
17{{- end }}
18{{- if not (hasKey $configJsonGx "realm") -}}
19{{- $_ := tuple "pcrf" "realm" . | include "omec-control-plane.diameter_endpoint" | set $configJsonGx "realm" -}}
20{{- end }}
Ajay Lotan Thakureb7bb5b2021-03-08 15:00:49 -060021{{- if not (hasKey $global "httpPort") -}}
22{{- $_ := .Values.config.spgwc.rest.port | set $global "httpPort" -}}
23{{- end }}
24{{- if not (hasKey $global "pfcpPort") -}}
25{{- $_ := .Values.config.spgwc.n4.port | set $global "pfcpPort" -}}
26{{- end }}
27{{- if not (hasKey $global "s11Port") -}}
28{{- $_ := .Values.config.spgwc.s11.port | set $global "s11Port" -}}
29{{- end }}
30{{- if not (hasKey $global "prometheusPort") -}}
31{{- $_ := .Values.config.spgwc.prometheus.port | set $global "prometheusPort" -}}
32{{- end }}
Jeremy Ronquillo223db002020-06-05 10:28:22 -070033---
34apiVersion: v1
35kind: ConfigMap
36metadata:
Hyunsun Moon1fc24472021-03-14 19:10:11 -050037 name: spgwc-configs
Jeremy Ronquillo223db002020-06-05 10:28:22 -070038 labels:
39{{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }}
40data:
Ajay Lotan Thakurc3cd6192020-10-12 20:12:38 -050041 gx.conf: |
42 Identity = {{ tuple "spgwc" "identity" . | include "omec-control-plane.diameter_endpoint" | quote }};
43 Realm = {{ tuple "spgwc" "realm" . | include "omec-control-plane.diameter_endpoint" | quote }};
44 TLS_Cred = "config/{{ tuple "spgwc" "host" . | include "omec-control-plane.diameter_endpoint" }}.cert.pem",
45 "config/{{ tuple "spgwc" "host" . | include "omec-control-plane.diameter_endpoint" }}.key.pem";
46 TLS_CA = "config/cacert.pem";
47 AppServThreads = 40;
48 SCTP_streams = 3;
49 NoRelay;
50 No_IPv6;
51 #Port = 3868;
52 #SecPort = 3869;
53
Hyunsun Moond9a09e82021-03-17 12:16:53 -070054 ConnectPeer = {{ tuple "pcrf" "identity" . | include "omec-control-plane.diameter_endpoint" | quote }} { No_TLS; port = 3868; };
Ajay Lotan Thakurc3cd6192020-10-12 20:12:38 -050055
56 LoadExtension = "/usr/local/lib/freeDiameter/dict_3gpp2_avps.fdx";
57 LoadExtension = "/usr/local/lib/freeDiameter/dict_draftload_avps.fdx";
58 LoadExtension = "/usr/local/lib/freeDiameter/dict_etsi283034_avps.fdx";
59 LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc4004_avps.fdx";
60 LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc4006bis_avps.fdx";
61 LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc4072_avps.fdx";
62 LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc4590_avps.fdx";
63 LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc5447_avps.fdx";
64 LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc5580_avps.fdx";
65 LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc5777_avps.fdx";
66 LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc5778_avps.fdx";
67 LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc6734_avps.fdx";
68 LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc6942_avps.fdx";
69 LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc7155_avps.fdx";
70 LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc7683_avps.fdx";
71 LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc7944_avps.fdx";
72 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29061_avps.fdx";
73 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29128_avps.fdx";
74 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29154_avps.fdx";
75 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29173_avps.fdx";
76 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29212_avps.fdx";
77 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29214_avps.fdx";
78 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29215_avps.fdx";
79 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29217_avps.fdx";
80 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29229_avps.fdx";
81 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29272_avps.fdx";
82 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29273_avps.fdx";
83 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29329_avps.fdx";
84 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29336_avps.fdx";
85 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29337_avps.fdx";
86 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29338_avps.fdx";
87 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29343_avps.fdx";
88 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29344_avps.fdx";
89 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29345_avps.fdx";
90 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29368_avps.fdx";
91 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29468_avps.fdx";
92 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts32299_avps.fdx";
93 LoadExtension = "/usr/local/lib/freeDiameter/dict_CreditControl.fdx";
94 LoadExtension = "/usr/local/lib/freeDiameter/dict_Gx.fdx";
Hyunsun Moonb76c6f02021-06-04 10:24:10 -070095{{- range $key, $value := .Values.config.spgwc.cfgFiles }}
Hyunsun Moon11d24f92020-08-26 14:55:19 -070096 {{ $key }}: |-
97{{ toPrettyJson $value | indent 4 }}
Ajay Lotan Thakurb48ed2d2020-07-01 11:58:51 -070098{{- end }}
Hyunsun Moond9a09e82021-03-17 12:16:53 -070099{{- end }}
Hyunsun Moon1fc24472021-03-14 19:10:11 -0500100---
101apiVersion: v1
102kind: ConfigMap
103metadata:
104 name: spgwc-scripts
105 labels:
106{{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }}
107data:
108 spgwc-run.sh: |
109{{ tuple "bin/_spgwc-run.sh.tpl" . | include "omec-control-plane.template" | indent 4 }}
Hyunsun Moon83ff7352020-07-09 11:03:52 -0700110{{- end }}