adyanth / cloudflare-operator

A Kubernetes Operator to create and manage Cloudflare Tunnels and DNS records for (HTTP/TCP/UDP*) Service Resources
https://adyanth.site/posts/migration-compose-k8s/cloudflare-tunnel-operator-architecture/
Apache License 2.0
316 stars 32 forks source link

Feature Request: Config option for tunnel IP version #104

Open qroac opened 1 month ago

qroac commented 1 month ago

Services in my local network use static or assigned IPv4 adresses. Cloudflare by default sets IPv4 and IPv6 DNS records for tunnels. As result, accessing a service from local network I dont go the direct way using the local IPv4 adress. Instead local requests resolve to the public IPv6 adress of the tunnel and require the authentication I have configured in zerotrust.

There is a argument for cloudflared to set the desired IP address family. I'd very much love an config option to set a value for this flag to enforce the use of IPv4 only.

Is this already possible by some workaround? Might it be in a future version of this operator?

cloudflared tunnel --edge-ip-version <VERSION> run <UUID or NAME>

Possible values for VERSION: auto, 4, 6

Cloudflare Docs: edge-ip-version

adyanth commented 1 month ago

For a one off use case, feel free to submit a PR like https://github.com/adyanth/cloudflare-operator/pull/100