blob: a491f9e684db28b6b9fa576fd29f2d81de9e45e4 [file] [log] [blame]
---
# Copyright 2017-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: v1
kind: Service
metadata:
name: radius
serviceAccountName: {{ tpl .Values.serviceaccount . | quote }}
spec:
ports:
- name: radius-auth
protocol: UDP
port: 1812
targetPort: 1812
- name: radius-acc
protocol: UDP
port: 1813
targetPort: 1813
- name: radius
port: 18120
targetPort: 18120
selector:
app: radius
---
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: radius
serviceAccountName: {{ tpl .Values.serviceaccount . }}
spec:
replicas: 1
template:
metadata:
labels:
app: radius
annotations:
cni: "calico"
spec:
serviceAccountName: {{ tpl .Values.serviceaccount . }}
containers:
- name: radius
image: {{ tpl .Values.images.radius.registry . }}{{ tpl .Values.images.radius.repository . }}:{{ tpl .Values.images.radius.tag . }}
imagePullPolicy: {{ tpl .Values.images.radius.pullPolicy . }}
env:
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: RADIUS_LISTEN_IP
value: "*"
- name: USERS_FILE
value: "/etc/raddb/users"
- name: RADIUS_CLIENTS
value: "SECRET@0.0.0.0/0"
ports:
- containerPort: 1812
name: radauth-port
- containerPort: 1813
name: radacc-port
- containerPort: 18120
name: radius-port
volumeMounts:
- name: freeradius-config
mountPath: /etc/raddb/clients.conf
subPath: clients.conf
- name: freeradius-config
mountPath: /etc/raddb/users
subPath: users
volumes:
- name: freeradius-config
configMap:
name: freeradius-config