apiVersion: v1
kind: Pod
metadata:
  name: nginx
spec:
  serviceAccountName: tailscale
  containers:
  - name: nginx
    image: nginx
  - name: tailscale
    imagePullPolicy: Always
    image: "{{IMAGE_TAG}}"
    env:
      # Store the state in a k8s secret
    - name: KUBE_SECRET
      value: "tailscale"
    - name: USERSPACE
      value: "false"
    - name: AUTH_KEY
      valueFrom:
        secretKeyRef:
          name: tailscale-auth
          key: AUTH_KEY
          optional: true
    securityContext:
      capabilities:
        add:
        - NET_ADMIN