kind: Deployment
apiVersion: apps/v1
metadata:
  name: freeradius
spec:
  replicas: 1
  selector:
    matchLabels:
      name: freeradius
  template:
    metadata:
      name: freeradius
      labels:
        name: freeradius
    spec:
            #      volumes:
            #        - name: nfs-freeradius
            #          persistentVolumeClaim:
            #            claimName: freeradius
      volumes:
      - name: raddb-files
        configMap:
          name: freeradius-files
          optional: true
      - name: raddb-secrets
        secret:
         secretName: freeradius-secrets
      containers:
        - name: freeradius
          image: 'freeradius/freeradius-server:latest-alpine'
          ports:
            - containerPort: 1812
              protocol: UDP
            - containerPort: 1813
              protocol: UDP
          volumeMounts:
            - name: raddb-secrets
              mountPath: /etc/raddb/mods-config/files/authorize
              subPath: authorize
            - name: raddb-secrets
              mountPath: /etc/raddb/clients.conf
              subPath: clients.conf
            - name: raddb-files
              mountPath: /etc/raddb/radiusd.conf
              subPath: radiusd.conf
