Skip to content

Commit 568cd3d

Browse files
authored
make this render correctly
1 parent e62bc9d commit 568cd3d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

vcluster/_fragments/patches.mdx

+4-4
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ When using the asterisk (`*`) notation, vCluster applies changes individually to
2525
A JavaScript expression patch allows you to use JavaScript ES6 expressions to change specific fields when syncing between virtual and host clusters.
2626
This is useful when modifying resource configurations to align with differing environments or naming conventions between clusters. If your clusters use different container name prefixes, a JavaScript expression patch can automatically update them.
2727

28-
You can define a path for <code>{`<span>${props.path}</span>`}</code> field in `vcluster.yaml` using the following configuration:
28+
You can define a path for <code>{props.path}</code> field in `vcluster.yaml` using the following configuration:
2929

3030
<CodeBlock language="yaml">
3131
{`sync:
@@ -41,8 +41,8 @@ You can define a path for <code>{`<span>${props.path}</span>`}</code> field in `
4141

4242
In the example:
4343

44-
- The path targets the <code>{`<span>${props.path}</span>`}</code> field to override when syncing to the host cluster. The `*` wildcard applies the patch to each container individually.
45-
- `"'my-prefix-' + value"` defines a JavaScript expression that prepends `"my-prefix-"` to the <code>{`<span>${props.path}</span>`}</code> field in the host cluster.
44+
- The path targets the <code>{props.path}</code> field to override when syncing to the host cluster. The `*` wildcard applies the patch to each container individually.
45+
- `"'my-prefix-' + value"` defines a JavaScript expression that prepends `"my-prefix-"` to the <code>{props.path}</code> field in the host cluster.
4646

4747
:::note Reverse sync
4848
You can use the `reverseExpression` field to define how to revert changes when syncing from the host cluster back to the virtual cluster.
@@ -87,7 +87,7 @@ You can sync between the virtual cluster and the host cluster by mapping `spec.s
8787
In the example:
8888

8989
- The code uses a patch to add `metadata.annotations["my-secret-ref"]`
90-
- It references a `Secret` in the host cluster using the patch and ensures <code>{`<span>${props.resource}</span>`}</code> in the host cluster links to the correct `Secret`.
90+
- It references a `Secret` in the host cluster using the patch and ensures <code>{props.resource}</code> in the host cluster links to the correct `Secret`.
9191

9292
:::info Multi namespace mode
9393
With multi-namespace mode you only need to rewrite references that include a namespace. You can use the `namespacePath` option to specify the path of the namespace of the reference.

0 commit comments

Comments
 (0)