LabelSelectorV1
Class sealed net10.0
Represents a label selector for Kubernetes resources. A label selector is used to filter resources based on their labels, enabling selection of a specific set of objects in a dynamic way.
namespace Aspire.Hosting.Kubernetes.Resources;
public sealed class LabelSelectorV1{ // ...}Remarks
Section titled Remarks The selector can contain two key components: - MatchLabels: A dictionary of key-value pairs where the resource labels must match exactly. - MatchExpressions: A list of label selector requirements that allow more complex filtering rules.
Constructors2
Section titled ConstructorsLabelSelectorV1 Represents a label selector used to determine a set of resources in Kubernetes that match the defined criteria.
LabelSelectorV1(Dictionary<string, string>) Represents a label selector used to determine a set of resources in Kubernetes that match the defined criteria.
Properties2
Section titled PropertiesMatchExpressionsget; set Represents a collection of label selector requirements used for matching Kubernetes resources. Each requirement specifies a key, an operator, and a set of values to define filtering criteria. This property is used to form more complex selection logic based on multiple conditions.
MatchLabelsget; setDictionary<string, string> A collection of key-value pairs used to specify matching labels for Kubernetes resources. Labels are utilized as selectors to filter or identify a subset of resources within a Kubernetes environment.