blob: 10a32c6ac4eef046ddbb171489614e041cfa7a45 [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:
53 cni: "weave"
54 spec:
55 serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
56 containers:
57 - name: freeradius
58 image: {{ .Values.pull_docker_registry }}{{ .Values.images.freeradius.repository }}:{{ .Values.images.freeradius.tag }}
59 env:
60 - name: POD_IP
61 valueFrom:
62 fieldRef:
63 fieldPath: status.podIP
64 - name: NAMESPACE
65 valueFrom:
66 fieldRef:
67 fieldPath: metadata.namespace
68 ports:
69 - containerPort: 1812
70 name: radauth-port
71 - containerPort: 1813
72 name: radacc-port
73 - containerPort: 18120
74 name: radius-port
75 volumeMounts:
76 - name: freeradius-config
77 mountPath: /etc/raddb/clients.conf
78 subPath: clients.conf
79 - name: freeradius-config
80 mountPath: /etc/raddb/users
81 subPath: users
82 volumes:
83 - name: freeradius-config
84 configMap:
85 name: freeradius-config