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

Refactor using kubebuilder v3.8.0 #30

Merged
merged 13 commits into from
Mar 14, 2023
Merged

Refactor using kubebuilder v3.8.0 #30

merged 13 commits into from
Mar 14, 2023

Conversation

hellt
Copy link
Member

@hellt hellt commented Mar 8, 2023

Using kubebuilder v3.8.0 scaffolding and client-go 0.25.6 and controller-runtime v0.13.1

Additionally, copied clientset impl from #29 to use dynamic clients

@hellt hellt changed the title Update client-go to 0.25.6 and bumpe go to 1.20 Update client-go to 0.25.6 and bump go to 1.20 Mar 8, 2023
@hellt
Copy link
Member Author

hellt commented Mar 9, 2023

Hi @marcushines
I re-created the scaffolding using the kubebuilder v3.8.0 which works with client-go 0.25 and controller-runtime 0.13.
Now the infra errors are gone, and only clientset tests are failing...

Since I am not familiar with dynamic-based clientsets, maybe you know a way out from these errors?

@hellt hellt changed the title Update client-go to 0.25.6 and bump go to 1.20 Refactor using kubebuilder to v3.8.0 Mar 9, 2023
@hellt
Copy link
Member Author

hellt commented Mar 10, 2023

a quick note on the status of this PR - I am looking at removing the clientset entirely and use controller-runtime client instead as this seems to be the new recommended way of managing custom resrouces

@marcushines
Copy link
Contributor

marcushines commented Mar 10, 2023

I don't see how that client removes the use case of a clientset?

the "reconcile" logic that is enacted by a controller is a piece of the puzzle which you are correct using a clientset isn't "required" as you are starting with runtime objects and jsut type asserting them to what you need

But the way kne uses these clients sets is really more like a public from an external client vs. the operator itself

I don't disagree that we should maybe evaluate the CRD structure we have in kne today and maybe adapt it to work alittle more "k8s crd like"

I also see there is a new kl8s aggregation layer api that also looks interesting

@hellt
Copy link
Member Author

hellt commented Mar 10, 2023

@marcushines i will create a draft PR against kne project to have a discussion around this approach. It looks promising and removes the need for clientset using the dynamic client while still working with structured types.

If all goes well I will open a PR today

@hellt hellt changed the title Refactor using kubebuilder to v3.8.0 Refactor using kubebuilder v3.8.0 Mar 10, 2023
@hellt hellt merged commit ea8eb0a into main Mar 14, 2023
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 this pull request may close these issues.

2 participants