Zack Williams | 2749ae5 | 2018-09-28 09:43:43 -0700 | [diff] [blame] | 1 | --- |
Gopinath Taget | e2dff4d | 2018-03-15 17:22:28 -0700 | [diff] [blame] | 2 | # Copyright 2017-present Open Networking Foundation |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | |
| 16 | apiVersion: v1 |
| 17 | kind: Service |
| 18 | metadata: |
| 19 | name: freeradius |
| 20 | namespace: {{ .Values.global.namespace }} |
| 21 | serviceAccountName: {{ .Values.global.namespace }}-serviceaccount |
| 22 | labels: |
| 23 | name: freeradius |
| 24 | spec: |
| 25 | clusterIP: None |
| 26 | ports: |
| 27 | - name: radius-auth |
| 28 | protocol: UDP |
| 29 | port: 1812 |
| 30 | targetPort: 1812 |
| 31 | - name: radius-acc |
| 32 | protocol: UDP |
| 33 | port: 1813 |
| 34 | targetPort: 1813 |
| 35 | - name: radius |
| 36 | port: 18120 |
| 37 | targetPort: 18120 |
| 38 | selector: |
| 39 | app: freeradius |
| 40 | --- |
| 41 | apiVersion: apps/v1beta1 |
| 42 | kind: Deployment |
| 43 | metadata: |
| 44 | name: freeradius |
| 45 | namespace: {{ .Values.global.namespace }} |
| 46 | serviceAccountName: {{ .Values.global.namespace }}-serviceaccount |
| 47 | spec: |
| 48 | replicas: 1 |
| 49 | template: |
| 50 | metadata: |
| 51 | labels: |
| 52 | app: freeradius |
| 53 | annotations: |
Gopinath Taget | f0b3ee8 | 2018-07-09 16:55:34 -0700 | [diff] [blame] | 54 | cni: "calico" |
Gopinath Taget | e2dff4d | 2018-03-15 17:22:28 -0700 | [diff] [blame] | 55 | spec: |
| 56 | serviceAccountName: {{ .Values.global.namespace }}-serviceaccount |
| 57 | containers: |
| 58 | - name: freeradius |
Zack Williams | 2749ae5 | 2018-09-28 09:43:43 -0700 | [diff] [blame] | 59 | image: {{ .Values.global.registry }}{{ .Values.images.freeradius.repository }}:{{ tpl .Values.images.freeradius.tag . }} |
| 60 | imagePullPolicy: {{ .Values.images.freeradius.pullPolicy }} |
Gopinath Taget | e2dff4d | 2018-03-15 17:22:28 -0700 | [diff] [blame] | 61 | env: |
| 62 | - name: POD_IP |
| 63 | valueFrom: |
| 64 | fieldRef: |
| 65 | fieldPath: status.podIP |
| 66 | - name: NAMESPACE |
| 67 | valueFrom: |
| 68 | fieldRef: |
| 69 | fieldPath: metadata.namespace |
Jonathan Hart | 65c480e | 2018-05-14 16:32:16 -0700 | [diff] [blame] | 70 | - name: RADIUS_LISTEN_IP |
| 71 | value: "*" |
| 72 | - name: USERS_FILE |
| 73 | value: "/etc/raddb/users" |
| 74 | - name: RADIUS_CLIENTS |
Andy Bavier | ab3ea63 | 2018-08-03 15:16:48 -0700 | [diff] [blame] | 75 | value: "SECRET@0.0.0.0/0" |
Gopinath Taget | e2dff4d | 2018-03-15 17:22:28 -0700 | [diff] [blame] | 76 | ports: |
| 77 | - containerPort: 1812 |
| 78 | name: radauth-port |
| 79 | - containerPort: 1813 |
| 80 | name: radacc-port |
| 81 | - containerPort: 18120 |
| 82 | name: radius-port |
| 83 | volumeMounts: |
| 84 | - name: freeradius-config |
| 85 | mountPath: /etc/raddb/clients.conf |
| 86 | subPath: clients.conf |
| 87 | - name: freeradius-config |
| 88 | mountPath: /etc/raddb/users |
| 89 | subPath: users |
| 90 | volumes: |
| 91 | - name: freeradius-config |
| 92 | configMap: |
| 93 | name: freeradius-config |