-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Envtest: support loading multiple CRDs from a single file #369
Comments
/kind bug Yeah, we should tackle this. It's not hard -- it just requires a tweak to the CRD loading code /help-wanted |
/good-first-issue |
@DirectXMan12: Please ensure the request meets the requirements listed here. If this request no longer meets these requirements, the label can be removed In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/priority important-longterm |
/assign @anthonyho007 |
@anthonyho007: GitHub didn't allow me to assign the following users: anthonyho007. Note that only kubernetes-sigs members and repo collaborators can be assigned and that issues/PRs can only have 10 assignees at the same time. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Hello, I am a first time contributor and I wanted to try taking on this issue. I have been working with the operator-sdk, and so have some familiarity with CRDs, watches, and the controller. But I can't figure out how to build this repository, and didn't find what I was looking for in any of the docs for FAQ. Can someone help me get started? |
Hi, i would like to take this issue, seems like no one is working on it |
Currently envtest supports installing CRDs from yaml at specified paths however it assumes that there is only one CRD per file. Given a single file with multiple CRD documents separated by
---
, envtest will read/install the first document but not the rest. This is confusing while testing because the scheme has all of the correct GVKs but tests will fail when registering the watch for the second CRD in the file with the errorno matches for kind "MyKind" in version "mygroup/version"
. When running outside of tests, there are no errors because all the CRDs get installed properly usingkubectl apply
.I'm not sure the current library used for parsing yaml supports reading multiple documents from a single file however I believe the apimachinery decoder does.
I discovered this issue because I have an external CRD as a dependency of my project which exposes its definitions as a single yaml file.
The text was updated successfully, but these errors were encountered: