STRRL / cloudflare-tunnel-ingress-controller

🚀 Expose the website directly into the internet! The Kuberntes Ingress Controller based on Cloudflare Tunnel.
MIT License
644 stars 37 forks source link

Add support for creating an access application automaticlly with the ingress #83

Open nicholasrobertm opened 4 months ago

nicholasrobertm commented 4 months ago

Thanks for the great project it's very seamless to setup!

One improvement I think would be good is allowing an application be managed with the ingress rule as well. This could be done through annotations potentially.

This could look along the lines of

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: test-via-cf-tunnel
  annotations:
    strrl.dev/create-application: "true"
    strrl.dev/tags:
    - a
    - b
    strrl.dev/identity-providers:
    - pin
    - github
    strrl.dev/include-groups:
    - testgroup
    strrl.dev/rules:
      emails-ending: "@test.com"
      github:
        org: test
        team: test

  finalizers:
  - strrl.dev/cloudflare-tunnel-ingress-controller-controlled
  generation: 1
spec:
  ingressClassName: cloudflare-tunnel
  rules:
  - host: test.yourdomain.org
    http:
      paths:
      - backend:
          service:
            name: test
            port:
              number: 80
        path: /
        pathType: Prefix
status:
  loadBalancer: {}