Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to Cloudflare Tunnels API #47

Open
adyanth opened this issue Mar 27, 2022 · 8 comments
Open

Migrate to Cloudflare Tunnels API #47

adyanth opened this issue Mar 27, 2022 · 8 comments
Labels
blocked Issue blocked because of external factors enhancement New feature or request roadmap Roadmap Item

Comments

@adyanth
Copy link
Owner

adyanth commented Mar 27, 2022

The Argo Tunnels API has been set to be EOL on 4th Feb 2024.

The new Cloudflare Tunnels API may also have configuration APIs once the feature to configure the tunnels from the dashboard comes out of beta. This means that when a new service is added, an API call can be made to add it, rather than managing a ConfigMap manually.

@adyanth adyanth added enhancement New feature or request roadmap Roadmap Item blocked Issue blocked because of external factors labels Mar 27, 2022
@adyanth
Copy link
Owner Author

adyanth commented Mar 27, 2022

No point in implementing this until the configuration API is available and documented.

:method: PUT
:scheme: https
:authority: api.teams.cloudflare.com
:path: /api/v4/accounts//cfd_tunnel//configurations
Content-Type: text/plain;charset=UTF-8
Accept: /
Host: api.teams.cloudflare.com
Content-Length: 123

{
    "config": {
        "ingress": [
            {
                "hostname": "sample.example.com",
                "service": "http://localhost:8080"
            },
            {
                "service": "http_status:404"
            }
        ]
    }
}

@mysticaltech
Copy link

First of all, fantastic project! I believe they have published the docs here https://api.cloudflare.com/#cloudflare-tunnel-properties

@adyanth
Copy link
Owner Author

adyanth commented May 10, 2022

Yup, looks like it is out of beta!

I'm thinking if I should just substitute this API in place of writing to the configMap (which only helps to have the config safe outside the cluster), or is there something else I can do. Creating a tunnel per service is wasteful IMO.

Adding this would take away the mode/feature this currently has, that is the ability to run without connecting to the Cloudflare API directly using any tokens. I think that might be a feature people would like, so this should be an alternative that you can select (probably in the CRD) rather than the only implementation.

@mysticaltech
Copy link

Sounds good. As long as things are well compartmentalized, and this works equally well for an individual hobby setup or a cluster being hit millions of times a day, it's good!

@acrogenesis
Copy link
Contributor

Hey @adyanth in the meantime do you think it's ok to use the latest cloudflared version?

@adyanth
Copy link
Owner Author

adyanth commented Jul 15, 2022

Hey @acrogenesis , where do you mean? You can set the cloudflared version by setting the Tunnel.spec.image to cloudflare/cloudflared:latest

@acrogenesis
Copy link
Contributor

Yeah, I meant if it was safe to do that.

@adyanth
Copy link
Owner Author

adyanth commented Jul 20, 2022

@acrogenesis yes. But I held back from making it take the latest by default to prevent any breaking changes upstream break this as well.
I'll update the default every release and later probably set up an automated pipeline to do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Issue blocked because of external factors enhancement New feature or request roadmap Roadmap Item
Projects
None yet
Development

No branches or pull requests

3 participants