Gopinath Taget | e2dff4d | 2018-03-15 17:22:28 -0700 | [diff] [blame] | 1 | # 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 | |
| 15 | apiVersion: v1 |
| 16 | kind: Service |
| 17 | metadata: |
| 18 | name: freeradius |
| 19 | namespace: {{ .Values.global.namespace }} |
| 20 | serviceAccountName: {{ .Values.global.namespace }}-serviceaccount |
| 21 | labels: |
| 22 | name: freeradius |
| 23 | spec: |
| 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 | --- |
| 40 | apiVersion: apps/v1beta1 |
| 41 | kind: Deployment |
| 42 | metadata: |
| 43 | name: freeradius |
| 44 | namespace: {{ .Values.global.namespace }} |
| 45 | serviceAccountName: {{ .Values.global.namespace }}-serviceaccount |
| 46 | spec: |
| 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 |
Matteo Scandolo | f6c28df | 2018-05-08 11:44:05 -0700 | [diff] [blame] | 58 | image: {{ .Values.freeradiusImage }} |
| 59 | imagePullPolicy: {{ .Values.imagePullPolicy }} |
Gopinath Taget | e2dff4d | 2018-03-15 17:22:28 -0700 | [diff] [blame] | 60 | 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 Hart | 65c480e | 2018-05-14 16:32:16 -0700 | [diff] [blame] | 69 | - 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 Taget | e2dff4d | 2018-03-15 17:22:28 -0700 | [diff] [blame] | 75 | 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 |