-
Notifications
You must be signed in to change notification settings - Fork 68
⚠️ Update VC controller-runtime #70
⚠️ Update VC controller-runtime #70
Conversation
/assign @Fei-Guo |
/cc @weiling61 |
/kind cleanup |
465cac2
to
8fc0b77
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work. This change bumps up Kubernetes dependency to 1.20 as well.
virtualcluster/pkg/webhook/virtualcluster/virtualcluster_webhook.go
Outdated
Show resolved
Hide resolved
290ef50
to
f4b635e
Compare
We still don't support the one annoying thing about the ClusterVersion CR where if you regenerate it using the proper version of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. (Most changes are due to runtime package switch, no major logic modification)
@weiling61 yup, thanks for giving this a read-through. Something to take into consideration is how the new |
“I've also made one other change to remove us having to have a custom scheme now all "core" types are supported out of the box without us having” Will this make syncing CR resources (not CRD) harder or break existing CR synchronization? |
@Fei-Guo this should make it easier to manage these for folks cause we can leverage a lot of the tools that have been built already like controller-runtimes SchemeBuilder which is preconfigured for all kubebuilder/controller runtime projects. This would allow you to take a package like https://github.com/kubernetes-sigs/kubebuilder/tree/master/testdata/project-v2/api/v1 and all you'd need to do is: import (
"sigs.k8s.io/kubebuilder/testdata/project-v2/api/v1"
"sigs.k8s.io/cluster-api-provider-nested/virtualcluster/pkg/syncer/util/scheme"
)
func init() {
// custom scheme we want to add
v1.AddToScheme(scheme.Scheme)
} This will use the SchemeBuilder from https://github.com/kubernetes-sigs/kubebuilder/blob/master/testdata/project-v2/api/v1/groupversion_info.go#L27-L36 and takes in a defined |
Signed-off-by: Chris Hein <[email protected]>
Signed-off-by: Chris Hein <[email protected]>
f4b635e
to
b56f310
Compare
As I was reviewing that I did make one mistake which I've just cleaned up the |
thanks for your job! controller runtime style client makes everything simple 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Awesome, thanks @zhuangqh. Looks like we just need someone to |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: christopherhein, Fei-Guo, weiling61, zhuangqh The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This is a relatively large change unfortunately, cause controller runtime's APIs changed a fair amount, adding
context
support throughout. Also as ofv1.20.x
kubelet doesn't support redirects anymore only streaming configs which I have filed #69 to which needs to be followed up on.Related
closes #27