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