Sync from host to virtual
This feature is only available for the following:
- Host Nodes
Read more about how syncing works before deciding which resources to sync from the host cluster to the virtual cluster.
vCluster can sync certain resources from the host cluster to make them available inside the virtual cluster, but when these resources are synced, they are only synced in read-only mode. No changes to the resource in the virtual cluster syncs back to the host cluster as the resources are shared across the host cluster.
A good example would be nodes, which are nice to view inside the virtual cluster and can be also used to enabled certain features such as scheduling inside the vCluster, but you wouldn't want your virtual cluster to change the node itself. Another benefit of only syncing from host is that vCluster itself only requires read-only RBAC permissions.
vCluster also allows to sync custom resources via the custom resource definitions syncer
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:
release(Label is needed to avoid conflicts with the vCluster pods themselves).vcluster.loft.sh/namespacevcluster.loft.sh/managed-byvcluster.loft.sh/controlled-by
Resource creation behaviorβ
Cluster-scoped resources are surfaced read-only. If they donβt already exist in the virtual cluster, they are not created during sync. This includes:
- Nodes
- IngressClasses
- StorageClasses
- CSINodes
- CSIDrivers
- Cluster-scoped CustomResources
Namespaced resources are materialized in the virtual cluster if they donβt already exist. This includes:
- Events
- CSIStorageCapacities
- ConfigMaps
- Secrets
- namespace-scoped CustomResources
Enabled by defaultβ
Disabled by defaultβ
- CustomResources
- Nodes
- IngressClasses
- StorageClasses
- CSINodes
- CSIDrivers
- CSIStorageCapacities
- ConfigMaps
- Secrets
No bi-directional syncingβ
Since syncing resources from the host cluster is in read only mode and changes in the virtual cluster do not get applied to the resource in the host cluster, bi-directional syncing does not exist across these resources.
Config referenceβ
fromHost required object β
Configure what resources vCluster should sync from the host cluster to the virtual cluster.
fromHost required object βnodes required object β
Nodes defines if nodes should get synced from the host cluster to the virtual cluster, but not back.
nodes required object βenabled required boolean false β
Enabled specifies if syncing real nodes should be enabled. If this is disabled, vCluster will create fake nodes instead.
enabled required boolean false βsyncBackChanges required boolean false β
SyncBackChanges enables syncing labels and taints from the virtual cluster to the host cluster. If this is enabled someone within the virtual cluster will be able to change the labels and taints of the host cluster node.
syncBackChanges required boolean false βclearImageStatus required boolean false β
ClearImageStatus will erase the image status when syncing a node. This allows to hide images that are pulled by the node.
clearImageStatus required boolean false βselector required object β
Selector can be used to define more granular what nodes should get synced from the host cluster to the virtual cluster.
selector required object βall required boolean false β
All specifies if all nodes should get synced by vCluster from the host to the virtual cluster or only the ones where pods are assigned to.
all required boolean false βlabels required object {} β
Labels are the node labels used to sync nodes from host cluster to virtual cluster. This will also set the node selector when syncing a pod from virtual cluster to host cluster to the same value.
labels required object {} βpatches required object[] β
Patches patch the resource according to the provided specification.
patches required object[] βpath required string β
Path is the path within the patch to target. If the path is not found within the patch, the patch is not applied.
path required string βexpression required string β
Expression transforms the value according to the given JavaScript expression.
expression required string βreverseExpression required string β
ReverseExpression transforms the value according to the given JavaScript expression.
reverseExpression required string βreference required object β
Reference treats the path value as a reference to another object and will rewrite it based on the chosen mode
automatically. In single-namespace mode this will translate the name to "vxxxxxxxxx" to avoid conflicts with
other names, in multi-namespace mode this will not translate the name.
reference required object βapiVersion required string β
APIVersion is the apiVersion of the referenced object.
apiVersion required string βapiVersionPath required string β
APIVersionPath is optional relative path to use to determine the kind. If APIVersionPath is not found, will fallback to apiVersion.
apiVersionPath required string βkind required string β
Kind is the kind of the referenced object.
kind required string βkindPath required string β
KindPath is the optional relative path to use to determine the kind. If KindPath is not found, will fallback to kind.
kindPath required string βnamePath required string β
NamePath is the optional relative path to the reference name within the object.
namePath required string βnamespacePath required string β
NamespacePath is the optional relative path to the reference namespace within the object. If omitted or not found, namespacePath equals to the
metadata.namespace path of the object.
namespacePath required string βlabels required object β
Labels treats the path value as a labels selector.
labels required object βevents required object β
Events defines if events should get synced from the host cluster to the virtual cluster, but not back.
events required object βenabled required boolean true β
Enabled defines if this option should be enabled.
enabled required boolean true βpatches required object[] β
Patches patch the resource according to the provided specification.
patches required object[] βpath required string β
Path is the path within the patch to target. If the path is not found within the patch, the patch is not applied.
path required string βexpression required string β
Expression transforms the value according to the given JavaScript expression.
expression required string βreverseExpression required string β
ReverseExpression transforms the value according to the given JavaScript expression.
reverseExpression required string βreference required object β
Reference treats the path value as a reference to another object and will rewrite it based on the chosen mode
automatically. In single-namespace mode this will translate the name to "vxxxxxxxxx" to avoid conflicts with
other names, in multi-namespace mode this will not translate the name.
reference required object βapiVersion required string β
APIVersion is the apiVersion of the referenced object.
apiVersion required string βapiVersionPath required string β
APIVersionPath is optional relative path to use to determine the kind. If APIVersionPath is not found, will fallback to apiVersion.
apiVersionPath required string βkind required string β
Kind is the kind of the referenced object.
kind required string βkindPath required string β
KindPath is the optional relative path to use to determine the kind. If KindPath is not found, will fallback to kind.
kindPath required string βnamePath required string β
NamePath is the optional relative path to the reference name within the object.
namePath required string βnamespacePath required string β
NamespacePath is the optional relative path to the reference namespace within the object. If omitted or not found, namespacePath equals to the
metadata.namespace path of the object.
namespacePath required string βlabels required object β
Labels treats the path value as a labels selector.
labels required object βingressClasses required object β
IngressClasses defines if ingress classes should get synced from the host cluster to the virtual cluster, but not back.
ingressClasses required object βenabled required boolean false β
Enabled defines if this option should be enabled.
enabled required boolean false βpatches required object[] β
Patches patch the resource according to the provided specification.
patches required object[] βpath required string β
Path is the path within the patch to target. If the path is not found within the patch, the patch is not applied.
path required string βexpression required string β
Expression transforms the value according to the given JavaScript expression.
expression required string βreverseExpression required string β
ReverseExpression transforms the value according to the given JavaScript expression.
reverseExpression required string βreference required object β
Reference treats the path value as a reference to another object and will rewrite it based on the chosen mode
automatically. In single-namespace mode this will translate the name to "vxxxxxxxxx" to avoid conflicts with
other names, in multi-namespace mode this will not translate the name.
reference required object βapiVersion required string β
APIVersion is the apiVersion of the referenced object.
apiVersion required string βapiVersionPath required string β
APIVersionPath is optional relative path to use to determine the kind. If APIVersionPath is not found, will fallback to apiVersion.
apiVersionPath required string βkind required string β
Kind is the kind of the referenced object.
kind required string βkindPath required string β
KindPath is the optional relative path to use to determine the kind. If KindPath is not found, will fallback to kind.
kindPath required string βnamePath required string β
NamePath is the optional relative path to the reference name within the object.
namePath required string βnamespacePath required string β
NamespacePath is the optional relative path to the reference namespace within the object. If omitted or not found, namespacePath equals to the
metadata.namespace path of the object.
namespacePath required string βlabels required object β
Labels treats the path value as a labels selector.
labels required object βruntimeClasses required object β
RuntimeClasses defines if runtime classes should get synced from the host cluster to the virtual cluster, but not back.
runtimeClasses required object βenabled required boolean false β
Enabled defines if this option should be enabled.
enabled required boolean false βpatches required object[] β
Patches patch the resource according to the provided specification.
patches required object[] βpath required string β
Path is the path within the patch to target. If the path is not found within the patch, the patch is not applied.
path required string βexpression required string β
Expression transforms the value according to the given JavaScript expression.
expression required string βreverseExpression required string β
ReverseExpression transforms the value according to the given JavaScript expression.
reverseExpression required string βreference required object β
Reference treats the path value as a reference to another object and will rewrite it based on the chosen mode
automatically. In single-namespace mode this will translate the name to "vxxxxxxxxx" to avoid conflicts with
other names, in multi-namespace mode this will not translate the name.
reference required object βapiVersion required string β
APIVersion is the apiVersion of the referenced object.
apiVersion required string βapiVersionPath required string β
APIVersionPath is optional relative path to use to determine the kind. If APIVersionPath is not found, will fallback to apiVersion.
apiVersionPath required string βkind required string β
Kind is the kind of the referenced object.
kind required string βkindPath required string β
KindPath is the optional relative path to use to determine the kind. If KindPath is not found, will fallback to kind.
kindPath required string βnamePath required string β
NamePath is the optional relative path to the reference name within the object.
namePath required string βnamespacePath required string β
NamespacePath is the optional relative path to the reference namespace within the object. If omitted or not found, namespacePath equals to the
metadata.namespace path of the object.
namespacePath required string βlabels required object β
Labels treats the path value as a labels selector.
labels required object βpriorityClasses required object β
PriorityClasses defines if priority classes classes should get synced from the host cluster to the virtual cluster, but not back.
priorityClasses required object βenabled required boolean false β
Enabled defines if this option should be enabled.
enabled required boolean false βpatches required object[] β
Patches patch the resource according to the provided specification.
patches required object[] βpath required string β
Path is the path within the patch to target. If the path is not found within the patch, the patch is not applied.
path required string βexpression required string β
Expression transforms the value according to the given JavaScript expression.
expression required string βreverseExpression required string β
ReverseExpression transforms the value according to the given JavaScript expression.
reverseExpression required string βreference required object β
Reference treats the path value as a reference to another object and will rewrite it based on the chosen mode
automatically. In single-namespace mode this will translate the name to "vxxxxxxxxx" to avoid conflicts with
other names, in multi-namespace mode this will not translate the name.
reference required object βapiVersion required string β
APIVersion is the apiVersion of the referenced object.
apiVersion required string βapiVersionPath required string β
APIVersionPath is optional relative path to use to determine the kind. If APIVersionPath is not found, will fallback to apiVersion.
apiVersionPath required string βkind required string β
Kind is the kind of the referenced object.
kind required string βkindPath required string β
KindPath is the optional relative path to use to determine the kind. If KindPath is not found, will fallback to kind.
kindPath required string βnamePath required string β
NamePath is the optional relative path to the reference name within the object.
namePath required string βnamespacePath required string β
NamespacePath is the optional relative path to the reference namespace within the object. If omitted or not found, namespacePath equals to the
metadata.namespace path of the object.
namespacePath required string βlabels required object β
Labels treats the path value as a labels selector.
labels required object βstorageClasses required object β
StorageClasses defines if storage classes should get synced from the host cluster to the virtual cluster, but not back. If auto, is automatically enabled when the virtual scheduler is enabled.
storageClasses required object βenabled required string|boolean auto β
Enabled defines if this option should be enabled.
enabled required string|boolean auto βpatches required object[] β
Patches patch the resource according to the provided specification.
patches required object[] βpath required string β
Path is the path within the patch to target. If the path is not found within the patch, the patch is not applied.
path required string βexpression required string β
Expression transforms the value according to the given JavaScript expression.
expression required string βreverseExpression required string β
ReverseExpression transforms the value according to the given JavaScript expression.
reverseExpression required string βreference required object β
Reference treats the path value as a reference to another object and will rewrite it based on the chosen mode
automatically. In single-namespace mode this will translate the name to "vxxxxxxxxx" to avoid conflicts with
other names, in multi-namespace mode this will not translate the name.
reference required object βapiVersion required string β
APIVersion is the apiVersion of the referenced object.
apiVersion required string βapiVersionPath required string β
APIVersionPath is optional relative path to use to determine the kind. If APIVersionPath is not found, will fallback to apiVersion.
apiVersionPath required string βkind required string β
Kind is the kind of the referenced object.
kind required string βkindPath required string β
KindPath is the optional relative path to use to determine the kind. If KindPath is not found, will fallback to kind.
kindPath required string βnamePath required string β
NamePath is the optional relative path to the reference name within the object.
namePath required string βnamespacePath required string β
NamespacePath is the optional relative path to the reference namespace within the object. If omitted or not found, namespacePath equals to the
metadata.namespace path of the object.
namespacePath required string βlabels required object β
Labels treats the path value as a labels selector.
labels required object βcsiNodes required object β
CSINodes defines if csi nodes should get synced from the host cluster to the virtual cluster, but not back. If auto, is automatically enabled when the virtual scheduler is enabled.
csiNodes required object βenabled required string|boolean auto β
Enabled defines if this option should be enabled.
enabled required string|boolean auto βpatches required object[] β
Patches patch the resource according to the provided specification.
patches required object[] βpath required string β
Path is the path within the patch to target. If the path is not found within the patch, the patch is not applied.
path required string βexpression required string β
Expression transforms the value according to the given JavaScript expression.
expression required string βreverseExpression required string β
ReverseExpression transforms the value according to the given JavaScript expression.
reverseExpression required string βreference required object β
Reference treats the path value as a reference to another object and will rewrite it based on the chosen mode
automatically. In single-namespace mode this will translate the name to "vxxxxxxxxx" to avoid conflicts with
other names, in multi-namespace mode this will not translate the name.
reference required object βapiVersion required string β
APIVersion is the apiVersion of the referenced object.
apiVersion required string βapiVersionPath required string β
APIVersionPath is optional relative path to use to determine the kind. If APIVersionPath is not found, will fallback to apiVersion.
apiVersionPath required string βkind required string β
Kind is the kind of the referenced object.
kind required string βkindPath required string β
KindPath is the optional relative path to use to determine the kind. If KindPath is not found, will fallback to kind.
kindPath required string βnamePath required string β
NamePath is the optional relative path to the reference name within the object.
namePath required string βnamespacePath required string β
NamespacePath is the optional relative path to the reference namespace within the object. If omitted or not found, namespacePath equals to the
metadata.namespace path of the object.
namespacePath required string βlabels required object β
Labels treats the path value as a labels selector.
labels required object βcsiDrivers required object β
CSIDrivers defines if csi drivers should get synced from the host cluster to the virtual cluster, but not back. If auto, is automatically enabled when the virtual scheduler is enabled.
csiDrivers required object βenabled required string|boolean auto β
Enabled defines if this option should be enabled.
enabled required string|boolean auto βpatches required object[] β
Patches patch the resource according to the provided specification.
patches required object[] βpath required string β
Path is the path within the patch to target. If the path is not found within the patch, the patch is not applied.
path required string βexpression required string β
Expression transforms the value according to the given JavaScript expression.
expression required string βreverseExpression required string β
ReverseExpression transforms the value according to the given JavaScript expression.
reverseExpression required string βreference required object β
Reference treats the path value as a reference to another object and will rewrite it based on the chosen mode
automatically. In single-namespace mode this will translate the name to "vxxxxxxxxx" to avoid conflicts with
other names, in multi-namespace mode this will not translate the name.
reference required object βapiVersion required string β
APIVersion is the apiVersion of the referenced object.
apiVersion required string βapiVersionPath required string β
APIVersionPath is optional relative path to use to determine the kind. If APIVersionPath is not found, will fallback to apiVersion.
apiVersionPath required string βkind required string β
Kind is the kind of the referenced object.
kind required string βkindPath required string β
KindPath is the optional relative path to use to determine the kind. If KindPath is not found, will fallback to kind.
kindPath required string βnamePath required string β
NamePath is the optional relative path to the reference name within the object.
namePath required string βnamespacePath required string β
NamespacePath is the optional relative path to the reference namespace within the object. If omitted or not found, namespacePath equals to the
metadata.namespace path of the object.
namespacePath required string βlabels required object β
Labels treats the path value as a labels selector.
labels required object βcsiStorageCapacities required object β
CSIStorageCapacities defines if csi storage capacities should get synced from the host cluster to the virtual cluster, but not back. If auto, is automatically enabled when the virtual scheduler is enabled.
csiStorageCapacities required object βenabled required string|boolean auto β
Enabled defines if this option should be enabled.
enabled required string|boolean auto βpatches required object[] β
Patches patch the resource according to the provided specification.
patches required object[] βpath required string β
Path is the path within the patch to target. If the path is not found within the patch, the patch is not applied.
path required string βexpression required string β
Expression transforms the value according to the given JavaScript expression.
expression required string βreverseExpression required string β
ReverseExpression transforms the value according to the given JavaScript expression.
reverseExpression required string βreference required object β
Reference treats the path value as a reference to another object and will rewrite it based on the chosen mode
automatically. In single-namespace mode this will translate the name to "vxxxxxxxxx" to avoid conflicts with
other names, in multi-namespace mode this will not translate the name.
reference required object βapiVersion required string β
APIVersion is the apiVersion of the referenced object.
apiVersion required string βapiVersionPath required string β
APIVersionPath is optional relative path to use to determine the kind. If APIVersionPath is not found, will fallback to apiVersion.
apiVersionPath required string βkind required string β
Kind is the kind of the referenced object.
kind required string βkindPath required string β
KindPath is the optional relative path to use to determine the kind. If KindPath is not found, will fallback to kind.
kindPath required string βnamePath required string β
NamePath is the optional relative path to the reference name within the object.
namePath required string βnamespacePath required string β
NamespacePath is the optional relative path to the reference namespace within the object. If omitted or not found, namespacePath equals to the
metadata.namespace path of the object.
namespacePath required string βlabels required object β
Labels treats the path value as a labels selector.
labels required object βcustomResources required {key: object} β
CustomResources defines what custom resources should get synced read-only to the virtual cluster from the host cluster. vCluster will automatically add any required RBAC to the vCluster cluster role.
customResources required {key: object} βenabled required boolean β
Enabled defines if this option should be enabled.
enabled required boolean βscope required string β
Scope defines the scope of the resource
scope required string βpatches required object[] β
Patches patch the resource according to the provided specification.
patches required object[] βpath required string β
Path is the path within the patch to target. If the path is not found within the patch, the patch is not applied.
path required string βexpression required string β
Expression transforms the value according to the given JavaScript expression.
expression required string βreverseExpression required string β
ReverseExpression transforms the value according to the given JavaScript expression.
reverseExpression required string βreference required object β
Reference treats the path value as a reference to another object and will rewrite it based on the chosen mode
automatically. In single-namespace mode this will translate the name to "vxxxxxxxxx" to avoid conflicts with
other names, in multi-namespace mode this will not translate the name.
reference required object βapiVersion required string β
APIVersion is the apiVersion of the referenced object.
apiVersion required string βapiVersionPath required string β
APIVersionPath is optional relative path to use to determine the kind. If APIVersionPath is not found, will fallback to apiVersion.
apiVersionPath required string βkind required string β
Kind is the kind of the referenced object.
kind required string βkindPath required string β
KindPath is the optional relative path to use to determine the kind. If KindPath is not found, will fallback to kind.
kindPath required string βnamePath required string β
NamePath is the optional relative path to the reference name within the object.
namePath required string βnamespacePath required string β
NamespacePath is the optional relative path to the reference namespace within the object. If omitted or not found, namespacePath equals to the
metadata.namespace path of the object.
namespacePath required string βlabels required object β
Labels treats the path value as a labels selector.
labels required object βmappings required object β
Mappings for Namespace and Object
mappings required object βbyName required object β
ByName is a map of host-object-namespace/host-object-name: virtual-object-namespace/virtual-object-name.
There are several wildcards supported:
- To match all objects in host namespace and sync them to different namespace in vCluster:
byName:
"foo/": "foo-in-virtual/"
- To match specific object in the host namespace and sync it to the same namespace with the same name:
byName:
"foo/my-object": "foo/my-object"
- To match specific object in the host namespace and sync it to the same namespace with different name:
byName:
"foo/my-object": "foo/my-virtual-object"
- To match all objects in the vCluster host namespace and sync them to a different namespace in vCluster:
byName:
"": "my-virtual-namespace/*"
- To match specific objects in the vCluster host namespace and sync them to a different namespace in vCluster:
byName:
"/my-object": "my-virtual-namespace/my-object"
byName required object βvolumeSnapshotClasses required object β
VolumeSnapshotClasses defines if volume snapshot classes created within the virtual cluster should get synced to the host cluster.
volumeSnapshotClasses required object βenabled required boolean false β
Enabled defines if this option should be enabled.
enabled required boolean false βpatches required object[] β
Patches patch the resource according to the provided specification.
patches required object[] βpath required string β
Path is the path within the patch to target. If the path is not found within the patch, the patch is not applied.
path required string βexpression required string β
Expression transforms the value according to the given JavaScript expression.
expression required string βreverseExpression required string β
ReverseExpression transforms the value according to the given JavaScript expression.
reverseExpression required string βreference required object β
Reference treats the path value as a reference to another object and will rewrite it based on the chosen mode
automatically. In single-namespace mode this will translate the name to "vxxxxxxxxx" to avoid conflicts with
other names, in multi-namespace mode this will not translate the name.
reference required object βapiVersion required string β
APIVersion is the apiVersion of the referenced object.
apiVersion required string βapiVersionPath required string β
APIVersionPath is optional relative path to use to determine the kind. If APIVersionPath is not found, will fallback to apiVersion.
apiVersionPath required string βkind required string β
Kind is the kind of the referenced object.
kind required string βkindPath required string β
KindPath is the optional relative path to use to determine the kind. If KindPath is not found, will fallback to kind.
kindPath required string βnamePath required string β
NamePath is the optional relative path to the reference name within the object.
namePath required string βnamespacePath required string β
NamespacePath is the optional relative path to the reference namespace within the object. If omitted or not found, namespacePath equals to the
metadata.namespace path of the object.
namespacePath required string βlabels required object β
Labels treats the path value as a labels selector.
labels required object βconfigMaps required object β
ConfigMaps defines if config maps in the host should get synced to the virtual cluster.
configMaps required object βenabled required boolean false β
Enabled defines if this option should be enabled.
enabled required boolean false βpatches required object[] β
Patches patch the resource according to the provided specification.
patches required object[] βpath required string β
Path is the path within the patch to target. If the path is not found within the patch, the patch is not applied.
path required string βexpression required string β
Expression transforms the value according to the given JavaScript expression.
expression required string βreverseExpression required string β
ReverseExpression transforms the value according to the given JavaScript expression.
reverseExpression required string βreference required object β
Reference treats the path value as a reference to another object and will rewrite it based on the chosen mode
automatically. In single-namespace mode this will translate the name to "vxxxxxxxxx" to avoid conflicts with
other names, in multi-namespace mode this will not translate the name.
reference required object βapiVersion required string β
APIVersion is the apiVersion of the referenced object.
apiVersion required string βapiVersionPath required string β
APIVersionPath is optional relative path to use to determine the kind. If APIVersionPath is not found, will fallback to apiVersion.
apiVersionPath required string βkind required string β
Kind is the kind of the referenced object.
kind required string βkindPath required string β
KindPath is the optional relative path to use to determine the kind. If KindPath is not found, will fallback to kind.
kindPath required string βnamePath required string β
NamePath is the optional relative path to the reference name within the object.
namePath required string βnamespacePath required string β
NamespacePath is the optional relative path to the reference namespace within the object. If omitted or not found, namespacePath equals to the
metadata.namespace path of the object.
namespacePath required string βlabels required object β
Labels treats the path value as a labels selector.
labels required object βmappings required object β
Mappings for Namespace and Object
mappings required object βbyName required object {} β
ByName is a map of host-object-namespace/host-object-name: virtual-object-namespace/virtual-object-name.
There are several wildcards supported:
- To match all objects in host namespace and sync them to different namespace in vCluster:
byName:
"foo/": "foo-in-virtual/"
- To match specific object in the host namespace and sync it to the same namespace with the same name:
byName:
"foo/my-object": "foo/my-object"
- To match specific object in the host namespace and sync it to the same namespace with different name:
byName:
"foo/my-object": "foo/my-virtual-object"
- To match all objects in the vCluster host namespace and sync them to a different namespace in vCluster:
byName:
"": "my-virtual-namespace/*"
- To match specific objects in the vCluster host namespace and sync them to a different namespace in vCluster:
byName:
"/my-object": "my-virtual-namespace/my-object"
byName required object {} βsecrets required object β
Secrets defines if secrets in the host should get synced to the virtual cluster.
secrets required object βenabled required boolean false β
Enabled defines if this option should be enabled.
enabled required boolean false βpatches required object[] β
Patches patch the resource according to the provided specification.
patches required object[] βpath required string β
Path is the path within the patch to target. If the path is not found within the patch, the patch is not applied.
path required string βexpression required string β
Expression transforms the value according to the given JavaScript expression.
expression required string βreverseExpression required string β
ReverseExpression transforms the value according to the given JavaScript expression.
reverseExpression required string βreference required object β
Reference treats the path value as a reference to another object and will rewrite it based on the chosen mode
automatically. In single-namespace mode this will translate the name to "vxxxxxxxxx" to avoid conflicts with
other names, in multi-namespace mode this will not translate the name.
reference required object βapiVersion required string β
APIVersion is the apiVersion of the referenced object.
apiVersion required string βapiVersionPath required string β
APIVersionPath is optional relative path to use to determine the kind. If APIVersionPath is not found, will fallback to apiVersion.
apiVersionPath required string βkind required string β
Kind is the kind of the referenced object.
kind required string βkindPath required string β
KindPath is the optional relative path to use to determine the kind. If KindPath is not found, will fallback to kind.
kindPath required string βnamePath required string β
NamePath is the optional relative path to the reference name within the object.
namePath required string βnamespacePath required string β
NamespacePath is the optional relative path to the reference namespace within the object. If omitted or not found, namespacePath equals to the
metadata.namespace path of the object.
namespacePath required string βlabels required object β
Labels treats the path value as a labels selector.
labels required object βmappings required object β
Mappings for Namespace and Object
mappings required object βbyName required object {} β
ByName is a map of host-object-namespace/host-object-name: virtual-object-namespace/virtual-object-name.
There are several wildcards supported:
- To match all objects in host namespace and sync them to different namespace in vCluster:
byName:
"foo/": "foo-in-virtual/"
- To match specific object in the host namespace and sync it to the same namespace with the same name:
byName:
"foo/my-object": "foo/my-object"
- To match specific object in the host namespace and sync it to the same namespace with different name:
byName:
"foo/my-object": "foo/my-virtual-object"
- To match all objects in the vCluster host namespace and sync them to a different namespace in vCluster:
byName:
"": "my-virtual-namespace/*"
- To match specific objects in the vCluster host namespace and sync them to a different namespace in vCluster:
byName:
"/my-object": "my-virtual-namespace/my-object"
byName required object {} β