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 }} |
Hyunsun Moon | d9a09e8 | 2021-03-17 12:16:53 -0700 | [diff] [blame] | 8 | {{- if not .Values.config.useExistingConfigMap }} |
Hyunsun Moon | b76c6f0 | 2021-06-04 10:24:10 -0700 | [diff] [blame^] | 9 | {{- $cpJson := index .Values.config.spgwc.cfgFiles "cp.json" }} |
Ajay Lotan Thakur | eb7bb5b | 2021-03-08 15:00:49 -0600 | [diff] [blame] | 10 | {{- $global := index $cpJson "global" }} |
Hyunsun Moon | b76c6f0 | 2021-06-04 10:24:10 -0700 | [diff] [blame^] | 11 | {{- $configJson := index .Values.config.spgwc.cfgFiles "config.json" }} |
Ajay Lotan Thakur | c3cd619 | 2020-10-12 20:12:38 -0500 | [diff] [blame] | 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 }} |
Ajay Lotan Thakur | eb7bb5b | 2021-03-08 15:00:49 -0600 | [diff] [blame] | 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 }} |
Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 33 | --- |
| 34 | apiVersion: v1 |
| 35 | kind: ConfigMap |
| 36 | metadata: |
Hyunsun Moon | 1fc2447 | 2021-03-14 19:10:11 -0500 | [diff] [blame] | 37 | name: spgwc-configs |
Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 38 | labels: |
| 39 | {{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }} |
| 40 | data: |
Ajay Lotan Thakur | c3cd619 | 2020-10-12 20:12:38 -0500 | [diff] [blame] | 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 | |
Hyunsun Moon | d9a09e8 | 2021-03-17 12:16:53 -0700 | [diff] [blame] | 54 | ConnectPeer = {{ tuple "pcrf" "identity" . | include "omec-control-plane.diameter_endpoint" | quote }} { No_TLS; port = 3868; }; |
Ajay Lotan Thakur | c3cd619 | 2020-10-12 20:12:38 -0500 | [diff] [blame] | 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"; |
Hyunsun Moon | b76c6f0 | 2021-06-04 10:24:10 -0700 | [diff] [blame^] | 95 | {{- range $key, $value := .Values.config.spgwc.cfgFiles }} |
Hyunsun Moon | 11d24f9 | 2020-08-26 14:55:19 -0700 | [diff] [blame] | 96 | {{ $key }}: |- |
| 97 | {{ toPrettyJson $value | indent 4 }} |
Ajay Lotan Thakur | b48ed2d | 2020-07-01 11:58:51 -0700 | [diff] [blame] | 98 | {{- end }} |
Hyunsun Moon | d9a09e8 | 2021-03-17 12:16:53 -0700 | [diff] [blame] | 99 | {{- end }} |
Hyunsun Moon | 1fc2447 | 2021-03-14 19:10:11 -0500 | [diff] [blame] | 100 | --- |
| 101 | apiVersion: v1 |
| 102 | kind: ConfigMap |
| 103 | metadata: |
| 104 | name: spgwc-scripts |
| 105 | labels: |
| 106 | {{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }} |
| 107 | data: |
| 108 | spgwc-run.sh: | |
| 109 | {{ tuple "bin/_spgwc-run.sh.tpl" . | include "omec-control-plane.template" | indent 4 }} |
Hyunsun Moon | 83ff735 | 2020-07-09 11:03:52 -0700 | [diff] [blame] | 110 | {{- end }} |