Zack Williams | 41513bf | 2018-07-07 20:08:35 -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. |
Stephane Barbarie | 5e8d9e4 | 2018-02-07 16:15:05 -0500 | [diff] [blame] | 14 | apiVersion: v1 |
| 15 | kind: Service |
| 16 | metadata: |
| 17 | name: freeradius |
Stephane Barbarie | 3559506 | 2018-02-08 08:34:39 -0500 | [diff] [blame] | 18 | namespace: voltha |
Stephane Barbarie | 5e8d9e4 | 2018-02-07 16:15:05 -0500 | [diff] [blame] | 19 | labels: |
| 20 | name: freeradius |
| 21 | spec: |
| 22 | clusterIP: None |
| 23 | ports: |
| 24 | - name: radius-auth |
| 25 | protocol: UDP |
| 26 | port: 1812 |
| 27 | targetPort: 1812 |
| 28 | - name: radius-acc |
| 29 | protocol: UDP |
| 30 | port: 1813 |
| 31 | targetPort: 1813 |
| 32 | - name: radius |
| 33 | port: 18120 |
| 34 | targetPort: 18120 |
| 35 | selector: |
| 36 | app: freeradius |
| 37 | --- |
| 38 | apiVersion: apps/v1beta1 |
| 39 | kind: Deployment |
| 40 | metadata: |
| 41 | name: freeradius |
Stephane Barbarie | 3559506 | 2018-02-08 08:34:39 -0500 | [diff] [blame] | 42 | namespace: voltha |
Stephane Barbarie | 5e8d9e4 | 2018-02-07 16:15:05 -0500 | [diff] [blame] | 43 | spec: |
| 44 | replicas: 1 |
| 45 | template: |
| 46 | metadata: |
| 47 | labels: |
| 48 | app: freeradius |
| 49 | annotations: |
Stephane Barbarie | 2d4e07f | 2018-03-26 16:46:45 -0400 | [diff] [blame] | 50 | cni: "calico" |
Stephane Barbarie | 5e8d9e4 | 2018-02-07 16:15:05 -0500 | [diff] [blame] | 51 | spec: |
| 52 | containers: |
| 53 | - name: freeradius |
| 54 | image: "marcelmaatkamp/freeradius" |
| 55 | env: |
| 56 | - name: POD_IP |
| 57 | valueFrom: |
| 58 | fieldRef: |
| 59 | fieldPath: status.podIP |
| 60 | - name: NAMESPACE |
| 61 | valueFrom: |
| 62 | fieldRef: |
| 63 | fieldPath: metadata.namespace |
| 64 | ports: |
| 65 | - containerPort: 1812 |
| 66 | name: radauth-port |
| 67 | - containerPort: 1813 |
| 68 | name: radacc-port |
| 69 | - containerPort: 18120 |
| 70 | name: radius-port |
| 71 | volumeMounts: |
| 72 | - name: freeradius-config |
| 73 | mountPath: /etc/raddb/clients.conf |
| 74 | subPath: clients.conf |
| 75 | - name: freeradius-config |
| 76 | mountPath: /etc/raddb/users |
| 77 | subPath: users |
| 78 | volumes: |
| 79 | - name: freeradius-config |
| 80 | configMap: |
| 81 | name: freeradius-config |