David Bainbridge | 564fcfb | 2019-07-18 23:58:35 +0000 | [diff] [blame] | 1 | --- |
| 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. |
David Bainbridge | 564fcfb | 2019-07-18 23:58:35 +0000 | [diff] [blame] | 15 | --- |
David Bainbridge | 7fa6cb4 | 2020-06-12 16:52:38 -0700 | [diff] [blame] | 16 | apiVersion: apps/v1 |
David Bainbridge | 564fcfb | 2019-07-18 23:58:35 +0000 | [diff] [blame] | 17 | kind: Deployment |
| 18 | metadata: |
David Bainbridge | 7fa6cb4 | 2020-06-12 16:52:38 -0700 | [diff] [blame] | 19 | name: "{{ template "fullname" . }}" |
| 20 | namespace: "{{ .Release.Namespace }}" |
David Bainbridge | 564fcfb | 2019-07-18 23:58:35 +0000 | [diff] [blame] | 21 | spec: |
| 22 | replicas: 1 |
David Bainbridge | 7fa6cb4 | 2020-06-12 16:52:38 -0700 | [diff] [blame] | 23 | selector: |
| 24 | matchLabels: |
| 25 | app: radius |
| 26 | release: "{{ .Release.Name }}" |
David Bainbridge | 564fcfb | 2019-07-18 23:58:35 +0000 | [diff] [blame] | 27 | template: |
| 28 | metadata: |
| 29 | labels: |
| 30 | app: radius |
David Bainbridge | 7fa6cb4 | 2020-06-12 16:52:38 -0700 | [diff] [blame] | 31 | release: "{{ .Release.Name }}" |
David Bainbridge | 564fcfb | 2019-07-18 23:58:35 +0000 | [diff] [blame] | 32 | spec: |
| 33 | serviceAccountName: {{ tpl .Values.serviceaccount . }} |
| 34 | containers: |
| 35 | - name: radius |
| 36 | image: {{ tpl .Values.images.radius.registry . }}{{ tpl .Values.images.radius.repository . }}:{{ tpl .Values.images.radius.tag . }} |
| 37 | imagePullPolicy: {{ tpl .Values.images.radius.pullPolicy . }} |
| 38 | env: |
| 39 | - name: POD_IP |
| 40 | valueFrom: |
| 41 | fieldRef: |
| 42 | fieldPath: status.podIP |
| 43 | - name: NAMESPACE |
| 44 | valueFrom: |
| 45 | fieldRef: |
| 46 | fieldPath: metadata.namespace |
| 47 | - name: RADIUS_LISTEN_IP |
| 48 | value: "*" |
| 49 | - name: USERS_FILE |
| 50 | value: "/etc/raddb/users" |
| 51 | - name: RADIUS_CLIENTS |
| 52 | value: "SECRET@0.0.0.0/0" |
| 53 | ports: |
| 54 | - containerPort: 1812 |
| 55 | name: radauth-port |
| 56 | - containerPort: 1813 |
| 57 | name: radacc-port |
| 58 | - containerPort: 18120 |
| 59 | name: radius-port |
| 60 | volumeMounts: |
| 61 | - name: freeradius-config |
| 62 | mountPath: /etc/raddb/clients.conf |
| 63 | subPath: clients.conf |
| 64 | - name: freeradius-config |
| 65 | mountPath: /etc/raddb/users |
| 66 | subPath: users |
| 67 | volumes: |
| 68 | - name: freeradius-config |
| 69 | configMap: |
| 70 | name: freeradius-config |