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 | |
Matt Jeanneret | 7aeb86e | 2018-11-10 14:12:50 -0500 | [diff] [blame^] | 16 | {{- if .Values.freeradius.enabled }} |
Gopinath Taget | e2dff4d | 2018-03-15 17:22:28 -0700 | [diff] [blame] | 17 | apiVersion: v1 |
| 18 | kind: Service |
| 19 | metadata: |
| 20 | name: freeradius |
| 21 | namespace: {{ .Values.global.namespace }} |
| 22 | serviceAccountName: {{ .Values.global.namespace }}-serviceaccount |
| 23 | labels: |
| 24 | name: freeradius |
| 25 | spec: |
| 26 | clusterIP: None |
| 27 | ports: |
| 28 | - name: radius-auth |
| 29 | protocol: UDP |
| 30 | port: 1812 |
| 31 | targetPort: 1812 |
| 32 | - name: radius-acc |
| 33 | protocol: UDP |
| 34 | port: 1813 |
| 35 | targetPort: 1813 |
| 36 | - name: radius |
| 37 | port: 18120 |
| 38 | targetPort: 18120 |
| 39 | selector: |
| 40 | app: freeradius |
| 41 | --- |
| 42 | apiVersion: apps/v1beta1 |
| 43 | kind: Deployment |
| 44 | metadata: |
| 45 | name: freeradius |
| 46 | namespace: {{ .Values.global.namespace }} |
| 47 | serviceAccountName: {{ .Values.global.namespace }}-serviceaccount |
| 48 | spec: |
| 49 | replicas: 1 |
| 50 | template: |
| 51 | metadata: |
| 52 | labels: |
| 53 | app: freeradius |
| 54 | annotations: |
Gopinath Taget | f0b3ee8 | 2018-07-09 16:55:34 -0700 | [diff] [blame] | 55 | cni: "calico" |
Gopinath Taget | e2dff4d | 2018-03-15 17:22:28 -0700 | [diff] [blame] | 56 | spec: |
| 57 | serviceAccountName: {{ .Values.global.namespace }}-serviceaccount |
| 58 | containers: |
| 59 | - name: freeradius |
Zack Williams | 2749ae5 | 2018-09-28 09:43:43 -0700 | [diff] [blame] | 60 | image: {{ .Values.global.registry }}{{ .Values.images.freeradius.repository }}:{{ tpl .Values.images.freeradius.tag . }} |
| 61 | imagePullPolicy: {{ .Values.images.freeradius.pullPolicy }} |
Gopinath Taget | e2dff4d | 2018-03-15 17:22:28 -0700 | [diff] [blame] | 62 | env: |
| 63 | - name: POD_IP |
| 64 | valueFrom: |
| 65 | fieldRef: |
| 66 | fieldPath: status.podIP |
| 67 | - name: NAMESPACE |
| 68 | valueFrom: |
| 69 | fieldRef: |
| 70 | fieldPath: metadata.namespace |
Jonathan Hart | 65c480e | 2018-05-14 16:32:16 -0700 | [diff] [blame] | 71 | - name: RADIUS_LISTEN_IP |
| 72 | value: "*" |
| 73 | - name: USERS_FILE |
| 74 | value: "/etc/raddb/users" |
| 75 | - name: RADIUS_CLIENTS |
Andy Bavier | ab3ea63 | 2018-08-03 15:16:48 -0700 | [diff] [blame] | 76 | value: "SECRET@0.0.0.0/0" |
Gopinath Taget | e2dff4d | 2018-03-15 17:22:28 -0700 | [diff] [blame] | 77 | ports: |
| 78 | - containerPort: 1812 |
| 79 | name: radauth-port |
| 80 | - containerPort: 1813 |
| 81 | name: radacc-port |
| 82 | - containerPort: 18120 |
| 83 | name: radius-port |
| 84 | volumeMounts: |
| 85 | - name: freeradius-config |
| 86 | mountPath: /etc/raddb/clients.conf |
| 87 | subPath: clients.conf |
| 88 | - name: freeradius-config |
| 89 | mountPath: /etc/raddb/users |
| 90 | subPath: users |
| 91 | volumes: |
| 92 | - name: freeradius-config |
| 93 | configMap: |
| 94 | name: freeradius-config |
Matt Jeanneret | 7aeb86e | 2018-11-10 14:12:50 -0500 | [diff] [blame^] | 95 | {{- end}} |