Ajay Lotan Thakur | c3cd619 | 2020-10-12 20:12:38 -0500 | [diff] [blame] | 1 | {{/* |
| 2 | # Copyright 2020-present Open Networking Foundation |
| 3 | |
| 4 | # SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0 |
| 5 | |
| 6 | Default values for mcord-vepc-helm. |
| 7 | This is a YAML-formatted file. |
| 8 | Declare variables to be passed into your templates. |
| 9 | */}} |
| 10 | |
| 11 | {{- if .Values.config.pcrf.deploy }} |
Hyunsun Moon | d9a09e8 | 2021-03-17 12:16:53 -0700 | [diff] [blame] | 12 | {{- if not .Values.config.useExistingConfigMap }} |
Ajay Lotan Thakur | c3cd619 | 2020-10-12 20:12:38 -0500 | [diff] [blame] | 13 | {{- $pcrfJson := index .Values.config.pcrf.cfgFiles "pcrf.json" }} |
| 14 | {{- $pcrfJsonCommon := index $pcrfJson "common" }} |
| 15 | {{- $pcrfJsonHss := index $pcrfJson "pcrf" }} |
| 16 | |
| 17 | {{- $_ := .Values.config.pcrf.prometheus.port | set $pcrfJsonCommon "prom_port" -}} |
| 18 | {{- if not (hasKey $pcrfJsonCommon "originhost") -}} |
| 19 | {{- $_ := tuple "pcrf" "identity" . | include "omec-control-plane.diameter_endpoint" | set $pcrfJsonCommon "originhost" -}} |
| 20 | {{- end }} |
| 21 | {{- if not (hasKey $pcrfJsonCommon "originrealm") -}} |
| 22 | {{- $_ := tuple "pcrf" "realm" . | include "omec-control-plane.diameter_endpoint" | set $pcrfJsonCommon "originrealm" -}} |
| 23 | {{- end }} |
| 24 | {{- if not (hasKey $pcrfJsonHss "casssrv") -}} |
| 25 | {{- $_ := .Values.cassandra.fullnameOverride | set $pcrfJsonHss "casssrv" -}} |
| 26 | {{- end }} |
Ajay Lotan Thakur | dad35d3 | 2021-03-18 12:21:21 -0500 | [diff] [blame] | 27 | {{- if not (hasKey $pcrfJsonHss "restport") -}} |
| 28 | {{- $_ := .Values.config.pcrf.configPort.port | set $pcrfJsonHss "restport" -}} |
| 29 | {{- end }} |
Ajay Lotan Thakur | c3cd619 | 2020-10-12 20:12:38 -0500 | [diff] [blame] | 30 | --- |
| 31 | apiVersion: v1 |
| 32 | kind: ConfigMap |
| 33 | metadata: |
Hyunsun Moon | 1fc2447 | 2021-03-14 19:10:11 -0500 | [diff] [blame] | 34 | name: pcrf-configs |
Ajay Lotan Thakur | c3cd619 | 2020-10-12 20:12:38 -0500 | [diff] [blame] | 35 | labels: |
| 36 | {{ tuple "pcrf" . | include "omec-control-plane.metadata_labels" | indent 4 }} |
| 37 | data: |
| 38 | acl.conf: | |
| 39 | {{- if hasKey .Values.config.pcrf.acl "oldTls" }} |
| 40 | ALLOW_OLD_TLS {{ .Values.config.pcrf.acl.oldTls }} |
| 41 | {{- end }} |
| 42 | {{- if hasKey .Values.config.pcrf.acl "ipSec" }} |
| 43 | ALLOW_IPSEC {{ .Values.config.pcrf.acl.ipSec }} |
| 44 | {{- end }} |
| 45 | pcrf.conf: | |
| 46 | Identity = {{ tuple "pcrf" "identity" . | include "omec-control-plane.diameter_endpoint" | quote }}; |
| 47 | Realm = {{ tuple "pcrf" "realm" . | include "omec-control-plane.diameter_endpoint" | quote }}; |
| 48 | TLS_Cred = "/opt/c3po/pcrf/conf/{{ tuple "pcrf" "host" . | include "omec-control-plane.diameter_endpoint" }}.cert.pem", |
| 49 | "/opt/c3po/pcrf/conf/{{ tuple "pcrf" "host" . | include "omec-control-plane.diameter_endpoint" }}.key.pem"; |
| 50 | TLS_CA = "/opt/c3po/pcrf/conf/cacert.pem"; |
| 51 | No_SCTP; |
| 52 | Prefer_TCP; |
| 53 | No_IPv6; |
| 54 | SCTP_streams = 3; |
| 55 | NoRelay; |
| 56 | AppServThreads = 4; |
| 57 | Port = 3868; |
| 58 | SecPort = 5868; |
| 59 | LoadExtension = "/usr/local/lib/freeDiameter/acl_wl.fdx" : "/opt/c3po/pcrf/conf/acl.conf"; |
| 60 | LoadExtension = "/usr/local/lib/freeDiameter/dict_3gpp2_avps.fdx"; |
| 61 | LoadExtension = "/usr/local/lib/freeDiameter/dict_draftload_avps.fdx"; |
| 62 | LoadExtension = "/usr/local/lib/freeDiameter/dict_etsi283034_avps.fdx"; |
| 63 | LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc4004_avps.fdx"; |
| 64 | LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc4006bis_avps.fdx"; |
| 65 | LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc4072_avps.fdx"; |
| 66 | LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc4590_avps.fdx"; |
| 67 | LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc5447_avps.fdx"; |
| 68 | LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc5580_avps.fdx"; |
| 69 | LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc5777_avps.fdx"; |
| 70 | LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc5778_avps.fdx"; |
| 71 | LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc6734_avps.fdx"; |
| 72 | LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc6942_avps.fdx"; |
| 73 | LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc7155_avps.fdx"; |
| 74 | LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc7683_avps.fdx"; |
| 75 | LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc7944_avps.fdx"; |
| 76 | LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29061_avps.fdx"; |
| 77 | LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29128_avps.fdx"; |
| 78 | LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29154_avps.fdx"; |
| 79 | LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29173_avps.fdx"; |
| 80 | LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29212_avps.fdx"; |
| 81 | LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29214_avps.fdx"; |
| 82 | LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29215_avps.fdx"; |
| 83 | LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29217_avps.fdx"; |
| 84 | LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29229_avps.fdx"; |
| 85 | LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29272_avps.fdx"; |
| 86 | LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29273_avps.fdx"; |
| 87 | LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29329_avps.fdx"; |
| 88 | LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29336_avps.fdx"; |
| 89 | LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29337_avps.fdx"; |
| 90 | LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29338_avps.fdx"; |
| 91 | LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29343_avps.fdx"; |
| 92 | LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29344_avps.fdx"; |
| 93 | LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29345_avps.fdx"; |
| 94 | LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29368_avps.fdx"; |
| 95 | LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29468_avps.fdx"; |
| 96 | LoadExtension = "/usr/local/lib/freeDiameter/dict_ts32299_avps.fdx"; |
| 97 | LoadExtension = "/usr/local/lib/freeDiameter/dict_CreditControl.fdx"; |
| 98 | LoadExtension = "/usr/local/lib/freeDiameter/dict_Gx.fdx"; |
| 99 | LoadExtension = "/usr/local/lib/freeDiameter/dict_NAS.fdx"; |
| 100 | LoadExtension = "/usr/local/lib/freeDiameter/dict_Rx.fdx"; |
| 101 | LoadExtension = "/usr/local/lib/freeDiameter/dict_Sd.fdx"; |
| 102 | LoadExtension = "/usr/local/lib/freeDiameter/dict_St.fdx"; |
Ajay Lotan Thakur | c3cd619 | 2020-10-12 20:12:38 -0500 | [diff] [blame] | 103 | {{- range $key, $value := .Values.config.pcrf.cfgFiles }} |
| 104 | {{ $key }}: |- |
| 105 | {{ toPrettyJson $value | indent 4 }} |
| 106 | {{- end }} |
Hyunsun Moon | d9a09e8 | 2021-03-17 12:16:53 -0700 | [diff] [blame] | 107 | {{- end }} |
Hyunsun Moon | 1fc2447 | 2021-03-14 19:10:11 -0500 | [diff] [blame] | 108 | --- |
| 109 | apiVersion: v1 |
| 110 | kind: ConfigMap |
| 111 | metadata: |
| 112 | name: pcrf-scripts |
| 113 | labels: |
| 114 | {{ tuple "pcrf" . | include "omec-control-plane.metadata_labels" | indent 4 }} |
| 115 | data: |
| 116 | pcrf-run.sh: | |
| 117 | {{ tuple "bin/_pcrf-run.sh.tpl" . | include "omec-control-plane.template" | indent 4 }} |
| 118 | pcrf-bootstrap.sh: | |
| 119 | {{ tuple "bin/_pcrf-bootstrap.sh.tpl" . | include "omec-control-plane.template" | indent 4 }} |
Ajay Lotan Thakur | c3cd619 | 2020-10-12 20:12:38 -0500 | [diff] [blame] | 120 | {{- end }} |