kind: ConfigMap
apiVersion: v1
metadata:
  name: wg-configmap
data:
  wg0.conf: |
    [Interface]
    Address = 10.42.42.1/24
    ListenPort = 51820
    PostUp = wg set wg0 private-key /etc/wireguard/privatekey && iptables -t nat -A POSTROUTING -s 10.42.42.0/24 -o eth0 -j MASQUERADE
    PostDown = iptables -t nat -D POSTROUTING -s 10.42.42.0/24 -o eth0 -j MASQUERADE

    # Rainweg ESPHome
    [Peer]
    PublicKey = sGasTeqH3XIeuiXLJZmLq2QUnb5xq9JmA+ORpHOo3Ew=
    AllowedIPs = 10.42.42.20/32