blob: ef86b16692025f301e8d8fdfd0d30473784023ce [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
Matt Jeanneret7aeb86e2018-11-10 14:12:50 -050016{{- if .Values.freeradius.enabled }}
Gopinath Tagete2dff4d2018-03-15 17:22:28 -070017apiVersion: v1
18kind: Service
19metadata:
20 name: freeradius
21 namespace: {{ .Values.global.namespace }}
22 serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
23 labels:
24 name: freeradius
25spec:
26 clusterIP: None
27 ports:
28 - name: radius-auth
29 protocol: UDP
30 port: 1812
31 targetPort: 1812
32 - name: radius-acc
33 protocol: UDP
34 port: 1813
35 targetPort: 1813
36 - name: radius
37 port: 18120
38 targetPort: 18120
39 selector:
40 app: freeradius
41---
42apiVersion: apps/v1beta1
43kind: Deployment
44metadata:
45 name: freeradius
46 namespace: {{ .Values.global.namespace }}
47 serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
48spec:
49 replicas: 1
50 template:
51 metadata:
52 labels:
53 app: freeradius
54 annotations:
Gopinath Tagetf0b3ee82018-07-09 16:55:34 -070055 cni: "calico"
Gopinath Tagete2dff4d2018-03-15 17:22:28 -070056 spec:
57 serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
58 containers:
59 - name: freeradius
Zack Williams2749ae52018-09-28 09:43:43 -070060 image: {{ .Values.global.registry }}{{ .Values.images.freeradius.repository }}:{{ tpl .Values.images.freeradius.tag . }}
61 imagePullPolicy: {{ .Values.images.freeradius.pullPolicy }}
Gopinath Tagete2dff4d2018-03-15 17:22:28 -070062 env:
63 - name: POD_IP
64 valueFrom:
65 fieldRef:
66 fieldPath: status.podIP
67 - name: NAMESPACE
68 valueFrom:
69 fieldRef:
70 fieldPath: metadata.namespace
Jonathan Hart65c480e2018-05-14 16:32:16 -070071 - name: RADIUS_LISTEN_IP
72 value: "*"
73 - name: USERS_FILE
74 value: "/etc/raddb/users"
75 - name: RADIUS_CLIENTS
Andy Bavierab3ea632018-08-03 15:16:48 -070076 value: "SECRET@0.0.0.0/0"
Gopinath Tagete2dff4d2018-03-15 17:22:28 -070077 ports:
78 - containerPort: 1812
79 name: radauth-port
80 - containerPort: 1813
81 name: radacc-port
82 - containerPort: 18120
83 name: radius-port
84 volumeMounts:
85 - name: freeradius-config
86 mountPath: /etc/raddb/clients.conf
87 subPath: clients.conf
88 - name: freeradius-config
89 mountPath: /etc/raddb/users
90 subPath: users
91 volumes:
92 - name: freeradius-config
93 configMap:
94 name: freeradius-config
Matt Jeanneret7aeb86e2018-11-10 14:12:50 -050095{{- end}}