kubernetes-ingress icon indicating copy to clipboard operation
kubernetes-ingress copied to clipboard

Unable to use CRDs imported as modules

Open nixx opened this issue 2 years ago • 7 comments

Describe the bug When automating the configuration for NGINX Ingress Controller, we need access to the CRDs. Importing them as a golang module, is preferrable.

To Reproduce Steps to reproduce the behavior: Running " go get -u github.com/nginxinc/kubernetes-ingress" will fail with " require github.com/nginxinc/kubernetes-ingress: version "v3.1.0" invalid: should be v0 or v1, not v3"

This is fixable with adding /v3 in the module name in go.mod.

Expected behavior Expecting to be able to import the module. I do get around it with psedo-versions (go get -u github.com/nginxinc/[email protected])

Your environment v3.1.0 Kubernetes: N/A

nixx avatar Apr 14 '23 14:04 nixx

Hi @nixx thanks for reporting!

Be sure to check out the docs and the Contributing Guidelines while you wait for a human to take a look at this :slightly_smiling_face:

Cheers!

github-actions[bot] avatar Apr 14 '23 14:04 github-actions[bot]

Hi @nixx the Ingress Controller is not really designed to be imported as a module. Can you share more info about your workflow and how you use it as a module? I think it's the first time we hear about this use case 🙂

lucacome avatar Apr 27 '23 00:04 lucacome

Hi @nixx, Thanks for reporting the issue. We are planning to make the module importable, so packages could be used by referencing v3.

jjngx avatar May 17 '23 16:05 jjngx

reopening as merging https://github.com/nginxinc/kubernetes-ingress/pull/4152 is causing local build issue as described in https://github.com/nginxinc/kubernetes-ingress/issues/4324 cc @9bany @jjngx @danielnginx

vepatel avatar Sep 06 '23 09:09 vepatel

https://go.dev/doc/modules/release-workflow https://pkg.go.dev/github.com/nginxinc/kubernetes-ingress

vepatel avatar Dec 05 '23 10:12 vepatel

@nixx which packages do you want to import to your module?

for the ref

jjngx avatar Dec 21 '23 14:12 jjngx

Work on this item can be resumed when we get more information from @nixx, and possible target V4 (version 4.0.0) of the Kubernetes-ingress module.

jjngx avatar Jan 03 '24 14:01 jjngx