Skip to content

Commit a99f795

Browse files
Piotr1215joaniekube
authored andcommitted
fix(vcluster): linter issues
1 parent 7dd01d5 commit a99f795

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

vcluster/configure/vcluster-yaml/sync/to-host/advanced/custom-resources.mdx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ import CertManagerConfig from '!!raw-loader!@site/vcluster/configure/vcluster-ya
1616

1717
vCluster allows you to sync custom resources from the virtual cluster to the host cluster. This allows you to sync arbitrary resources that are by default not synced by vCluster. This only works for resources that have a custom resource definition in the host cluster.
1818

19-
If those custom resources will create other resources inside the host cluster, vCluster will try to find them and sync them back to the host cluster as well. E.g. a [cert-manager](https://cert-manager.io/) certificate creates a secret which will be synced back automatically into the virtual cluster.
19+
If those custom resources create other resources inside the host cluster, vCluster tries to find them and syncs them back to the host cluster as well. E.g. a [cert-manager](https://cert-manager.io/) certificate creates a secret which syncs back automatically into the virtual cluster.
2020

21-
vCluster will automatically add the required cluster and namespace RBAC permissions for retrieving the custom resource definition and syncing the resources from the virtual cluster to the host cluster.
21+
vCluster automatically adds the required cluster and namespace RBAC permissions for retrieving the custom resource definition and syncing the resources from the virtual cluster to the host cluster.
2222
<br />
2323

2424
:::info Only Namespace-Scoped Resource
@@ -29,7 +29,7 @@ This feature currently only works for namespace-scoped resources only.
2929
If you want to sync many custom resources, consider using [multi-namespace-mode](../../../experimental/multi-namespace-mode).
3030
:::
3131

32-
## Enable Custom Resource Syncing
32+
## Enable custom resource syncing {#enable-custom-resource-syncing}
3333

3434
To enable custom resource syncing from the virtual cluster to the host cluster, figure out what CRDs you want to sync via `kubectl get crds`. Add the name into the `customResources` section in the sync section. Even though vCluster syncs custom resources from the virtual cluster to the host cluster, the CRDs are also copied from the host cluster to the virtual cluster.
3535

@@ -45,7 +45,7 @@ sync:
4545
4646
## Patches
4747
48-
You can modify the sync behaviour with patches that target specific paths. Currently there is 2 different kinds of patches supported.
48+
You can modify the sync behavior with patches that target specific paths. Currently there are 2 different kinds of patches supported.
4949
5050
:::info Wildcard patches
5151
You can use `*` in paths to select all entries of an array or object, e.g. `spec.containers[*].name` or `spec.containers[*].volumeMounts[*]`. vCluster calls the patch multiple times.
@@ -75,7 +75,9 @@ vCluster translates the path `spec.secretName` as it points to a secret. If the
7575
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.
7676
:::
7777

78-
### JavaScript Expression Patches
78+
<!-- vale off -->
79+
### JavaScript expression patches {#javascript-expression-patches}
80+
<!-- vale on -->
7981

8082
These are powerful JavaScript ES6 compatible expression patches that can be used to change a field while syncing. You define how it changes when syncing from the virtual cluster into the host cluster or when syncing from the host cluster into the virtual cluster. To add a suffix to certificate DNS names you can do:
8183
```yaml
@@ -100,7 +102,7 @@ There is also a variable called `context` besides `value` that can be used to ac
100102
* `context.virtualObject`: Virtual object (can be null if not available)
101103
* `context.path`: The matched path on the object, useful when using wildcard path selectors (*)
102104

103-
For example, let's assume you want to add `www.` to every DNS name specified in a cert-manager certificate in the path `spec.dnsNames`, you could use the following patch:
105+
For example, to add `www.` to every DNS name specified in a cert-manager certificate in the path `spec.dnsNames`, you can use the following patch:
104106
```yaml
105107
sync:
106108
toHost:
@@ -170,7 +172,7 @@ kubectl --context="${HOST_CTX}" get crd gateways.gateway.networking.k8s.io &> /d
170172
kubectl --context="${HOST_CTX}" apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.2.1/standard-install.yaml
171173
```
172174

173-
### Create Waypoint Gateway
175+
### Create waypoint gateway {#create-waypoint-gateway}
174176

175177
Create a waypoint gateway configuration:
176178

0 commit comments

Comments
 (0)