blob: 66169989121d6a0e4e416db091902960df5023ec [file] [log] [blame]
badhri854c028b32021-11-03 18:24:05 -05001{{/*
2# Copyright 2019-present Open Networking Foundation
3
4# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
5*/}}
6
7{{- if .Values.config.spgwc.deploy }}
8{{- if not .Values.config.useExistingConfigMap }}
9{{- $cpJson := index .Values.config.spgwc.cfgFiles "cp.json" }}
10{{- $global := index $cpJson "global" }}
11{{- $configJson := index .Values.config.spgwc.cfgFiles "config.json" }}
12{{- $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 }}
21{{- 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 }}
33---
34apiVersion: v1
35kind: ConfigMap
36metadata:
37 name: spgwc-configs
38 labels:
39{{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }}
40data:
41 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
54 ConnectPeer = {{ tuple "pcrf" "identity" . | include "omec-control-plane.diameter_endpoint" | quote }} { No_TLS; port = 3868; };
55
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";
95{{- range $key, $value := .Values.config.spgwc.cfgFiles }}
96 {{ $key }}: |-
97{{ toPrettyJson $value | indent 4 }}
98{{- end }}
99{{- end }}
100---
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 }}
110 spgwc-init.sh: |
111{{ tuple "bin/_spgwc-init.sh.tpl" . | include "omec-control-plane.template" | indent 4 }}
112{{- end }}