Skip to content
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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Copy link

netlify bot commented Oct 22, 2024

Deploy Preview for vcluster-docs-site ready!

Name Link
🔨 Latest commit 9be9f52
🔍 Latest deploy log https://app.netlify.com/sites/vcluster-docs-site/deploys/672a83dee190f2000852997b
😎 Deploy Preview https://deploy-preview-329--vcluster-docs-site.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

vcluster/_fragments/how-does-syncing-work.mdx Outdated Show resolved Hide resolved
vcluster/_fragments/how-does-syncing-work.mdx Outdated Show resolved Hide resolved
vcluster/_fragments/how-does-syncing-work.mdx Outdated Show resolved Hide resolved
vcluster/_fragments/how-does-syncing-work.mdx Outdated Show resolved Hide resolved
vcluster/_fragments/how-does-syncing-work.mdx Outdated Show resolved Hide resolved
vcluster/_fragments/sync-to-host-resources.mdx Outdated Show resolved Hide resolved
vcluster/_fragments/sync-to-host-resources.mdx Outdated Show resolved Hide resolved
vcluster/_fragments/sync-to-host-resources.mdx Outdated Show resolved Hide resolved
vcluster/configure/vcluster-yaml/sync/README.mdx Outdated Show resolved Hide resolved
vcluster/configure/vcluster-yaml/sync/README.mdx Outdated Show resolved Hide resolved
vcluster/_fragments/how-does-syncing-work.mdx Outdated Show resolved Hide resolved
vcluster/_fragments/how-does-syncing-work.mdx Outdated Show resolved Hide resolved
vcluster/_fragments/how-does-syncing-work.mdx Outdated Show resolved Hide resolved
vcluster/_fragments/how-does-syncing-work.mdx Show resolved Hide resolved
vcluster/_fragments/how-does-syncing-work.mdx Show resolved Hide resolved

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.
Copy link

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.

Copy link
Contributor Author

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/_fragments/how-does-syncing-work.mdx Outdated Show resolved Hide resolved

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:
Copy link

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 ?

Copy link
Contributor Author

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.

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.

3 participants