blob: df4621dd46147987aead54326eced80a543c2539 [file] [log] [blame]
Gopinath Tagete2dff4d2018-03-15 17:22:28 -07001# Copyright 2017-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.
14
15apiVersion: v1
16kind: Service
17metadata:
18 name: freeradius
19 namespace: {{ .Values.global.namespace }}
20 serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
21 labels:
22 name: freeradius
23spec:
24 clusterIP: None
25 ports:
26 - name: radius-auth
27 protocol: UDP
28 port: 1812
29 targetPort: 1812
30 - name: radius-acc
31 protocol: UDP
32 port: 1813
33 targetPort: 1813
34 - name: radius
35 port: 18120
36 targetPort: 18120
37 selector:
38 app: freeradius
39---
40apiVersion: apps/v1beta1
41kind: Deployment
42metadata:
43 name: freeradius
44 namespace: {{ .Values.global.namespace }}
45 serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
46spec:
47 replicas: 1
48 template:
49 metadata:
50 labels:
51 app: freeradius
52 annotations:
Gopinath Tagetf0b3ee82018-07-09 16:55:34 -070053 cni: "calico"
Gopinath Tagete2dff4d2018-03-15 17:22:28 -070054 spec:
55 serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
56 containers:
57 - name: freeradius
Matteo Scandolof6c28df2018-05-08 11:44:05 -070058 image: {{ .Values.freeradiusImage }}
59 imagePullPolicy: {{ .Values.imagePullPolicy }}
Gopinath Tagete2dff4d2018-03-15 17:22:28 -070060 env:
61 - name: POD_IP
62 valueFrom:
63 fieldRef:
64 fieldPath: status.podIP
65 - name: NAMESPACE
66 valueFrom:
67 fieldRef:
68 fieldPath: metadata.namespace
Jonathan Hart65c480e2018-05-14 16:32:16 -070069 - name: RADIUS_LISTEN_IP
70 value: "*"
71 - name: USERS_FILE
72 value: "/etc/raddb/users"
73 - name: RADIUS_CLIENTS
74 value: "SECRET@10.233.0.0/16"
Gopinath Tagete2dff4d2018-03-15 17:22:28 -070075 ports:
76 - containerPort: 1812
77 name: radauth-port
78 - containerPort: 1813
79 name: radacc-port
80 - containerPort: 18120
81 name: radius-port
82 volumeMounts:
83 - name: freeradius-config
84 mountPath: /etc/raddb/clients.conf
85 subPath: clients.conf
86 - name: freeradius-config
87 mountPath: /etc/raddb/users
88 subPath: users
89 volumes:
90 - name: freeradius-config
91 configMap:
92 name: freeradius-config