blob: 8f9eaeaeb982ec4468e6ad0921f6df1a21d9faca [file] [log] [blame]
Zack Williams2749ae52018-09-28 09:43:43 -07001---
Gopinath Tagete2dff4d2018-03-15 17:22:28 -07002# 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: freeradius
20 namespace: {{ .Values.global.namespace }}
21 serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
22 labels:
23 name: freeradius
24spec:
25 clusterIP: None
26 ports:
27 - name: radius-auth
28 protocol: UDP
29 port: 1812
30 targetPort: 1812
31 - name: radius-acc
32 protocol: UDP
33 port: 1813
34 targetPort: 1813
35 - name: radius
36 port: 18120
37 targetPort: 18120
38 selector:
39 app: freeradius
40---
41apiVersion: apps/v1beta1
42kind: Deployment
43metadata:
44 name: freeradius
45 namespace: {{ .Values.global.namespace }}
46 serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
47spec:
48 replicas: 1
49 template:
50 metadata:
51 labels:
52 app: freeradius
53 annotations:
Gopinath Tagetf0b3ee82018-07-09 16:55:34 -070054 cni: "calico"
Gopinath Tagete2dff4d2018-03-15 17:22:28 -070055 spec:
56 serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
57 containers:
58 - name: freeradius
Zack Williams2749ae52018-09-28 09:43:43 -070059 image: {{ .Values.global.registry }}{{ .Values.images.freeradius.repository }}:{{ tpl .Values.images.freeradius.tag . }}
60 imagePullPolicy: {{ .Values.images.freeradius.pullPolicy }}
Gopinath Tagete2dff4d2018-03-15 17:22:28 -070061 env:
62 - name: POD_IP
63 valueFrom:
64 fieldRef:
65 fieldPath: status.podIP
66 - name: NAMESPACE
67 valueFrom:
68 fieldRef:
69 fieldPath: metadata.namespace
Jonathan Hart65c480e2018-05-14 16:32:16 -070070 - name: RADIUS_LISTEN_IP
71 value: "*"
72 - name: USERS_FILE
73 value: "/etc/raddb/users"
74 - name: RADIUS_CLIENTS
Andy Bavierab3ea632018-08-03 15:16:48 -070075 value: "SECRET@0.0.0.0/0"
Gopinath Tagete2dff4d2018-03-15 17:22:28 -070076 ports:
77 - containerPort: 1812
78 name: radauth-port
79 - containerPort: 1813
80 name: radacc-port
81 - containerPort: 18120
82 name: radius-port
83 volumeMounts:
84 - name: freeradius-config
85 mountPath: /etc/raddb/clients.conf
86 subPath: clients.conf
87 - name: freeradius-config
88 mountPath: /etc/raddb/users
89 subPath: users
90 volumes:
91 - name: freeradius-config
92 configMap:
93 name: freeradius-config