Skip to content

Drop use of kcp-dev fork of kubernetes #13

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

Merged

Conversation

fabianvf
Copy link

@fabianvf fabianvf commented Jun 10, 2022

adds plumbing of a NewSharedInformer func that allows us to provide multi-cluster informers without requiring us to depend on the kcp-dev fork of kubernetes

@fabianvf fabianvf marked this pull request as draft June 10, 2022 16:16
@fabianvf fabianvf force-pushed the no-go-mod-changes branch from d93caf4 to 29269aa Compare June 10, 2022 16:17
@fabianvf fabianvf marked this pull request as ready for review June 16, 2022 20:53
@fabianvf fabianvf force-pushed the no-go-mod-changes branch from 12a8fca to 2b949dd Compare June 17, 2022 17:02
- Remove customizable keyfunction
- Add ability to customize function used to build new informers
- Embed cluster name in reconcile.Request instead of client.ObjectKey
@fabianvf fabianvf force-pushed the no-go-mod-changes branch from 2b949dd to 0106f54 Compare June 17, 2022 17:34
Copy link

@MatousJobanek MatousJobanek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@johnmcollier would this PR solve your dependency problems?

Comment on lines +200 to +209
cluster, ok := kcpclient.ClusterFromContext(ctx)
if ok {
return kcpcache.ToClusterAwareKey(cluster.String(), k.Namespace, k.Name)
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like it should support also the case when the context doesn't have the cluster set - in other words in a standard K8s/OpenShift environment. However, I'm afraid that it won't work if the cache reader still depends on the different keys. See the changes in my PR: #14

Copy link

@johnmcollier johnmcollier Jun 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, assuming this works, this should unblock me.

@ncdc
Copy link
Member

ncdc commented Jun 24, 2022

@fabianvf can you squash down the shared_informer.go commits?

@ncdc ncdc force-pushed the no-go-mod-changes branch from d1e449c to 6a6baae Compare June 24, 2022 16:01
@ncdc
Copy link
Member

ncdc commented Jun 24, 2022

@fabianvf's changes LGTM

Copy link
Author

@fabianvf fabianvf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ncdc's changes LGTM

@ncdc ncdc merged commit f6e5a2f into kcp-dev:feature-logical-clusters-1.23 Jun 24, 2022
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.

4 participants