Closed wutz closed 1 month ago
According to the code description https://github.com/loft-sh/vcluster/blob/v0.20.1/pkg/util/toleration/toleration.go#L11, the document description should be incorrect.
The correct way to use it is:
sync:
toHost:
pods:
enabled: true
enforceTolerations:
- "example-key=example-value:NoSchedule"
- "another-key:PreferNoSchedule"
I was having this problem. Yes. The docs are misleading.
My case is for any effect so:
sync:
toHost:
pods:
enabled: true
enforceTolerations:
- "example-key=example-value"
@wutz I created a PR to make it explicit https://github.com/loft-sh/vcluster-docs/pull/293, please take a look.
I not sure if the case when the operation is Exists
(any value) works as another-key:PreferNoSchedule
. Do you think it works?
It will work; I have tested the configuration nvidia.com/gpu:NoSchedule
in the environment and it works fine.
Create a new vcluster by https://vcluster.com/docs/vcluster/configure/vcluster-yaml/sync/to-host/core/pods#automatically-apply-tolerations-to-all-pods-synced-by-vcluster
but got
It should be a problem with the type definition.
https://github.com/loft-sh/vcluster/blob/58005894621ecb17166c38f5f8f913678e9408cc/chart/values.schema.json#L2743-L2749