config/crd/bases/placement.kubernetes-fleet.io_clusterschedulingpolicysnapshots.yaml (1,219 lines of code) (raw):
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.16.0
name: clusterschedulingpolicysnapshots.placement.kubernetes-fleet.io
spec:
group: placement.kubernetes-fleet.io
names:
categories:
- fleet
- fleet-placement
kind: ClusterSchedulingPolicySnapshot
listKind: ClusterSchedulingPolicySnapshotList
plural: clusterschedulingpolicysnapshots
shortNames:
- pss
singular: clusterschedulingpolicysnapshot
scope: Cluster
versions:
- additionalPrinterColumns:
- jsonPath: .metadata.generation
name: Gen
type: string
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
name: v1
schema:
openAPIV3Schema:
description: |-
ClusterSchedulingPolicySnapshot is used to store a snapshot of cluster placement policy.
Its spec is immutable.
The naming convention of a ClusterSchedulingPolicySnapshot is {CRPName}-{PolicySnapshotIndex}.
PolicySnapshotIndex will begin with 0.
Each snapshot must have the following labels:
- `CRPTrackingLabel` which points to its owner CRP.
- `PolicyIndexLabel` which is the index of the policy snapshot.
- `IsLatestSnapshotLabel` which indicates whether the snapshot is the latest one.
properties:
apiVersion:
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
spec:
description: The desired state of SchedulingPolicySnapshot.
properties:
policy:
description: |-
Policy defines how to select member clusters to place the selected resources.
If unspecified, all the joined member clusters are selected.
properties:
affinity:
description: |-
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".
properties:
clusterAffinity:
description: ClusterAffinity contains cluster affinity scheduling
rules for the selected resources.
properties:
preferredDuringSchedulingIgnoredDuringExecution:
description: |-
The scheduler computes a score for each cluster at schedule time by iterating
through the elements of this field and adding "weight" to the sum if the cluster
matches the corresponding matchExpression. The scheduler then chooses the first
`N` clusters with the highest sum to satisfy the placement.
This field is ignored if the placement type is "PickAll".
If the cluster score changes at some point after the placement (e.g. due to an update),
the system may or may not try to eventually move the resource from a cluster with a lower score
to a cluster with higher score.
items:
properties:
preference:
description: A cluster selector term, associated
with the corresponding weight.
properties:
labelSelector:
description: |-
LabelSelector is a label query over all the joined member clusters. Clusters matching
the query are selected.
If you specify both label and property selectors in the same term, the results are AND'd.
properties:
matchExpressions:
description: matchExpressions is a list
of label selector requirements. The requirements
are ANDed.
items:
description: |-
A label selector requirement is a selector that contains values, a key, and an operator that
relates the key and values.
properties:
key:
description: key is the label key
that the selector applies to.
type: string
operator:
description: |-
operator represents a key's relationship to a set of values.
Valid operators are In, NotIn, Exists and DoesNotExist.
type: string
values:
description: |-
values is an array of string values. If the operator is In or NotIn,
the values array must be non-empty. If the operator is Exists or DoesNotExist,
the values array must be empty. This array is replaced during a strategic
merge patch.
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
type: array
x-kubernetes-list-type: atomic
matchLabels:
additionalProperties:
type: string
description: |-
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.
type: object
type: object
x-kubernetes-map-type: atomic
propertySelector:
description: |-
PropertySelector is a property query over all joined member clusters. Clusters matching
the query are selected.
If you specify both label and property selectors in the same term, the results are AND'd.
At this moment, PropertySelector can only be used with
`RequiredDuringSchedulingIgnoredDuringExecution` affinity terms.
This field is beta-level; it is for the property-based scheduling feature and is only
functional when a property provider is enabled in the deployment.
properties:
matchExpressions:
description: MatchExpressions is an array
of PropertySelectorRequirements. The requirements
are AND'd.
items:
description: |-
PropertySelectorRequirement is a specific property requirement when picking clusters for
resource placement.
properties:
name:
description: Name is the name of the
property; it should be a Kubernetes
label name.
type: string
operator:
description: |-
Operator specifies the relationship between a cluster's observed value of the specified
property and the values given in the requirement.
type: string
values:
description: |-
Values are a list of values of the specified property which Fleet will compare against
the observed values of individual member clusters in accordance with the given
operator.
At this moment, each value should be a Kubernetes quantity. For more information, see
https://pkg.go.dev/k8s.io/apimachinery/pkg/api/resource#Quantity.
If the operator is Gt (greater than), Ge (greater than or equal to), Lt (less than),
or `Le` (less than or equal to), Eq (equal to), or Ne (ne), exactly one value must be
specified in the list.
items:
type: string
maxItems: 1
type: array
required:
- name
- operator
- values
type: object
type: array
required:
- matchExpressions
type: object
propertySorter:
description: |-
PropertySorter sorts all matching clusters by a specific property and assigns different weights
to each cluster based on their observed property values.
At this moment, PropertySorter can only be used with
`PreferredDuringSchedulingIgnoredDuringExecution` affinity terms.
This field is beta-level; it is for the property-based scheduling feature and is only
functional when a property provider is enabled in the deployment.
properties:
name:
description: Name is the name of the property
which Fleet sorts clusters by.
type: string
sortOrder:
description: |-
SortOrder explains how Fleet should perform the sort; specifically, whether Fleet should
sort in ascending or descending order.
type: string
required:
- name
- sortOrder
type: object
type: object
weight:
description: Weight associated with matching the
corresponding clusterSelectorTerm, in the range
[-100, 100].
format: int32
maximum: 100
minimum: -100
type: integer
required:
- preference
- weight
type: object
type: array
requiredDuringSchedulingIgnoredDuringExecution:
description: |-
If the affinity requirements specified by this field are not met at
scheduling time, the resource will not be scheduled onto the cluster.
If the affinity requirements specified by this field cease to be met
at some point after the placement (e.g. due to an update), the system
may or may not try to eventually remove the resource from the cluster.
properties:
clusterSelectorTerms:
description: ClusterSelectorTerms is a list of cluster
selector terms. The terms are `ORed`.
items:
properties:
labelSelector:
description: |-
LabelSelector is a label query over all the joined member clusters. Clusters matching
the query are selected.
If you specify both label and property selectors in the same term, the results are AND'd.
properties:
matchExpressions:
description: matchExpressions is a list
of label selector requirements. The requirements
are ANDed.
items:
description: |-
A label selector requirement is a selector that contains values, a key, and an operator that
relates the key and values.
properties:
key:
description: key is the label key
that the selector applies to.
type: string
operator:
description: |-
operator represents a key's relationship to a set of values.
Valid operators are In, NotIn, Exists and DoesNotExist.
type: string
values:
description: |-
values is an array of string values. If the operator is In or NotIn,
the values array must be non-empty. If the operator is Exists or DoesNotExist,
the values array must be empty. This array is replaced during a strategic
merge patch.
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
type: array
x-kubernetes-list-type: atomic
matchLabels:
additionalProperties:
type: string
description: |-
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.
type: object
type: object
x-kubernetes-map-type: atomic
propertySelector:
description: |-
PropertySelector is a property query over all joined member clusters. Clusters matching
the query are selected.
If you specify both label and property selectors in the same term, the results are AND'd.
At this moment, PropertySelector can only be used with
`RequiredDuringSchedulingIgnoredDuringExecution` affinity terms.
This field is beta-level; it is for the property-based scheduling feature and is only
functional when a property provider is enabled in the deployment.
properties:
matchExpressions:
description: MatchExpressions is an array
of PropertySelectorRequirements. The requirements
are AND'd.
items:
description: |-
PropertySelectorRequirement is a specific property requirement when picking clusters for
resource placement.
properties:
name:
description: Name is the name of the
property; it should be a Kubernetes
label name.
type: string
operator:
description: |-
Operator specifies the relationship between a cluster's observed value of the specified
property and the values given in the requirement.
type: string
values:
description: |-
Values are a list of values of the specified property which Fleet will compare against
the observed values of individual member clusters in accordance with the given
operator.
At this moment, each value should be a Kubernetes quantity. For more information, see
https://pkg.go.dev/k8s.io/apimachinery/pkg/api/resource#Quantity.
If the operator is Gt (greater than), Ge (greater than or equal to), Lt (less than),
or `Le` (less than or equal to), Eq (equal to), or Ne (ne), exactly one value must be
specified in the list.
items:
type: string
maxItems: 1
type: array
required:
- name
- operator
- values
type: object
type: array
required:
- matchExpressions
type: object
propertySorter:
description: |-
PropertySorter sorts all matching clusters by a specific property and assigns different weights
to each cluster based on their observed property values.
At this moment, PropertySorter can only be used with
`PreferredDuringSchedulingIgnoredDuringExecution` affinity terms.
This field is beta-level; it is for the property-based scheduling feature and is only
functional when a property provider is enabled in the deployment.
properties:
name:
description: Name is the name of the property
which Fleet sorts clusters by.
type: string
sortOrder:
description: |-
SortOrder explains how Fleet should perform the sort; specifically, whether Fleet should
sort in ascending or descending order.
type: string
required:
- name
- sortOrder
type: object
type: object
maxItems: 10
type: array
required:
- clusterSelectorTerms
type: object
type: object
type: object
clusterNames:
description: |-
ClusterNames contains a list of names of MemberCluster to place the selected resources.
Only valid if the placement type is "PickFixed"
items:
type: string
maxItems: 100
type: array
numberOfClusters:
description: NumberOfClusters of placement. Only valid if the
placement type is "PickN".
format: int32
minimum: 0
type: integer
placementType:
default: PickAll
description: Type of placement. Can be "PickAll", "PickN" or "PickFixed".
Default is PickAll.
enum:
- PickAll
- PickN
- PickFixed
type: string
tolerations:
description: |-
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.
items:
description: |-
Toleration allows ClusterResourcePlacement to tolerate any taint that matches
the triple <key,value,effect> using the matching operator <operator>.
properties:
effect:
description: |-
Effect indicates the taint effect to match. Empty means match all taint effects.
When specified, only allowed value is NoSchedule.
enum:
- NoSchedule
type: string
key:
description: |-
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.
type: string
operator:
default: Equal
description: |-
Operator represents a key's relationship to the value.
Valid operators are Exists and Equal. Defaults to Equal.
Exists is equivalent to wildcard for value, so that a
ClusterResourcePlacement can tolerate all taints of a particular category.
enum:
- Equal
- Exists
type: string
value:
description: |-
Value is the taint value the toleration matches to.
If the operator is Exists, the value should be empty, otherwise just a regular string.
type: string
type: object
maxItems: 100
type: array
topologySpreadConstraints:
description: |-
TopologySpreadConstraints describes how a group of resources ought to spread across multiple topology
domains. Scheduler will schedule resources in a way which abides by the constraints.
All topologySpreadConstraints are ANDed.
Only valid if the placement type is "PickN".
items:
description: TopologySpreadConstraint specifies how to spread
resources among the given cluster topology.
properties:
maxSkew:
default: 1
description: |-
MaxSkew describes the degree to which resources may be unevenly distributed.
When `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted difference
between the number of resource copies in the target topology and the global minimum.
The global minimum is the minimum number of resource copies in a domain.
When `whenUnsatisfiable=ScheduleAnyway`, it is used to give higher precedence
to topologies that satisfy it.
It's an optional field. Default value is 1 and 0 is not allowed.
format: int32
minimum: 1
type: integer
topologyKey:
description: |-
TopologyKey is the key of cluster labels. Clusters that have a label with this key
and identical values are considered to be in the same topology.
We consider each <key, value> as a "bucket", and try to put balanced number
of replicas of the resource into each bucket honor the `MaxSkew` value.
It's a required field.
type: string
whenUnsatisfiable:
description: |-
WhenUnsatisfiable indicates how to deal with the resource if it doesn't satisfy
the spread constraint.
- DoNotSchedule (default) tells the scheduler not to schedule it.
- ScheduleAnyway tells the scheduler to schedule the resource in any cluster,
but giving higher precedence to topologies that would help reduce the skew.
It's an optional field.
type: string
required:
- topologyKey
type: object
type: array
type: object
policyHash:
description: PolicyHash is the sha-256 hash value of the Policy field.
format: byte
type: string
required:
- policyHash
type: object
status:
description: The observed status of SchedulingPolicySnapshot.
properties:
conditions:
description: Conditions is an array of current observed conditions
for SchedulingPolicySnapshot.
items:
description: Condition contains details for one aspect of the current
state of this API Resource.
properties:
lastTransitionTime:
description: |-
lastTransitionTime is the last time the condition transitioned from one status to another.
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
format: date-time
type: string
message:
description: |-
message is a human readable message indicating details about the transition.
This may be an empty string.
maxLength: 32768
type: string
observedGeneration:
description: |-
observedGeneration represents the .metadata.generation that the condition was set based upon.
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
with respect to the current state of the instance.
format: int64
minimum: 0
type: integer
reason:
description: |-
reason contains a programmatic identifier indicating the reason for the condition's last transition.
Producers of specific condition types may define expected values and meanings for this field,
and whether the values are considered a guaranteed API.
The value should be a CamelCase string.
This field may not be empty.
maxLength: 1024
minLength: 1
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
type: string
status:
description: status of the condition, one of True, False, Unknown.
enum:
- "True"
- "False"
- Unknown
type: string
type:
description: type of condition in CamelCase or in foo.example.com/CamelCase.
maxLength: 316
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
type: string
required:
- lastTransitionTime
- message
- reason
- status
- type
type: object
type: array
x-kubernetes-list-map-keys:
- type
x-kubernetes-list-type: map
observedCRPGeneration:
description: |-
ObservedCRPGeneration is the generation of the CRP which the scheduler uses to perform
the scheduling cycle and prepare the scheduling status.
format: int64
type: integer
targetClusters:
description: |-
ClusterDecisions contains a list of names of member clusters considered by the scheduler.
Note that all the selected clusters must present in the list while not all the
member clusters are guaranteed to be listed due to the size limit. We will try to
add the clusters that can provide the most insight to the list first.
items:
description: |-
ClusterDecision represents a decision from a placement
An empty ClusterDecision indicates it is not scheduled yet.
properties:
clusterName:
description: |-
ClusterName is the name of the ManagedCluster. If it is not empty, its value should be unique cross all
placement decisions for the Placement.
type: string
clusterScore:
description: ClusterScore represents the score of the cluster
calculated by the scheduler.
properties:
affinityScore:
description: |-
AffinityScore represents the affinity score of the cluster calculated by the last
scheduling decision based on the preferred affinity selector.
An affinity score may not present if the cluster does not meet the required affinity.
format: int32
type: integer
priorityScore:
description: |-
TopologySpreadScore represents the priority score of the cluster calculated by the last
scheduling decision based on the topology spread applied to the cluster.
A priority score may not present if the cluster does not meet the topology spread.
format: int32
type: integer
type: object
reason:
description: Reason represents the reason why the cluster is
selected or not.
type: string
selected:
description: Selected indicates if this cluster is selected
by the scheduler.
type: boolean
required:
- clusterName
- reason
- selected
type: object
maxItems: 1000
type: array
required:
- observedCRPGeneration
type: object
required:
- spec
type: object
served: true
storage: false
subresources:
status: {}
- additionalPrinterColumns:
- jsonPath: .metadata.generation
name: Gen
type: string
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
name: v1beta1
schema:
openAPIV3Schema:
description: |-
ClusterSchedulingPolicySnapshot is used to store a snapshot of cluster placement policy.
Its spec is immutable.
The naming convention of a ClusterSchedulingPolicySnapshot is {CRPName}-{PolicySnapshotIndex}.
PolicySnapshotIndex will begin with 0.
Each snapshot must have the following labels:
- `CRPTrackingLabel` which points to its owner CRP.
- `PolicyIndexLabel` which is the index of the policy snapshot.
- `IsLatestSnapshotLabel` which indicates whether the snapshot is the latest one.
properties:
apiVersion:
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
spec:
description: The desired state of SchedulingPolicySnapshot.
properties:
policy:
description: |-
Policy defines how to select member clusters to place the selected resources.
If unspecified, all the joined member clusters are selected.
properties:
affinity:
description: |-
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".
properties:
clusterAffinity:
description: ClusterAffinity contains cluster affinity scheduling
rules for the selected resources.
properties:
preferredDuringSchedulingIgnoredDuringExecution:
description: |-
The scheduler computes a score for each cluster at schedule time by iterating
through the elements of this field and adding "weight" to the sum if the cluster
matches the corresponding matchExpression. The scheduler then chooses the first
`N` clusters with the highest sum to satisfy the placement.
This field is ignored if the placement type is "PickAll".
If the cluster score changes at some point after the placement (e.g. due to an update),
the system may or may not try to eventually move the resource from a cluster with a lower score
to a cluster with higher score.
items:
properties:
preference:
description: A cluster selector term, associated
with the corresponding weight.
properties:
labelSelector:
description: |-
LabelSelector is a label query over all the joined member clusters. Clusters matching
the query are selected.
If you specify both label and property selectors in the same term, the results are AND'd.
properties:
matchExpressions:
description: matchExpressions is a list
of label selector requirements. The requirements
are ANDed.
items:
description: |-
A label selector requirement is a selector that contains values, a key, and an operator that
relates the key and values.
properties:
key:
description: key is the label key
that the selector applies to.
type: string
operator:
description: |-
operator represents a key's relationship to a set of values.
Valid operators are In, NotIn, Exists and DoesNotExist.
type: string
values:
description: |-
values is an array of string values. If the operator is In or NotIn,
the values array must be non-empty. If the operator is Exists or DoesNotExist,
the values array must be empty. This array is replaced during a strategic
merge patch.
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
type: array
x-kubernetes-list-type: atomic
matchLabels:
additionalProperties:
type: string
description: |-
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.
type: object
type: object
x-kubernetes-map-type: atomic
propertySelector:
description: |-
PropertySelector is a property query over all joined member clusters. Clusters matching
the query are selected.
If you specify both label and property selectors in the same term, the results are AND'd.
At this moment, PropertySelector can only be used with
`RequiredDuringSchedulingIgnoredDuringExecution` affinity terms.
This field is beta-level; it is for the property-based scheduling feature and is only
functional when a property provider is enabled in the deployment.
properties:
matchExpressions:
description: MatchExpressions is an array
of PropertySelectorRequirements. The requirements
are AND'd.
items:
description: |-
PropertySelectorRequirement is a specific property requirement when picking clusters for
resource placement.
properties:
name:
description: Name is the name of the
property; it should be a Kubernetes
label name.
type: string
operator:
description: |-
Operator specifies the relationship between a cluster's observed value of the specified
property and the values given in the requirement.
type: string
values:
description: |-
Values are a list of values of the specified property which Fleet will compare against
the observed values of individual member clusters in accordance with the given
operator.
At this moment, each value should be a Kubernetes quantity. For more information, see
https://pkg.go.dev/k8s.io/apimachinery/pkg/api/resource#Quantity.
If the operator is Gt (greater than), Ge (greater than or equal to), Lt (less than),
or `Le` (less than or equal to), Eq (equal to), or Ne (ne), exactly one value must be
specified in the list.
items:
type: string
maxItems: 1
type: array
required:
- name
- operator
- values
type: object
type: array
required:
- matchExpressions
type: object
propertySorter:
description: |-
PropertySorter sorts all matching clusters by a specific property and assigns different weights
to each cluster based on their observed property values.
At this moment, PropertySorter can only be used with
`PreferredDuringSchedulingIgnoredDuringExecution` affinity terms.
This field is beta-level; it is for the property-based scheduling feature and is only
functional when a property provider is enabled in the deployment.
properties:
name:
description: Name is the name of the property
which Fleet sorts clusters by.
type: string
sortOrder:
description: |-
SortOrder explains how Fleet should perform the sort; specifically, whether Fleet should
sort in ascending or descending order.
type: string
required:
- name
- sortOrder
type: object
type: object
weight:
description: Weight associated with matching the
corresponding clusterSelectorTerm, in the range
[-100, 100].
format: int32
maximum: 100
minimum: -100
type: integer
required:
- preference
- weight
type: object
type: array
requiredDuringSchedulingIgnoredDuringExecution:
description: |-
If the affinity requirements specified by this field are not met at
scheduling time, the resource will not be scheduled onto the cluster.
If the affinity requirements specified by this field cease to be met
at some point after the placement (e.g. due to an update), the system
may or may not try to eventually remove the resource from the cluster.
properties:
clusterSelectorTerms:
description: ClusterSelectorTerms is a list of cluster
selector terms. The terms are `ORed`.
items:
properties:
labelSelector:
description: |-
LabelSelector is a label query over all the joined member clusters. Clusters matching
the query are selected.
If you specify both label and property selectors in the same term, the results are AND'd.
properties:
matchExpressions:
description: matchExpressions is a list
of label selector requirements. The requirements
are ANDed.
items:
description: |-
A label selector requirement is a selector that contains values, a key, and an operator that
relates the key and values.
properties:
key:
description: key is the label key
that the selector applies to.
type: string
operator:
description: |-
operator represents a key's relationship to a set of values.
Valid operators are In, NotIn, Exists and DoesNotExist.
type: string
values:
description: |-
values is an array of string values. If the operator is In or NotIn,
the values array must be non-empty. If the operator is Exists or DoesNotExist,
the values array must be empty. This array is replaced during a strategic
merge patch.
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
type: array
x-kubernetes-list-type: atomic
matchLabels:
additionalProperties:
type: string
description: |-
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.
type: object
type: object
x-kubernetes-map-type: atomic
propertySelector:
description: |-
PropertySelector is a property query over all joined member clusters. Clusters matching
the query are selected.
If you specify both label and property selectors in the same term, the results are AND'd.
At this moment, PropertySelector can only be used with
`RequiredDuringSchedulingIgnoredDuringExecution` affinity terms.
This field is beta-level; it is for the property-based scheduling feature and is only
functional when a property provider is enabled in the deployment.
properties:
matchExpressions:
description: MatchExpressions is an array
of PropertySelectorRequirements. The requirements
are AND'd.
items:
description: |-
PropertySelectorRequirement is a specific property requirement when picking clusters for
resource placement.
properties:
name:
description: Name is the name of the
property; it should be a Kubernetes
label name.
type: string
operator:
description: |-
Operator specifies the relationship between a cluster's observed value of the specified
property and the values given in the requirement.
type: string
values:
description: |-
Values are a list of values of the specified property which Fleet will compare against
the observed values of individual member clusters in accordance with the given
operator.
At this moment, each value should be a Kubernetes quantity. For more information, see
https://pkg.go.dev/k8s.io/apimachinery/pkg/api/resource#Quantity.
If the operator is Gt (greater than), Ge (greater than or equal to), Lt (less than),
or `Le` (less than or equal to), Eq (equal to), or Ne (ne), exactly one value must be
specified in the list.
items:
type: string
maxItems: 1
type: array
required:
- name
- operator
- values
type: object
type: array
required:
- matchExpressions
type: object
propertySorter:
description: |-
PropertySorter sorts all matching clusters by a specific property and assigns different weights
to each cluster based on their observed property values.
At this moment, PropertySorter can only be used with
`PreferredDuringSchedulingIgnoredDuringExecution` affinity terms.
This field is beta-level; it is for the property-based scheduling feature and is only
functional when a property provider is enabled in the deployment.
properties:
name:
description: Name is the name of the property
which Fleet sorts clusters by.
type: string
sortOrder:
description: |-
SortOrder explains how Fleet should perform the sort; specifically, whether Fleet should
sort in ascending or descending order.
type: string
required:
- name
- sortOrder
type: object
type: object
maxItems: 10
type: array
required:
- clusterSelectorTerms
type: object
type: object
type: object
clusterNames:
description: |-
ClusterNames contains a list of names of MemberCluster to place the selected resources.
Only valid if the placement type is "PickFixed"
items:
type: string
maxItems: 100
type: array
numberOfClusters:
description: NumberOfClusters of placement. Only valid if the
placement type is "PickN".
format: int32
minimum: 0
type: integer
placementType:
default: PickAll
description: Type of placement. Can be "PickAll", "PickN" or "PickFixed".
Default is PickAll.
enum:
- PickAll
- PickN
- PickFixed
type: string
tolerations:
description: |-
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.
items:
description: |-
Toleration allows ClusterResourcePlacement to tolerate any taint that matches
the triple <key,value,effect> using the matching operator <operator>.
properties:
effect:
description: |-
Effect indicates the taint effect to match. Empty means match all taint effects.
When specified, only allowed value is NoSchedule.
enum:
- NoSchedule
type: string
key:
description: |-
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.
type: string
operator:
default: Equal
description: |-
Operator represents a key's relationship to the value.
Valid operators are Exists and Equal. Defaults to Equal.
Exists is equivalent to wildcard for value, so that a
ClusterResourcePlacement can tolerate all taints of a particular category.
enum:
- Equal
- Exists
type: string
value:
description: |-
Value is the taint value the toleration matches to.
If the operator is Exists, the value should be empty, otherwise just a regular string.
type: string
type: object
maxItems: 100
type: array
topologySpreadConstraints:
description: |-
TopologySpreadConstraints describes how a group of resources ought to spread across multiple topology
domains. Scheduler will schedule resources in a way which abides by the constraints.
All topologySpreadConstraints are ANDed.
Only valid if the placement type is "PickN".
items:
description: TopologySpreadConstraint specifies how to spread
resources among the given cluster topology.
properties:
maxSkew:
default: 1
description: |-
MaxSkew describes the degree to which resources may be unevenly distributed.
When `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted difference
between the number of resource copies in the target topology and the global minimum.
The global minimum is the minimum number of resource copies in a domain.
When `whenUnsatisfiable=ScheduleAnyway`, it is used to give higher precedence
to topologies that satisfy it.
It's an optional field. Default value is 1 and 0 is not allowed.
format: int32
minimum: 1
type: integer
topologyKey:
description: |-
TopologyKey is the key of cluster labels. Clusters that have a label with this key
and identical values are considered to be in the same topology.
We consider each <key, value> as a "bucket", and try to put balanced number
of replicas of the resource into each bucket honor the `MaxSkew` value.
It's a required field.
type: string
whenUnsatisfiable:
description: |-
WhenUnsatisfiable indicates how to deal with the resource if it doesn't satisfy
the spread constraint.
- DoNotSchedule (default) tells the scheduler not to schedule it.
- ScheduleAnyway tells the scheduler to schedule the resource in any cluster,
but giving higher precedence to topologies that would help reduce the skew.
It's an optional field.
type: string
required:
- topologyKey
type: object
type: array
type: object
policyHash:
description: PolicyHash is the sha-256 hash value of the Policy field.
format: byte
type: string
required:
- policyHash
type: object
status:
description: The observed status of SchedulingPolicySnapshot.
properties:
conditions:
description: Conditions is an array of current observed conditions
for SchedulingPolicySnapshot.
items:
description: Condition contains details for one aspect of the current
state of this API Resource.
properties:
lastTransitionTime:
description: |-
lastTransitionTime is the last time the condition transitioned from one status to another.
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
format: date-time
type: string
message:
description: |-
message is a human readable message indicating details about the transition.
This may be an empty string.
maxLength: 32768
type: string
observedGeneration:
description: |-
observedGeneration represents the .metadata.generation that the condition was set based upon.
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
with respect to the current state of the instance.
format: int64
minimum: 0
type: integer
reason:
description: |-
reason contains a programmatic identifier indicating the reason for the condition's last transition.
Producers of specific condition types may define expected values and meanings for this field,
and whether the values are considered a guaranteed API.
The value should be a CamelCase string.
This field may not be empty.
maxLength: 1024
minLength: 1
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
type: string
status:
description: status of the condition, one of True, False, Unknown.
enum:
- "True"
- "False"
- Unknown
type: string
type:
description: type of condition in CamelCase or in foo.example.com/CamelCase.
maxLength: 316
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
type: string
required:
- lastTransitionTime
- message
- reason
- status
- type
type: object
type: array
x-kubernetes-list-map-keys:
- type
x-kubernetes-list-type: map
observedCRPGeneration:
description: |-
ObservedCRPGeneration is the generation of the CRP which the scheduler uses to perform
the scheduling cycle and prepare the scheduling status.
format: int64
type: integer
targetClusters:
description: |-
ClusterDecisions contains a list of names of member clusters considered by the scheduler.
Note that all the selected clusters must present in the list while not all the
member clusters are guaranteed to be listed due to the size limit. We will try to
add the clusters that can provide the most insight to the list first.
items:
description: |-
ClusterDecision represents a decision from a placement
An empty ClusterDecision indicates it is not scheduled yet.
properties:
clusterName:
description: |-
ClusterName is the name of the ManagedCluster. If it is not empty, its value should be unique cross all
placement decisions for the Placement.
type: string
clusterScore:
description: ClusterScore represents the score of the cluster
calculated by the scheduler.
properties:
affinityScore:
description: |-
AffinityScore represents the affinity score of the cluster calculated by the last
scheduling decision based on the preferred affinity selector.
An affinity score may not present if the cluster does not meet the required affinity.
format: int32
type: integer
priorityScore:
description: |-
TopologySpreadScore represents the priority score of the cluster calculated by the last
scheduling decision based on the topology spread applied to the cluster.
A priority score may not present if the cluster does not meet the topology spread.
format: int32
type: integer
type: object
reason:
description: Reason represents the reason why the cluster is
selected or not.
type: string
selected:
description: Selected indicates if this cluster is selected
by the scheduler.
type: boolean
required:
- clusterName
- reason
- selected
type: object
maxItems: 1000
type: array
required:
- observedCRPGeneration
type: object
required:
- spec
type: object
served: true
storage: true
subresources:
status: {}