Adding configuration options to configure freeradius service type
To new configuration parameters are being added for customizing the
free radius service.
svc.type all of the service type to be modified
svc.twoSvcs will create two sepperate service for UDP/TCP ports
Some load balancer services (i.e. MetalLB) do not support UDP/TCP
in a the same service, setting twoScvs will create a secon service
the TCP based inner-tunnel
Change-Id: I142f47e694a2375c663a0ee81093d55527e8f62b
diff --git a/freeradius/Chart.yaml b/freeradius/Chart.yaml
index 51b88a4..0d3a3c9 100644
--- a/freeradius/Chart.yaml
+++ b/freeradius/Chart.yaml
@@ -14,7 +14,7 @@
---
apiVersion: "v1"
name: "freeradius"
-version: "1.0.3"
+version: "1.0.4"
description: "A Helm chart to deploy an example RADIUS server"
keywords:
- "onf"
diff --git a/freeradius/templates/freeradius-svc.yaml b/freeradius/templates/freeradius-svc.yaml
index 486cbf8..876cf7b 100644
--- a/freeradius/templates/freeradius-svc.yaml
+++ b/freeradius/templates/freeradius-svc.yaml
@@ -28,9 +28,24 @@
protocol: UDP
port: 1813
targetPort: 1813
+{{ if .Values.svc.twoSvcs }}
+ selector:
+ app: radius
+ release: "{{ .Release.Name }}"
+ type: {{ .Values.svc.type }}
+---
+apiVersion: v1
+kind: Service
+metadata:
+ name: "{{ template "fullname" . }}-inner-tunnel"
+ namespace: "{{ .Release.Namespace }}"
+spec:
+ ports:
+{{ end }}
- name: radius
port: 18120
targetPort: 18120
selector:
app: radius
release: "{{ .Release.Name }}"
+ type: {{ .Values.svc.type }}
diff --git a/freeradius/values.yaml b/freeradius/values.yaml
index ca30d34..1569604 100644
--- a/freeradius/values.yaml
+++ b/freeradius/values.yaml
@@ -28,4 +28,9 @@
pullPolicy: "{{ .Values.defaults.image_pullPolicy }}"
# pullSecrets:
# - name: regcred
-
+svc:
+ type: "ClusterIP"
+# Some load balancer services (i.e. MetalLB) do not support UDP/TCP
+# in a the same service, setting twoScvs will create a secon service
+# the TCP based inner-tunnel
+ twoSvcs: false