Closed toonsevrin closed 4 years ago
All right, so this was a dependency problem: Because I was automatically populating go.mod
, it pulled the latest version of my own project from github.
[https://wiki.tcbv.be/en/ict/kubernetes/developing_on_kubernetes](I've also documented my solution here). This resource may be handy if you're developing a CRD.
Updating my go.mod solved this issue:
module kuberdon
go 1.13
require (
github.com/kuberty/kuberdon v0.0.0
k8s.io/apimachinery v0.17.3
k8s.io/client-go v11.0.0+incompatible
k8s.io/code-generator v0.17.3
)
replace github.com/kuberty/kuberdon v0.0.0 => ./
Hi guys I tried to create a cluster scoped crd from this but the code-generator does not seem to recognize this, what am I doing wrong?
Reproduction:
now I add
// +genclient:nonNamespaced
in the Foo section of the types.go file.Now the code is still generated as if it is a namespaced resource (eg.
exampleInformerFactory.Samplecontroller().V1alpha1().Foos().Lister().Foos()
still takes namespace argument.