CSI storage capacities
Sync CSIStorageCapacity resources from the control plane cluster to the
tenant cluster if the .nodeTopology matches a synced node. Use this in conjunction with the virtual scheduler inside of vCluster
for more advanced scheduling needs. Syncing the CSIStorageCapacity resources from the control plane cluster helps the virtual scheduler make decisions about which node to schedule pods to.
CSIStorageCapacity is a namespaced resource. When synchronizing from the control plane cluster to the tenant cluster, all CSIStorageCapacity objects are synced into the kube-system
namespace of the tenant cluster. During this process, the object name is transformed to the format <objname>-x-<namespace>, where <objname> is the original object name
in the control plane cluster and <namespace> is the namespace in which the object originally existed in the control plane cluster.
When synchronizing from the tenant cluster back to the control plane cluster, a CSIStorageCapacity object is created in the control plane cluster only if it includes the physical location annotations normally added by the syncer. Specifically:
vcluster.loft.sh/object-namespecifies the object name in the control plane cluster.vcluster.loft.sh/object-namespacespecifies the control plane cluster namespace. If these annotations are not present, the CSIStorageCapacity object will not be created or updated in the control plane cluster.
apiVersion: storage.k8s.io/v1
kind: CSIStorageCapacity
metadata:
name: fast-ssd-x-storage-v
namespace: kube-system
annotations:
vcluster.loft.sh/object-name: fast-ssd
vcluster.loft.sh/object-namespace: storage-v
# optional bookkeeping:
# vcluster.loft.sh/object-uid: "c1a2b3c4-..."
# vcluster.loft.sh/object-kind: "storage.k8s.io/v1, Kind=CSIStorageCapacity"
Default value
Default: enabled: auto.
Sync CSIStorageCapacities from the control plane cluster to the tenant cluster
Configure enabled: true if you aren't using the virtual schedular but want to sync CSIStorageCapacity resources.
sync:
fromHost:
csiStorageCapacities:
enabled: true
Config reference
csiStorageCapacities object
CSIStorageCapacities defines if csi storage capacities should get synced from the host cluster to the virtual cluster, but not back. If auto, is automatically enabled when the virtual scheduler is enabled.
csiStorageCapacities object enabled string|boolean auto
Enabled defines if this option should be enabled.
enabled string|boolean auto patches object[]
Patches patch the resource according to the provided specification.
patches object[] path required string
Path is the path within the patch to target. If the path is not found within the patch, the patch is not applied.
path required string expression string
Expression transforms the value according to the given JavaScript expression.
expression string reverseExpression string
ReverseExpression transforms the value according to the given JavaScript expression.
reverseExpression string reference object
Reference treats the path value as a reference to another object and will rewrite it based on the chosen mode
automatically. In single-namespace mode this will translate the name to "vxxxxxxxxx" to avoid conflicts with
other names, in multi-namespace mode this will not translate the name.
reference object apiVersion required string
APIVersion is the apiVersion of the referenced object.
apiVersion required string apiVersionPath string
APIVersionPath is optional relative path to use to determine the kind. If APIVersionPath is not found, will fallback to apiVersion.
apiVersionPath string kind required string
Kind is the kind of the referenced object.
kind required string kindPath string
KindPath is the optional relative path to use to determine the kind. If KindPath is not found, will fallback to kind.
kindPath string namePath string
NamePath is the optional relative path to the reference name within the object.
namePath string namespacePath string
NamespacePath is the optional relative path to the reference namespace within the object. If omitted or not found, namespacePath equals to the
metadata.namespace path of the object.
namespacePath string labels object
Labels treats the path value as a labels selector.
labels object