You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
82
+
These are 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:
83
+
83
84
```yaml
84
85
sync:
85
86
toHost:
@@ -95,14 +96,15 @@ sync:
95
96
```
96
97
97
98
There is also a variable called `context` besides `value` that can be used to access vCluster specific data:
98
-
* `context.vcluster.name`: Name of the virtual cluster
99
-
* `context.vcluster.namespace`: Namespace of the virtual cluster
100
-
* `context.vcluster.config`: Config of the virtual cluster, basically `vcluster.yaml` merged with the defaults
101
-
* `context.hostObject`: Host object (can be null if not available)
102
-
* `context.virtualObject`: Virtual object (can be null if not available)
103
-
* `context.path`: The matched path on the object, useful when using wildcard path selectors (*)
99
+
-`context.vcluster.name`: Name of the virtual cluster
100
+
-`context.vcluster.namespace`: Namespace of the virtual cluster
101
+
-`context.vcluster.config`: Config of the virtual cluster, basically `vcluster.yaml` merged with the defaults
102
+
-`context.hostObject`: Host object (can be null if not available)
103
+
-`context.virtualObject`: Virtual object (can be null if not available)
104
+
-`context.path`: The matched path on the object, useful when using wildcard path selectors (*)
104
105
105
106
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:
0 commit comments