How do I import traefik CRD for kubernetes into a golang project?

I have a golang project to create kubernetes resources. I also need to create traefik resources, the traefik CRD available here traefik/pkg/provider/kubernetes/crd at v2.2.11 · traefik/traefik · GitHub but I am looking for a help, how do I add them into my project?


I am able to add the CRD by adding the traefik project as a dependent project and I also need to add additional replace module

// Docker v19.03.6
replace => v1.4.2-0.20200204220554-5f6d6f3f2203

// Containous forks
replace ( => v0.4.1-0.20200324110947-a37a7636d23e => v0.0.0-20170915194414-ca0bf163426a => v0.0.0-20181024131434-c33f32e26898 => v0.0.0-20190809180810-6e71eb837595 => v0.0.0-20190809014333-8b6c9a7e6bba

Is this correct way? or Do we have a separate project for CRD only?

Added the CRD into schema so yaml file can be parsed.

	// Add traefik schema
	err2 := v1alpha1.AddToScheme(scheme.Scheme)
	if err2 != nil {
		logger.Errorw("Adding traefik schema failed", err2)
	decode := scheme.Codecs.UniversalDeserializer().Decode


This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.