Closed lburgazzoli closed 1 year ago
I've added some details about the use cases, and a possible fix in #520.
IMO --resources-to-sync
is strickly for kcp->pcluster. It is not meant for any kind of two-way sync. If we want that, we need an API to specify those objects.
Also it is not clear that we actually want to persist pods in kcp. There are different in nature from the resources-to-sync
resources because the spec is owned by the pcluster. We have talked about a proxy mechanism the syncer would provide and the kcp apiserver could use to return pods, basically tunneled through from the pcluster.
The key point here IMO is how transparent that is for external controllers / clients. Ideally, that should be completely transparent to them.
I totally agree with the use-case. Non-kcp-native, non-federation-aware controllers expect pods. So if we want a kube-native experience we have to make pods visible. My point is how we do that and how we instruct the system to do it.
As background: pods have high cardinality and are heavy on updates. Making them visible via the syncer might quickly exhaust our load budget for individual workspaces.
And all this only talks about the 1:1 (non-federation) case. The moment two pclusters are involved, even naming of pods is not guaranteed to be unique. Imagine during a rolling migration to a new pcluster (eventually) we have two sources of pods.
To sum up: not saying we don't want this. We want and need pod visiblity, just slowing down a bit to make a plan how we want to implement it :)
@sttts thanks, everything you've said makes total sense! Better giving it more thinking, and doing it right 👍🏼.
Related: #25
Describe the bug Pods are not synced from the physical cluster back to kcp
To Reproduce Started kcp from main with
kcp starts and reports:
Then register a physical cluster named
my-cluster
using kind Then create a deploymentAt this point, the deployment gets synchronized with the physical cluster to a namespace created by kcp and the related pods starts:
However when looking at kcp, I see that the deployment is properly synced and reported as running but I don't see any pod being synced back:
Expected behavior Pods should be synced to kcp