blob: 7bfb39c15d891d041cd89d3101496bb63ff818c3 [file] [log] [blame]
Richard Jankowskifefff3f2019-01-22 13:36:33 -05001# Copyright 2019-present Open Networking Foundation
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14apiVersion: v1
15kind: Service
16metadata:
17 name: freeradius
18 namespace: voltha
19 labels:
20 name: freeradius
21spec:
22 clusterIP: None
23 ports:
24 - name: radius-auth
25 protocol: UDP
26 port: 1812
27 targetPort: 1812
28 - name: radius-acc
29 protocol: UDP
30 port: 1813
31 targetPort: 1813
32 - name: radius
33 port: 18120
34 targetPort: 18120
35 selector:
36 app: freeradius
37---
38apiVersion: apps/v1beta1
39kind: Deployment
40metadata:
41 name: freeradius
42 namespace: voltha
43spec:
44 replicas: 1
45 template:
46 metadata:
47 labels:
48 app: freeradius
49 annotations:
50 cni: "calico"
51 spec:
52 containers:
53 - name: freeradius
54 image: "tpdock/freeradius"
55 env:
56 - name: POD_IP
57 valueFrom:
58 fieldRef:
59 fieldPath: status.podIP
60 - name: NAMESPACE
61 valueFrom:
62 fieldRef:
63 fieldPath: metadata.namespace
64 - name: RADIUS_LISTEN_IP
65 value: "*"
66 - name: USERS_FILE
67 value: "/etc/raddb/users"
68 - name: RADIUS_CLIENTS
69 value: "SECRET@192.168.0.0/16"
70 ports:
71 - containerPort: 1812
72 name: radauth-port
73 - containerPort: 1813
74 name: radacc-port
75 - containerPort: 18120
76 name: radius-port
77 volumeMounts:
78 - name: freeradius-config
79 mountPath: /etc/raddb/users
80 subPath: users
81 volumes:
82 - name: freeradius-config
83 configMap:
84 name: freeradius-config