Share via


TopologySpreadConstraintV1.LabelSelector Property

Definition

Gets or sets the label selector used for dynamically filtering Kubernetes resources based on their labels. This property enables the selection of specific objects by defining criteria that must match the labels within the resource set.

[YamlDotNet.Serialization.YamlMember(Alias="labelSelector")]
public Aspire.Hosting.Kubernetes.Resources.LabelSelectorV1 LabelSelector { get; set; }
[<YamlDotNet.Serialization.YamlMember(Alias="labelSelector")>]
member this.LabelSelector : Aspire.Hosting.Kubernetes.Resources.LabelSelectorV1 with get, set
Public Property LabelSelector As LabelSelectorV1

Property Value

Attributes
YamlDotNet.Serialization.YamlMemberAttribute

Remarks

LabelSelector provides mechanisms to define filtering using key-value pairs (MatchLabels) or complex expressions (MatchExpressions). This helps in tailoring resource selection based on the requirements of the topology spread constraints.

Applies to