This message was deleted.
# general
s
This message was deleted.
b
if you don't need the strict typing, you can use the customresource resource: https://www.pulumi.com/docs/reference/pkg/kubernetes/apiextensions/customresource/ if you'd like to have a strongly typed implementation, you can use crd2pulumi https://github.com/pulumi/crd2pulumi
s
Thanks for your answer. I saw this documentation about the CRD. I did exactly this with the cert-manager - I took the CRD from Github and I converted it with crd2pulumi. This worked well. For Traefik I found the CRD here: https://doc.traefik.io/traefik/providers/kubernetes-crd/ But when I convert this CRD to the Pulumi stack I only have a provider - no v1.IngressRoute or what ever šŸ™‚ . May I did something wrong or how can I work with this provider?
b
can you show me what you did?
s
Sure.
I copied the CRD from the link in the previous comment to a file "traefik.crd.yml" then I executed the following command: rd2pulumiĀ --nodejsPathĀ .\traefik-ingressĀ .\traefik.crd.yaml After that I imported the generated sources with the following line to my index.ts importĀ *Ā asĀ traefikĀ fromĀ './traefik-ingress'; Then I tried to use it like "new traefik...." But then I detected thats only a Provider got generated. Now I am not sure if I missed something or I tried to use it in a wrong way.
@billowy-army-68599 is that enough info for you? or that kind of information which you asked for?
b
hey, yes I'm hoping to reproduce this today, sorry for the delay
i looked at this, and it looks like the traefik crd doesn't define any schema. There's an open issue in the traefik repo here: https://github.com/traefik/traefik/issues/5473 you'll have to manually define the crd unfortunately
s
ok I see ty. Then I will followup this issue at Treafik. Thanks a lot for your help. šŸ‘
just an idea...may it would help when the converter prints some info/warn log messages about that "issue"
s
Hi @salmon-australia-89174, I wonder if you found any solution to create the IngressRoute resource in a more code-oriented way? Thanks in advance
s
Hey Hector No, my "thing" was too small to invest too much time. But the solution with the template loading works well and for the moment I can stay with that.
s
Hey @salmon-australia-89174, thanks for your reply, I also adopted that solution, it's a pity that there is no support for it
s
ya it is... but I think they will do something, because the issue is open. but ya, in the meantime it works šŸ™‚