apiVersion: apps/v1
kind: Deployment
metadata:
  name: wifi
  namespace: turnkey
spec:
  progressDeadlineSeconds: 600
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      turnkey/workloadselector: deployment-turnkey-wifi
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 0
    type: RollingUpdate
  template:
    metadata:
      labels:
        turnkey/workloadselector: deployment-turnkey-wifi
    spec:
      containers:
      - args:
        - up
        image: mak3r/wifi:v0.0.10
        imagePullPolicy: IfNotPresent
        name: wifi
        resources: {}
        livenessProbe:
          exec:
            command:
              - /usr/local/bin/liveness.sh
          initialDelaySeconds: 10
          periodSeconds: 5
          timeoutSeconds: 5
        readinessProbe:
          exec:
            command:
              - /usr/local/bin/readiness.sh
          initialDelaySeconds: 20
          periodSeconds: 5
        securityContext:
          allowPrivilegeEscalation: true
          capabilities:
            add:
            - NET_ADMIN
          privileged: false
          readOnlyRootFilesystem: false
          runAsNonRoot: false
        stdin: true
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
        tty: true
        volumeMounts:
        - mountPath: /etc/wpa_supplicant/
          name: vol1
        - mountPath: /var/lib/rancher/turnkey/resolv.conf
          name: vol2
      dnsConfig: {}
      dnsPolicy: ClusterFirst
      hostNetwork: true
      hostPID: true
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: {}
      terminationGracePeriodSeconds: 30
      volumes:
      - name: vol1
        secret:
          defaultMode: 256
          items:
          - key: wpa_supplicant.conf
            mode: 420
            path: wpa_supplicant.conf
          optional: false
          secretName: wpa-supplicant-conf
      - name: vol2
        hostPath:
          path: /var/lib/rancher/turnkey/resolv.conf
          type: File
