Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

could not get apiVersion for package k8s.io/apiextensions-apiserver/... #67

Open
guettli opened this issue Jun 19, 2023 · 1 comment
Open

Comments

@guettli
Copy link

guettli commented Jun 19, 2023

I get this error while building my CRD docs.

F0619 10:14:33.489771 188693 main.go:140] could not get apiVersion for package k8s.io/apiextensions-apiserver/pkg/apis/apiextensions: cannot infer kubernetes apiVersion of go package k8s.io/apiextensions-apiserver/pkg/apis/apiextensions (basename "apiextensions" doesn't match expected pattern ^v\d+((alpha|beta)\d+)?$ that's used to determine apiVersion)

Does someone has an idea how to fix or work-around it?

@guettli
Copy link
Author

guettli commented Jun 19, 2023

I modified the source code. I commented out the creation of the error, and added a continue.

Now I could build my docs, but it would be nice make this configurable.

	for _, pkg := range pkgs {
		apiGroup, apiVersion, err := apiVersionForPackage(pkg)
		if err != nil {
			//return nil, errors.Wrapf(err, "could not get apiVersion for package %s", pkg.Path)
			continue
		}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant