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 |
| 69 | ports: |
| 70 | - containerPort: 1812 |
| 71 | name: radauth-port |
| 72 | - containerPort: 1813 |
| 73 | name: radacc-port |
| 74 | - containerPort: 18120 |
| 75 | name: radius-port |
| 76 | volumeMounts: |
| 77 | - name: freeradius-config |
| 78 | mountPath: /etc/raddb/clients.conf |
| 79 | subPath: clients.conf |
| 80 | - name: freeradius-config |
| 81 | mountPath: /etc/raddb/users |
| 82 | subPath: users |
| 83 | volumes: |
| 84 | - name: freeradius-config |
| 85 | configMap: |
| 86 | name: freeradius-config |