kind: Deployment
apiVersion: apps/v1
metadata:
  name: openvpn-server
spec:
  replicas: 1
  selector:
    matchLabels:
      app: openvpn-server
  template:
    metadata:
      labels:
        app: openvpn-server
    spec:
      automountServiceAccountToken: false
      containers:
      - name: openvpn-server
        image: quay.io/sjenning/poc:openvpn
        imagePullPolicy: Always
        command:
        - /usr/sbin/openvpn
        - --config
        - /etc/openvpn/config/server.conf
        workingDir: /etc/openvpn/server
        securityContext:
          privileged: true
        volumeMounts:
        - mountPath: /etc/openvpn/server
          name: server
        - mountPath: /etc/openvpn/ccd
          name: ccd
        - mountPath: /etc/openvpn/config
          name: config
      volumes:
      - secret:
          secretName: openvpn-server
        name: server
      - configMap:
          name: openvpn-server
        name: config
      - configMap:
          name: openvpn-ccd
        name: ccd
