Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
namespace Meta.V1;

using Azure.ResourceManager;

@doc("A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.")
model LabelSelector {
#suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "Records is the most semantically correct choice for this use-case"
@doc("matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.")
matchLabels?: Record<string>;

@OpenAPI.extension("x-ms-identifiers", #[])
@doc("matchExpressions is a list of label selector requirements. The requirements are ANDed.")
@identifiers(#[])
matchExpressions?: LabelSelectorRequirement[];
}

@doc("A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.")
model LabelSelectorRequirement {
#suppress "@azure-tools/typespec-azure-resource-manager/secret-prop" "This key is not sensitive; it's a key for the label selector."
@doc("key is the label key that the selector applies to.")
key: string;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import "../../../../k8s.io/apimachinery/apis/meta/v1/types.tsp";
using TypeSpec.Versioning;
using Core.V1;
using Meta.V1;
using Azure.ResourceManager;

namespace Placement.V1;

Expand All @@ -25,8 +26,8 @@ model PlacementPolicy {
@doc("Affinity contains cluster affinity scheduling rules. Defines which member clusters to place the selected resources. Only valid if the placement type is \"PickAll\" or \"PickN\".")
affinity?: Affinity;

@OpenAPI.extension("x-ms-identifiers", #[])
@doc("If specified, the ClusterResourcePlacement's Tolerations. Tolerations cannot be updated or deleted. This field is beta-level and is for the taints and tolerations feature.")
@identifiers(#[])
tolerations?: Toleration[];
}

Expand Down Expand Up @@ -55,8 +56,8 @@ model ClusterAffinity {

@doc("ClusterSelector")
model ClusterSelector {
@OpenAPI.extension("x-ms-identifiers", #[])
@doc("ClusterSelectorTerms is a list of cluster selector terms. The terms are `ORed`.")
@identifiers(#[])
clusterSelectorTerms: ClusterSelectorTerm[];
}

Expand Down Expand Up @@ -112,6 +113,7 @@ union PropertySelectorOperator {

@doc("Toleration allows ClusterResourcePlacement to tolerate any taint that matches the triple <key,value,effect> using the matching operator <operator>.")
model Toleration {
#suppress "@azure-tools/typespec-azure-resource-manager/secret-prop" "This key is not sensitive; it's a taint key identifier in Kubernetes tolerations."
@doc("Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys.")
key?: string;

Expand Down