blob: 4c58cf53999d2f6b23394c6128337b95c370b73d [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---
Matteo Scandolo5628d4b2021-01-11 11:46:12 -080042apiVersion: apps/v1
Gopinath Tagete2dff4d2018-03-15 17:22:28 -070043kind: Deployment
44metadata:
45 name: freeradius
46 namespace: {{ .Values.global.namespace }}
47 serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
48spec:
49 replicas: 1
Matteo Scandolo5628d4b2021-01-11 11:46:12 -080050 selector:
51 matchLabels:
52 name: freeradius
53 release: {{ .Release.Name }}
Gopinath Tagete2dff4d2018-03-15 17:22:28 -070054 template:
55 metadata:
56 labels:
57 app: freeradius
58 annotations:
Gopinath Tagetf0b3ee82018-07-09 16:55:34 -070059 cni: "calico"
Gopinath Tagete2dff4d2018-03-15 17:22:28 -070060 spec:
61 serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
62 containers:
63 - name: freeradius
Zack Williams2749ae52018-09-28 09:43:43 -070064 image: {{ .Values.global.registry }}{{ .Values.images.freeradius.repository }}:{{ tpl .Values.images.freeradius.tag . }}
65 imagePullPolicy: {{ .Values.images.freeradius.pullPolicy }}
Gopinath Tagete2dff4d2018-03-15 17:22:28 -070066 env:
67 - name: POD_IP
68 valueFrom:
69 fieldRef:
70 fieldPath: status.podIP
71 - name: NAMESPACE
72 valueFrom:
73 fieldRef:
74 fieldPath: metadata.namespace
Jonathan Hart65c480e2018-05-14 16:32:16 -070075 - name: RADIUS_LISTEN_IP
76 value: "*"
77 - name: USERS_FILE
78 value: "/etc/raddb/users"
79 - name: RADIUS_CLIENTS
Andy Bavierab3ea632018-08-03 15:16:48 -070080 value: "SECRET@0.0.0.0/0"
Gopinath Tagete2dff4d2018-03-15 17:22:28 -070081 ports:
82 - containerPort: 1812
83 name: radauth-port
84 - containerPort: 1813
85 name: radacc-port
86 - containerPort: 18120
87 name: radius-port
88 volumeMounts:
89 - name: freeradius-config
90 mountPath: /etc/raddb/clients.conf
91 subPath: clients.conf
92 - name: freeradius-config
93 mountPath: /etc/raddb/users
94 subPath: users
95 volumes:
96 - name: freeradius-config
97 configMap:
98 name: freeradius-config
Matt Jeanneret7aeb86e2018-11-10 14:12:50 -050099{{- end}}