How to use a `k8s.io/kubernetes/plugin/pkg` package?

Hi all, I’m using the k8s.io/kubernetes/plugin/pkg/admission/eventratelimit/apis/eventratelimit package, but because of the k8s.io/kubernetes import then I’m facing this issue: 'unknown revision v0.0.0' errors, seemingly due to 'require k8s.io/foo v0.0.0' · Issue #79384 · kubernetes/kubernetes · GitHub

How can I use/import the package without referencing k8s.io/kubernetes? Is it possible, or do I need to replace all the modules?

k8s io/kubernetes is not really importable. We put no effort into making that clean or easy, and we don’t support it or make any guarantees of API stability.

If you need a specific package from there, please file an issue and we can talk about whether/how to support it.

Thanks Tim for the quick answer. It looks like the dependency I’m using is just importing that package because of the eventratelimit.Configuration struct: kubernetes/plugin/pkg/admission/eventratelimit/apis/eventratelimit/types.go at f248c24456254d6e0668a424a31258e6d9e9c185 · kubernetes/kubernetes · GitHub

Is it something would make sense to “export”? Is it better to discuss this in a proper issue?

Yes, a real issue would be best. We need to know exactly which libraries are trying to depend on something inside kubernetes, so we can figure out if it’s the right thing to do and if so, how or if to externalize that.