Skip to content

Commit d35bc8e

Browse files
authored
Update priority-classes.mdx
1 parent 3473e4c commit d35bc8e

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

vcluster/configure/vcluster-yaml/sync/from-host/priority-classes.mdx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ description: Configure priority classes in vCluster
77

88
import EnableSwitch from '../../../../_partials/config/sync/fromHost/priorityClasses.mdx'
99

10-
# PriorityClass Syncing
10+
<!-- vale off -->
11+
12+
# PriorityClass syncing
1113

1214
By default, this is disabled.
1315

@@ -17,7 +19,7 @@ By default, each virtual cluster needs its own copy of every PriorityClass. This
1719

1820
PriorityClass syncing eliminates this duplication by making host cluster PriorityClass resources available to virtual clusters. You define priority classes once in the host cluster, and vCluster automatically makes them accessible to virtual clusters based on your configuration.
1921

20-
You can Configure syncing using label selectors on your host cluster PriorityClass resources. Add labels to the PriorityClass resources you want to share, then configure vCluster to sync only those whose labels match your selector criteria. Virtual clusters can then reference these synced priority classes in their pod specifications without creating local copies.
22+
You can configure syncing using label selectors on your host cluster PriorityClass resources. Add labels to the PriorityClass resources you want to share, then configure vCluster to sync only those whose labels match your selector criteria. Virtual clusters can then reference these synced priority classes in their pod specifications without creating local copies.
2123

2224
When a virtual cluster pod references a `priorityClassName`, vCluster validates that the corresponding PriorityClass exists in the virtual cluster through the syncing process. If the referenced PriorityClass is not synced (either because it does not exist in the host cluster or does not match your label selector), the pod is not scheduled on the host cluster.
2325

@@ -35,7 +37,7 @@ sync:
3537
:::note
3638
When `sync.fromHost.priorityClasses.enabled` is set to `true`, vCluster takes control of all PriorityClass resources in the virtual cluster. It only allows PriorityClass resources that are synced from the host cluster to exist.
3739

38-
If you try to create a PriorityClass directly in the virtual cluster, using for example `kubectl create` or `kubectl apply`, vCluster detects it and deletes it immediately. This prevents conflicts between locally-created PriorityClasses and those synced from the host cluster, ensuring that only approved PriorityClass resources (those made available through the host cluster) exist in the virtual cluster.
40+
If you try to create a PriorityClass directly in the virtual cluster, using for example `kubectl create` or `kubectl apply`, vCluster detects it and deletes it immediately. This prevents conflicts between locally created PriorityClasses and those synced from the host cluster, ensuring that only approved PriorityClass resources (those made available through the host cluster) exist in the virtual cluster.
3941
:::
4042

4143
## How PriorityClass syncing works
@@ -74,7 +76,9 @@ All specified label conditions must match for a PriorityClass to be included in
7476

7577
Synced PriorityClass resources function like any other Kubernetes resource in the virtual cluster. You can view them with `kubectl get priorityclass` and reference them in their Pod specifications. When you modify a PriorityClass in the host cluster, vCluster re-evaluates whether it still matches the selector criteria. If the PriorityClass continues to match, vCluster updates the corresponding resource in the virtual cluster to reflect the changes. If the PriorityClass no longer matches the selector criteria, vCluster removes it from the virtual cluster.
7678

77-
The selector system acts as both a resource filter and a validation mechanism. As a resource filter, it ensures that vCluster makes only PriorityClass resources matching the selector criteria available in the virtual cluster's API server. The selector also functions as a creation validation mechanism - when you create Pod resources in the virtual cluster, those resources can only reference PriorityClass resources that exist in the filtered set.
79+
The selector acts as both a resource filter and a validation mechanism. As a resource filter, it ensures that vCluster makes only PriorityClass resources matching the selector criteria available in the virtual cluster's API server. The selector also functions as a creation validation mechanism - when you create Pod resources in the virtual cluster, the resources can only reference PriorityClass resources that exist in the filtered set.
80+
81+
For more details on how to use label selectors effectively, refer to the [Kubernetes documentation on label selectors](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#resources-that-support-set-based-requirements).
7882

7983
### Error handling and troubleshooting
8084

@@ -161,8 +165,6 @@ Events:
161165
Warning SyncWarning 10s pod-syncer did not sync pod "my-pod" to host because it does not match the selector under 'sync.fromHost.priorityClasses.selector'
162166
```
163167

164-
For more details on how to use label selectors effectively, refer to the [Kubernetes documentation on label selectors](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#resources-that-support-set-based-requirements).
165-
166168
## Config reference
167169

168170
<EnableSwitch/>

0 commit comments

Comments
 (0)