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
cluster: scope-down dynamic and discovery clients #231
cluster: scope-down dynamic and discovery clients #231
Conversation
Fixes #236 |
Need to put the fixes details in the PR description to have it auto-close the issue on merge |
deb4ea4
to
04557c8
Compare
This is now just failing on syncing data back from the pcluster to the kcp, with:
|
Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
Instead of expecting a separate kubeconfig context entry for every possible logical cluster we need to operate over, use the client-go helpers for scoping down a cluster-less dynamic client or discovery client to a cluster-scoped one, as needed. Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
04557c8
to
0aae591
Compare
OK, should be working now. Added an e2e. |
0aae591
to
f531d8a
Compare
Note: I will move both this and the sharding "e2e" into the Go-based tests once the framework lands. I know the shell is quite the mouthful but let's just use it as a stop-gap until we have the better approach. |
@@ -27,7 +27,14 @@ func deepEqualStatus(oldObj, newObj interface{}) bool { | |||
return equality.Semantic.DeepEqual(oldStatus, newStatus) | |||
} | |||
|
|||
const statusSyncerAgent = "kcp#status-syncer/v0.0.0" |
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.
this is something I would like to see everywhere, for every controller and component we build. Is therre a good place to add this centrally? E.g. in the kcp startup code?
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.
Yes, but //TODO?
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.
yes, as convention
Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
When you have lots of clients going in both directions it's nice to be able to tell what's going where and why. The user-agent helps with that. Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
f531d8a
to
7fa4fa6
Compare
cluster: scope-down dynamic and discovery clients
Instead of expecting a separate kubeconfig context entry for every
possible logical cluster we need to operate over, use the client-go
helpers for scoping down a cluster-less dynamic client or discovery
client to a cluster-scoped one, as needed.
Signed-off-by: Steve Kuznetsov skuznets@redhat.com
requires kcp-dev/kubernetes#22
Fixes #236