-
Notifications
You must be signed in to change notification settings - Fork 26
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
Update explaining syncing and bi-directional syncing #329
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for vcluster-docs-site ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
d5a1522
to
265ec8c
Compare
|
||
If the resource is being asked to sync from the virtual cluster to the host cluster, vCluster copies the resources from the vCluster and sends it to the host cluster to be created. There are | ||
a couple of additional labels added to the host cluster resource object for vCluster to keep it in sync. The syncer starts watching for changes to the resource on either side. When the resource | ||
is updated in the virtual cluster, the syncer copies those changes in host cluster. |
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.
What happens when a change happens in the host for a one-way sync field ? I assume they are overwritten, but knowing if it is immediate or delayed to next controller run would be nice. A bug caused by this might show up 20 minutes or 1/2 day later and be hard to diagnose.
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.
Good point, I'll write/clarify this.
Basically, changes in the host cluster are overwritten whenever the virtual cluster resource is synced to the host cluster unless it's a bi-directional field.
I'll need to check how often we sync.
|
||
vCluster also allows to sync custom resources via the [custom resource definitions syncer](../configure/vcluster-yaml/sync/from-host/custom-resources.mdx) | ||
|
||
### Enabled by Default | ||
There are a couple of labels that are created on the host cluster by vCluster that never get synced to the virtual cluster resource. These labels are: |
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.
I'm actually confused by this part. Are the labels added on to objects in the host cluster for any host->virtual synced objects ? Meaning if a node in the host is synced down to multiple vclusters, it gets these labels applied directly to its (original host-cluster) node object ?
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.
I need to clarify on what happens as it wasn't clear with the original docs.
I know from virtual -> host, we create a set of new labels on the host cluster, that don't exist on the virtual cluster.
On host -> virtual, I am not sure what labels we add in and when. I'll need to clarify and check.
Updated https://deploy-preview-329--vcluster-docs-site.netlify.app/docs/vcluster/next/configure/vcluster-yaml/sync/
Also updated but the content is duplicated from above.
https://deploy-preview-329--vcluster-docs-site.netlify.app/docs/vcluster/next/configure/vcluster-yaml/sync/to-host
https://deploy-preview-329--vcluster-docs-site.netlify.app/docs/vcluster/next/configure/vcluster-yaml/sync/from-host