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

Support for new API #111

Closed
Elegant996 opened this issue May 7, 2023 · 7 comments · Fixed by #159
Closed

Support for new API #111

Elegant996 opened this issue May 7, 2023 · 7 comments · Fixed by #159

Comments

@Elegant996
Copy link

With the release of traefik v2.10, traefik.containo.us API has been deprecated. Could we build with the latest version of traefik to obtain support for the new traefik.io API? Thanks!

@borchero
Copy link
Owner

borchero commented May 7, 2023

Makes sense, care to take a stab at it in a PR? 😄

@Elegant996
Copy link
Author

Elegant996 commented May 8, 2023

Got it working on my end but it may take more work to make this a real PR. It looks like we'd have to add both crds to switchboard. The quick and dirty I made only converts everything to the new one. The issue is importing traefik:

traefik "github.com/traefik/traefik/v2/pkg/provider/kubernetes/crd/traefik/v1alpha1"

To support both, we would have to introduce another one like so:

traefikio "github.com/traefik/traefik/v2/pkg/provider/kubernetes/crd/traefikio/v1alpha1"

Afterwards, we could observe both. May get around to this but it would take more testing than just the quick renaming I did on top of the PR to support traefik v2.10.1.

@borchero
Copy link
Owner

borchero commented May 8, 2023

I've never worked with an operator supporting two versions of a CRD so I need to investigate this a little. Will work on it soonish 😬

@AlexGodbehere
Copy link

AlexGodbehere commented Aug 15, 2023

@borchero, to confirm, this is still not implemented? Would explain why none of my IngressRoutes are being picked up 😅

@borchero
Copy link
Owner

Not implemented yet! Feel free to open a PR, I still didn't have time for it, unfortunately

@mya-crabnebula
Copy link

mya-crabnebula commented Oct 12, 2023

@borchero I've pushed up a patch that I believe addresses this. I haven't ever seen an operator or controller that works with multiple CRD definitions (unless it's fully self contained). For those wanting to test this out with the new version, I've pushed a copy of the container to ghcr under my user, and you'll need to grant switchboard permissions on the new version of the resources:

Container:

image:
  name: ghcr.io/mya-crabnebula/switchboard
  tag: latest@sha256:a3cb91a896529e134f4f7677c23cca3e1d275a398f7ba87c823bebd2a6cbf824

Additional permissions:

---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: switchboard-extra
rules:
  - apiGroups: ["traefik.io"]
    resources: ["ingressroutes"]
    verbs: ["get", "list", "watch"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: switchboard-extra
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: switchboard-extra
subjects:
  - kind: ServiceAccount
    name: switchboard
    namespace: ingress

@cuseinovic
Copy link

Hello guys,
I encountered the same problem here. Do you have some news about this PR or this topic ?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants