VOL-1789 add helm chart for free radius
Change-Id: If0c01c776f88dce252a5769bb51b1afcbdc662cb
diff --git a/freeradius/Chart.yaml b/freeradius/Chart.yaml
new file mode 100644
index 0000000..84a7ce8
--- /dev/null
+++ b/freeradius/Chart.yaml
@@ -0,0 +1,20 @@
+# Copyright 2017-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+name: freeradius
+description: A Helm chart to deploy an example RADIUS server
+icon: https://guide.opencord.org/logos/cord.svg
+
+version: 1.0.0
+appVersion: 2.2.9
diff --git a/freeradius/templates/freeradius-config.yaml b/freeradius/templates/freeradius-config.yaml
new file mode 100644
index 0000000..64d6d26
--- /dev/null
+++ b/freeradius/templates/freeradius-config.yaml
@@ -0,0 +1,27 @@
+# Copyright 2017-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+apiVersion: v1
+data:
+ clients.conf: |
+ client 0.0.0.0/0 {
+ secret = SECRET
+ }
+ users: |
+ user Cleartext-Password := "password", MS-CHAP-Use-NTLM-Auth := 0
+
+kind: ConfigMap
+metadata:
+ name: freeradius-config
+ serviceAccountName: {{ tpl .Values.serviceaccount . }}
diff --git a/freeradius/templates/freeradius.yaml b/freeradius/templates/freeradius.yaml
new file mode 100644
index 0000000..a491f9e
--- /dev/null
+++ b/freeradius/templates/freeradius.yaml
@@ -0,0 +1,89 @@
+---
+# Copyright 2017-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+apiVersion: v1
+kind: Service
+metadata:
+ name: radius
+ serviceAccountName: {{ tpl .Values.serviceaccount . | quote }}
+spec:
+ ports:
+ - name: radius-auth
+ protocol: UDP
+ port: 1812
+ targetPort: 1812
+ - name: radius-acc
+ protocol: UDP
+ port: 1813
+ targetPort: 1813
+ - name: radius
+ port: 18120
+ targetPort: 18120
+ selector:
+ app: radius
+
+---
+apiVersion: apps/v1beta1
+kind: Deployment
+metadata:
+ name: radius
+ serviceAccountName: {{ tpl .Values.serviceaccount . }}
+spec:
+ replicas: 1
+ template:
+ metadata:
+ labels:
+ app: radius
+ annotations:
+ cni: "calico"
+ spec:
+ serviceAccountName: {{ tpl .Values.serviceaccount . }}
+ containers:
+ - name: radius
+ image: {{ tpl .Values.images.radius.registry . }}{{ tpl .Values.images.radius.repository . }}:{{ tpl .Values.images.radius.tag . }}
+ imagePullPolicy: {{ tpl .Values.images.radius.pullPolicy . }}
+ env:
+ - name: POD_IP
+ valueFrom:
+ fieldRef:
+ fieldPath: status.podIP
+ - name: NAMESPACE
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.namespace
+ - name: RADIUS_LISTEN_IP
+ value: "*"
+ - name: USERS_FILE
+ value: "/etc/raddb/users"
+ - name: RADIUS_CLIENTS
+ value: "SECRET@0.0.0.0/0"
+ ports:
+ - containerPort: 1812
+ name: radauth-port
+ - containerPort: 1813
+ name: radacc-port
+ - containerPort: 18120
+ name: radius-port
+ volumeMounts:
+ - name: freeradius-config
+ mountPath: /etc/raddb/clients.conf
+ subPath: clients.conf
+ - name: freeradius-config
+ mountPath: /etc/raddb/users
+ subPath: users
+ volumes:
+ - name: freeradius-config
+ configMap:
+ name: freeradius-config
diff --git a/freeradius/values.yaml b/freeradius/values.yaml
new file mode 100644
index 0000000..c8f5021
--- /dev/null
+++ b/freeradius/values.yaml
@@ -0,0 +1,26 @@
+---
+# Copyright 2019-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+serviceaccount: ''
+
+defaults:
+ image_pullPolicy: "Always"
+
+images:
+ radius:
+ registry: ''
+ repository: 'tpdock/freeradius'
+ tag: '{{ .Chart.AppVersion }}'
+ pullPolicy: '{{ .Values.defaults.image_pullPolicy }}'