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

Consider Update the version of controller-runtime #751

Closed
chengleqi opened this issue Jul 25, 2022 · 1 comment · Fixed by #788
Closed

Consider Update the version of controller-runtime #751

chengleqi opened this issue Jul 25, 2022 · 1 comment · Fixed by #788
Assignees

Comments

@chengleqi
Copy link
Contributor

I encountered a strange problem when I wrote unit test due to the version of controller-runtime.

I use code like this r.Client.List(..., &unstructured.UnstructuredList{}, ...), It run correctly when the Client is RestClient, but It'll run into error when the client is fake client in the unit test scenario.

I found the root cause is this issue, but the PR which fix this issue was merged only in the 0.9.x version of controller-runtime, I tried to update the controller-runtime v0.6.3 => v0.9.7 but It caused too many changes.

So I Added code manually like this in the unit test:

schema.AddKnownTypeWithName(apischema.GroupVersionKind{
        Group:   "helm.toolkit.fluxcd.io",
        Version: "v2beta1",
        Kind:    "HelmReleaseList",
}, &unstructured.UnstructuredList{})

And the fluxcd project actually provide the module which include the HelmRelease type for convenience. But It also need higher version of controller-runtime.

Is it possible to update the controller-runtime version when it arrive version 1.0 or LTS ?

@LinuxSuRen
Copy link
Member

We'd better upgrade controller-runtime at some point. We already talked about this in #353

But as you mentioned, it requires a lot of work on this. I'd like to do it once I got enough time. But please feel free to help on this if there is anyone willing to do it.

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

Successfully merging a pull request may close this issue.

2 participants