API Reference
placement.kubernetes-fleet.io/v1
Resource Types
- AppliedWork
- AppliedWorkList
- ClusterResourceBinding
- ClusterResourcePlacement
- ClusterResourceSnapshot
- ClusterSchedulingPolicySnapshot
- Work
- WorkList
Affinity
Affinity is a group of cluster affinity scheduling rules. More to be added.
Appears in:
| Field | Description | Default | Validation | 
|---|---|---|---|
| clusterAffinityClusterAffinity | ClusterAffinity contains cluster affinity scheduling rules for the selected resources. | 
AppliedResourceMeta
AppliedResourceMeta represents the group, version, resource, name and namespace of a resource. Since these resources have been created, they must have valid group, version, resource, namespace, and name.
Appears in:
| Field | Description | Default | Validation | 
|---|---|---|---|
| ordinalinteger | Ordinal represents an index in manifests list, so the condition can still be linked to a manifest even though manifest cannot be parsed successfully. | ||
| groupstring | Group is the group of the resource. | ||
| versionstring | Version is the version of the resource. | ||
| kindstring | Kind is the kind of the resource. | ||
| resourcestring | Resource is the resource type of the resource | ||
| namespacestring | Namespace is the namespace of the resource, the resource is cluster scoped if the value is empty | ||
| namestring | Name is the name of the resource | ||
| uidUID | UID is set on successful deletion of the Kubernetes resource by controller. The resource might be still visible on the managed cluster after this field is set. It is not directly settable by a client. | 
AppliedWork
AppliedWork represents an applied work on managed cluster that is placed on a managed cluster. An appliedwork links to a work on a hub recording resources deployed in the managed cluster. When the agent is removed from managed cluster, cluster-admin on managed cluster can delete appliedwork to remove resources deployed by the agent. The name of the appliedwork must be the same as {work name} The namespace of the appliedwork should be the same as the resource applied on the managed cluster.
Appears in:
| Field | Description | Default | Validation | 
|---|---|---|---|
| apiVersionstring | placement.kubernetes-fleet.io/v1 | ||
| kindstring | AppliedWork | ||
| metadataObjectMeta | Refer to Kubernetes API documentation for fields of metadata. | ||
| specAppliedWorkSpec | Spec represents the desired configuration of AppliedWork. | Required: {} | |
| statusAppliedWorkStatus | Status represents the current status of AppliedWork. | 
AppliedWorkList
AppliedWorkList contains a list of AppliedWork.
| Field | Description | Default | Validation | 
|---|---|---|---|
| apiVersionstring | placement.kubernetes-fleet.io/v1 | ||
| kindstring | AppliedWorkList | ||
| metadataListMeta | Refer to Kubernetes API documentation for fields of metadata. | ||
| itemsAppliedWork array | List of works. | 
AppliedWorkSpec
AppliedWorkSpec represents the desired configuration of AppliedWork.
Appears in:
| Field | Description | Default | Validation | 
|---|---|---|---|
| workNamestring | WorkName represents the name of the related work on the hub. | Required: {} | |
| workNamespacestring | WorkNamespace represents the namespace of the related work on the hub. | Required: {} | 
AppliedWorkStatus
AppliedWorkStatus represents the current status of AppliedWork.
Appears in:
| Field | Description | Default | Validation | 
|---|---|---|---|
| appliedResourcesAppliedResourceMeta array | AppliedResources represents a list of resources defined within the Work that are applied. Only resources with valid GroupVersionResource, namespace, and name are suitable. An item in this slice is deleted when there is no mapped manifest in Work.Spec or by finalizer. The resource relating to the item will also be removed from managed cluster. The deleted resource may still be present until the finalizers for that resource are finished. However, the resource will not be undeleted, so it can be removed from this list and eventual consistency is preserved. | 
ApplyStrategy
ApplyStrategy describes how to resolve the conflict if the resource to be placed already exists in the target cluster and whether it’s allowed to be co-owned by other non-fleet appliers. Note: If multiple CRPs try to place the same resource with different apply strategy, the later ones will fail with the reason ApplyConflictBetweenPlacements.
Appears in:
| Field | Description | Default | Validation | 
|---|---|---|---|
| typeApplyStrategyType | Type defines the type of strategy to use. Default to ClientSideApply. Server-side apply is a safer choice. Read more about the differences between server-side apply and client-side apply: https://kubernetes.io/docs/reference/using-api/server-side-apply/#comparison-with-client-side-apply. | ClientSideApply | Enum: [ClientSideApply ServerSideApply] | 
| allowCoOwnershipboolean | AllowCoOwnership defines whether to apply the resource if it already exists in the target cluster and is not solely owned by fleet (i.e., metadata.ownerReferences contains only fleet custom resources). If true, apply the resource and add fleet as a co-owner. If false, leave the resource unchanged and fail the apply. | ||
| serverSideApplyConfigServerSideApplyConfig | ServerSideApplyConfig defines the configuration for server side apply. It is honored only when type is ServerSideApply. | 
ApplyStrategyType
Underlying type: string
ApplyStrategyType describes the type of the strategy used to resolve the conflict if the resource to be placed already exists in the target cluster and is owned by other appliers.
Appears in:
| Field | Description | 
|---|---|
| ClientSideApply | ApplyStrategyTypeClientSideApply will use three-way merge patch similar to how kubectl applydoes by storinglast applied state in the last-applied-configurationannotation.When the last-applied-configurationannotation size is greater than 256kB, it falls back to the server-side apply. | 
| ServerSideApply | ApplyStrategyTypeServerSideApply will use server-side apply to resolve conflicts between the resource to be placed and the existing resource in the target cluster. Details: https://kubernetes.io/docs/reference/using-api/server-side-apply | 
BindingState
Underlying type: string
BindingState is the state of the binding.
Appears in:
| Field | Description | 
|---|---|
| Scheduled | BindingStateScheduled means the binding is scheduled but need to be bound to the target cluster. | 
| Bound | BindingStateBound means the binding is bound to the target cluster. | 
| Unscheduled | BindingStateUnscheduled means the binding is not scheduled on to the target cluster anymore. This is a state that rollout controller cares about. The work generator still treat this as bound until rollout controller deletes the binding. | 
ClusterAffinity
ClusterAffinity contains cluster affinity scheduling rules for the selected resources.
Appears in:
| Field | Description | Default | Validation | 
|---|---|---|---|
| requiredDuringSchedulingIgnoredDuringExecutionClusterSelector | 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. | ||
| preferredDuringSchedulingIgnoredDuringExecutionPreferredClusterSelector array | 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 Nclusters 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. | 
ClusterDecision
ClusterDecision represents a decision from a placement An empty ClusterDecision indicates it is not scheduled yet.
Appears in:
| Field | Description | Default | Validation | 
|---|---|---|---|
| clusterNamestring | ClusterName is the name of the ManagedCluster. If it is not empty, its value should be unique cross all placement decisions for the Placement. | Required: {} | |
| selectedboolean | Selected indicates if this cluster is selected by the scheduler. | ||
| clusterScoreClusterScore | ClusterScore represents the score of the cluster calculated by the scheduler. | ||
| reasonstring | Reason represents the reason why the cluster is selected or not. | 
ClusterResourceBinding
ClusterResourceBinding represents a scheduling decision that binds a group of resources to a cluster.
It MUST have a label named CRPTrackingLabel that points to the cluster resource policy that creates it.
Appears in:
| Field | Description | Default | Validation | 
|---|---|---|---|
| apiVersionstring | placement.kubernetes-fleet.io/v1 | ||
| kindstring | ClusterResourceBinding | ||
| metadataObjectMeta | Refer to Kubernetes API documentation for fields of metadata. | ||
| specResourceBindingSpec | The desired state of ClusterResourceBinding. | ||
| statusResourceBindingStatus | The observed status of ClusterResourceBinding. | 
ClusterResourcePlacement
ClusterResourcePlacement is used to select cluster scoped resources, including built-in resources and custom resources, and placement them onto selected member clusters in a fleet.
If a namespace is selected, ALL the resources under the namespace are placed to the target clusters. Note that you can’t select the following resources:
- reserved namespaces including: default, kube-* (reserved for Kubernetes system namespaces), fleet-* (reserved for fleet system namespaces).
- reserved fleet resource types including: MemberCluster, InternalMemberCluster, ClusterResourcePlacement, ClusterSchedulingPolicySnapshot, ClusterResourceSnapshot, ClusterResourceBinding, etc.
ClusterSchedulingPolicySnapshot and ClusterResourceSnapshot objects are created when there are changes in the
system to keep the history of the changes affecting a ClusterResourcePlacement.
Appears in:
| Field | Description | Default | Validation | 
|---|---|---|---|
| apiVersionstring | placement.kubernetes-fleet.io/v1 | ||
| kindstring | ClusterResourcePlacement | ||
| metadataObjectMeta | Refer to Kubernetes API documentation for fields of metadata. | ||
| specClusterResourcePlacementSpec | The desired state of ClusterResourcePlacement. | ||
| statusClusterResourcePlacementStatus | The observed status of ClusterResourcePlacement. | 
ClusterResourcePlacementSpec
ClusterResourcePlacementSpec defines the desired state of ClusterResourcePlacement.
Appears in:
| Field | Description | Default | Validation | 
|---|---|---|---|
| resourceSelectorsClusterResourceSelector array | ResourceSelectors is an array of selectors used to select cluster scoped resources. The selectors are ORed.You can have 1-100 selectors. | MaxItems: 100 MinItems: 1 | |
| policyPlacementPolicy | Policy defines how to select member clusters to place the selected resources. If unspecified, all the joined member clusters are selected. | ||
| strategyRolloutStrategy | The rollout strategy to use to replace existing placement with new ones. | ||
| revisionHistoryLimitinteger | The number of old ClusterSchedulingPolicySnapshot or ClusterResourceSnapshot resources to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10. | 10 | Maximum: 1000 Minimum: 1 | 
ClusterResourcePlacementStatus
ClusterResourcePlacementStatus defines the observed state of the ClusterResourcePlacement object.
Appears in:
| Field | Description | Default | Validation | 
|---|---|---|---|
| selectedResourcesResourceIdentifier array | SelectedResources contains a list of resources selected by ResourceSelectors. | ||
| observedResourceIndexstring | Resource index logically represents the generation of the selected resources. We take a new snapshot of the selected resources whenever the selection or their content change. Each snapshot has a different resource index. One resource snapshot can contain multiple clusterResourceSnapshots CRs in order to store large amount of resources. To get clusterResourceSnapshot of a given resource index, use the following command: kubectl get ClusterResourceSnapshot --selector=kubernetes-fleet.io/resource-index=$ObservedResourceIndexObservedResourceIndex is the resource index that the conditions in the ClusterResourcePlacementStatus observe. For example, a condition of ClusterResourcePlacementWorkSynchronizedtypeis observing the synchronization status of the resource snapshot with the resource index $ObservedResourceIndex. | ||
| placementStatusesResourcePlacementStatus array | PlacementStatuses contains a list of placement status on the clusters that are selected by PlacementPolicy. Each selected cluster according to the latest resource placement is guaranteed to have a corresponding placementStatuses. In the pickN case, there are N placement statuses where N = NumberOfClusters; Or in the pickFixed case, there are N placement statuses where N = ClusterNames. In these cases, some of them may not have assigned clusters when we cannot fill the required number of clusters. TODO, For pickAll type, considering providing unselected clusters info. | ||
| conditionsCondition array | Conditions is an array of current observed conditions for ClusterResourcePlacement. | 
ClusterResourceSelector
ClusterResourceSelector is used to select cluster scoped resources as the target resources to be placed.
If a namespace is selected, ALL the resources under the namespace are selected automatically.
All the fields are ANDed. In other words, a resource must match all the fields to be selected.
Appears in:
| Field | Description | Default | Validation | 
|---|---|---|---|
| groupstring | Group name of the cluster-scoped resource. Use an empty string to select resources under the core API group (e.g., namespaces). | ||
| versionstring | Version of the cluster-scoped resource. | ||
| kindstring | Kind of the cluster-scoped resource. Note: When Kindisnamespace, ALL the resources under the selected namespaces are selected. | ||
| namestring | Name of the cluster-scoped resource. | ||
| labelSelectorLabelSelector | A label query over all the cluster-scoped resources. Resources matching the query are selected. Note that namespace-scoped resources can’t be selected even if they match the query. | 
ClusterResourceSnapshot
ClusterResourceSnapshot is used to store a snapshot of selected resources by a resource placement policy. Its spec is immutable. We may need to produce more than one resourceSnapshot for all the resources a ResourcePlacement selected to get around the 1MB size limit of k8s objects. We assign an ever-increasing index for each such group of resourceSnapshots. The naming convention of a clusterResourceSnapshot is {CRPName}-{resourceIndex}-{subindex} where the name of the first snapshot of a group has no subindex part so its name is {CRPName}-{resourceIndex}-snapshot. resourceIndex will begin with 0. Each snapshot MUST have the following labels:
- CRPTrackingLabelwhich points to its owner CRP.
- ResourceIndexLabelwhich is the index of the snapshot group.
- IsLatestSnapshotLabelwhich indicates whether the snapshot is the latest one.
All the snapshots within the same index group must have the same ResourceIndexLabel.
The first snapshot of the index group MUST have the following annotations:
- NumberOfResourceSnapshotsAnnotationto store the total number of resource snapshots in the index group.
- ResourceGroupHashAnnotationwhose value is the sha-256 hash of all the snapshots belong to the same snapshot index.
Each snapshot (excluding the first snapshot) MUST have the following annotations:
- SubindexOfResourceSnapshotAnnotationto store the subindex of resource snapshot in the group.
Appears in:
| Field | Description | Default | Validation | 
|---|---|---|---|
| apiVersionstring | placement.kubernetes-fleet.io/v1 | ||
| kindstring | ClusterResourceSnapshot | ||
| metadataObjectMeta | Refer to Kubernetes API documentation for fields of metadata. | ||
| specResourceSnapshotSpec | The desired state of ResourceSnapshot. | ||
| statusResourceSnapshotStatus | The observed status of ResourceSnapshot. | 
ClusterSchedulingPolicySnapshot
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:
- CRPTrackingLabelwhich points to its owner CRP.
- PolicyIndexLabelwhich is the index of the policy snapshot.
- IsLatestSnapshotLabelwhich indicates whether the snapshot is the latest one.
Appears in:
| Field | Description | Default | Validation | 
|---|---|---|---|
| apiVersionstring | placement.kubernetes-fleet.io/v1 | ||
| kindstring | ClusterSchedulingPolicySnapshot | ||
| metadataObjectMeta | Refer to Kubernetes API documentation for fields of metadata. | ||
| specSchedulingPolicySnapshotSpec | The desired state of SchedulingPolicySnapshot. | ||
| statusSchedulingPolicySnapshotStatus | The observed status of SchedulingPolicySnapshot. | 
ClusterScore
ClusterScore represents the score of the cluster calculated by the scheduler.
Appears in:
| Field | Description | Default | Validation | 
|---|---|---|---|
| affinityScoreinteger | 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. | ||
| priorityScoreinteger | 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. | 
ClusterSelector
Appears in:
| Field | Description | Default | Validation | 
|---|---|---|---|
| clusterSelectorTermsClusterSelectorTerm array | ClusterSelectorTerms is a list of cluster selector terms. The terms are ORed. | MaxItems: 10 | 
ClusterSelectorTerm
Appears in:
EnvelopeIdentifier
EnvelopeIdentifier identifies the envelope object that contains the selected resource.
Appears in:
| Field | Description | Default | Validation | 
|---|---|---|---|
| namestring | Name of the envelope object. | ||
| namespacestring | Namespace is the namespace of the envelope object. Empty if the envelope object is cluster scoped. | ||
| typeEnvelopeType | Type of the envelope object. | ConfigMap | Enum: [ConfigMap] | 
EnvelopeType
Underlying type: string
EnvelopeType defines the type of the envelope object.
Appears in:
| Field | Description | 
|---|---|
| ConfigMap | ConfigMapEnvelopeType means the envelope object is of type ConfigMap. | 
FailedResourcePlacement
FailedResourcePlacement contains the failure details of a failed resource placement.
Appears in:
| Field | Description | Default | Validation | 
|---|---|---|---|
| groupstring | Group is the group name of the selected resource. | ||
| versionstring | Version is the version of the selected resource. | ||
| kindstring | Kind represents the Kind of the selected resources. | ||
| namestring | Name of the target resource. | ||
| namespacestring | Namespace is the namespace of the resource. Empty if the resource is cluster scoped. | ||
| envelopeEnvelopeIdentifier | Envelope identifies the envelope object that contains this resource. | ||
| conditionCondition | The failed condition status. | 
Manifest
Manifest represents a resource to be deployed on spoke cluster.
Appears in:
ManifestCondition
ManifestCondition represents the conditions of the resources deployed on spoke cluster.
Appears in:
| Field | Description | Default | Validation | 
|---|---|---|---|
| identifierWorkResourceIdentifier | resourceId represents a identity of a resource linking to manifests in spec. | ||
| conditionsCondition array | Conditions represents the conditions of this resource on spoke cluster | 
NamespacedName
NamespacedName comprises a resource name, with a mandatory namespace.
Appears in:
| Field | Description | Default | Validation | 
|---|---|---|---|
| namestring | Name is the name of the namespaced scope resource. | ||
| namespacestring | Namespace is namespace of the namespaced scope resource. | 
PlacementPolicy
PlacementPolicy contains the rules to select target member clusters to place the selected resources. Note that only clusters that are both joined and satisfying the rules will be selected.
You can only specify at most one of the two fields: ClusterNames and Affinity. If none is specified, all the joined clusters are selected.
Appears in:
| Field | Description | Default | Validation | 
|---|---|---|---|
| placementTypePlacementType | Type of placement. Can be “PickAll”, “PickN” or “PickFixed”. Default is PickAll. | PickAll | Enum: [PickAll PickN PickFixed] | 
| clusterNamesstring array | ClusterNames contains a list of names of MemberCluster to place the selected resources. Only valid if the placement type is “PickFixed” | MaxItems: 100 | |
| numberOfClustersinteger | NumberOfClusters of placement. Only valid if the placement type is “PickN”. | Minimum: 0 | |
| affinityAffinity | 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”. | ||
| topologySpreadConstraintsTopologySpreadConstraint array | 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”. | ||
| tolerationsToleration array | 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. | MaxItems: 100 | 
PlacementType
Underlying type: string
PlacementType identifies the type of placement.
Appears in:
| Field | Description | 
|---|---|
| PickAll | PickAllPlacementType picks all clusters that satisfy the rules. | 
| PickN | PickNPlacementType picks N clusters that satisfy the rules. | 
| PickFixed | PickFixedPlacementType picks a fixed set of clusters. | 
PreferredClusterSelector
Appears in:
| Field | Description | Default | Validation | 
|---|---|---|---|
| weightinteger | Weight associated with matching the corresponding clusterSelectorTerm, in the range [-100, 100]. | Maximum: 100 Minimum: -100 | |
| preferenceClusterSelectorTerm | A cluster selector term, associated with the corresponding weight. | 
PropertySelectorOperator
Underlying type: string
PropertySelectorOperator is the operator that can be used with PropertySelectorRequirements.
Appears in:
| Field | Description | 
|---|---|
| Gt | PropertySelectorGreaterThan dictates Fleet to select cluster if its observed value of a given property is greater than the value specified in the requirement. | 
| Ge | PropertySelectorGreaterThanOrEqualTo dictates Fleet to select cluster if its observed value of a given property is greater than or equal to the value specified in the requirement. | 
| Eq | PropertySelectorEqualTo dictates Fleet to select cluster if its observed value of a given property is equal to the values specified in the requirement. | 
| Ne | PropertySelectorNotEqualTo dictates Fleet to select cluster if its observed value of a given property is not equal to the values specified in the requirement. | 
| Lt | PropertySelectorLessThan dictates Fleet to select cluster if its observed value of a given property is less than the value specified in the requirement. | 
| Le | PropertySelectorLessThanOrEqualTo dictates Fleet to select cluster if its observed value of a given property is less than or equal to the value specified in the requirement. | 
PropertySelectorRequirement
PropertySelectorRequirement is a specific property requirement when picking clusters for resource placement.
Appears in:
| Field | Description | Default | Validation | 
|---|---|---|---|
| namestring | Name is the name of the property; it should be a Kubernetes label name. | ||
| operatorPropertySelectorOperator | Operator specifies the relationship between a cluster’s observed value of the specified property and the values given in the requirement. | ||
| valuesstring array | 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 bespecified in the list. | MaxItems: 1 | 
PropertySortOrder
Underlying type: string
Appears in:
| Field | Description | 
|---|---|
| Descending | Descending instructs Fleet to sort in descending order, that is, the clusters with higher observed values of a property are most preferred and should have higher weights. We will use linear scaling to calculate the weight for each cluster based on the observed values. For example, with this order, if Fleet sorts all clusters by a specific property where the observed values are in the range [10, 100], and a weight of 100 is specified; Fleet will assign: * a weight of 100 to the cluster with the maximum observed value (100); and * a weight of 0 to the cluster with the minimum observed value (10); and * a weight of 11 to the cluster with an observed value of 20. It is calculated using the formula below: ((20 - 10)) / (100 - 10)) * 100 = 11 | 
| Ascending | Ascending instructs Fleet to sort in ascending order, that is, the clusters with lower observed values are most preferred and should have higher weights. We will use linear scaling to calculate the weight for each cluster based on the observed values. For example, with this order, if Fleet sorts all clusters by a specific property where the observed values are in the range [10, 100], and a weight of 100 is specified; Fleet will assign: * a weight of 0 to the cluster with the maximum observed value (100); and * a weight of 100 to the cluster with the minimum observed value (10); and * a weight of 89 to the cluster with an observed value of 20. It is calculated using the formula below: (1 - ((20 - 10) / (100 - 10))) * 100 = 89 | 
ResourceBindingSpec
ResourceBindingSpec defines the desired state of ClusterResourceBinding.
Appears in:
| Field | Description | Default | Validation | 
|---|---|---|---|
| stateBindingState | The desired state of the binding. Possible values: Scheduled, Bound, Unscheduled. | ||
| resourceSnapshotNamestring | ResourceSnapshotName is the name of the resource snapshot that this resource binding points to. If the resources are divided into multiple snapshots because of the resource size limit, it points to the name of the leading snapshot of the index group. | ||
| resourceOverrideSnapshotsNamespacedName array | ResourceOverrideSnapshots is a list of ResourceOverride snapshots associated with the selected resources. | ||
| clusterResourceOverrideSnapshotsstring array | ClusterResourceOverrides contains a list of applicable ClusterResourceOverride snapshot names associated with the selected resources. | ||
| schedulingPolicySnapshotNamestring | SchedulingPolicySnapshotName is the name of the scheduling policy snapshot that this resource binding points to; more specifically, the scheduler creates this bindings in accordance with this scheduling policy snapshot. | ||
| targetClusterstring | TargetCluster is the name of the cluster that the scheduler assigns the resources to. | ||
| clusterDecisionClusterDecision | ClusterDecision explains why the scheduler selected this cluster. | ||
| applyStrategyApplyStrategy | ApplyStrategy describes how to resolve the conflict if the resource to be placed already exists in the target cluster and is owned by other appliers. This field is a beta-level feature. | 
ResourceBindingStatus
ResourceBindingStatus represents the current status of a ClusterResourceBinding.
Appears in:
| Field | Description | Default | Validation | 
|---|---|---|---|
| failedPlacementsFailedResourcePlacement array | FailedPlacements is a list of all the resources failed to be placed to the given cluster or the resource is unavailable. Note that we only include 100 failed resource placements even if there are more than 100. | MaxItems: 100 | |
| conditionsCondition array | Conditions is an array of current observed conditions for ClusterResourceBinding. | 
ResourceContent
ResourceContent contains the content of a resource
Appears in:
ResourceIdentifier
ResourceIdentifier identifies one Kubernetes resource.
Appears in:
| Field | Description | Default | Validation | 
|---|---|---|---|
| groupstring | Group is the group name of the selected resource. | ||
| versionstring | Version is the version of the selected resource. | ||
| kindstring | Kind represents the Kind of the selected resources. | ||
| namestring | Name of the target resource. | ||
| namespacestring | Namespace is the namespace of the resource. Empty if the resource is cluster scoped. | ||
| envelopeEnvelopeIdentifier | Envelope identifies the envelope object that contains this resource. | 
ResourcePlacementStatus
ResourcePlacementStatus represents the placement status of selected resources for one target cluster.
Appears in:
| Field | Description | Default | Validation | 
|---|---|---|---|
| clusterNamestring | ClusterName is the name of the cluster this resource is assigned to. If it is not empty, its value should be unique cross all placement decisions for the Placement. | ||
| applicableResourceOverridesNamespacedName array | ApplicableResourceOverrides contains a list of applicable ResourceOverride snapshots associated with the selected resources. This field is alpha-level and is for the override policy feature. | ||
| applicableClusterResourceOverridesstring array | ApplicableClusterResourceOverrides contains a list of applicable ClusterResourceOverride snapshots associated with the selected resources. This field is alpha-level and is for the override policy feature. | ||
| failedPlacementsFailedResourcePlacement array | FailedPlacements is a list of all the resources failed to be placed to the given cluster or the resource is unavailable. Note that we only include 100 failed resource placements even if there are more than 100. This field is only meaningful if the ClusterNameis not empty. | MaxItems: 100 | |
| conditionsCondition array | Conditions is an array of current observed conditions for ResourcePlacementStatus. | 
ResourceSnapshotSpec
ResourceSnapshotSpec defines the desired state of ResourceSnapshot.
Appears in:
| Field | Description | Default | Validation | 
|---|---|---|---|
| selectedResourcesResourceContent array | SelectedResources contains a list of resources selected by ResourceSelectors. | 
ResourceSnapshotStatus
Appears in:
| Field | Description | Default | Validation | 
|---|---|---|---|
| conditionsCondition array | Conditions is an array of current observed conditions for ResourceSnapshot. | 
RollingUpdateConfig
RollingUpdateConfig contains the config to control the desired behavior of rolling update.
Appears in:
| Field | Description | Default | Validation | 
|---|---|---|---|
| maxUnavailableIntOrString | The maximum number of clusters that can be unavailable during the rolling update comparing to the desired number of clusters. The desired number equals to the NumberOfClustersfield when the placement type isPickN.The desired number equals to the number of clusters scheduler selected when the placement type is PickAll.Value can be an absolute number (ex: 5) or a percentage of the desired number of clusters (ex: 10%). Absolute number is calculated from percentage by rounding up. We consider a resource unavailable when we either remove it from a cluster or in-place upgrade the resources content on the same cluster. The minimum of MaxUnavailable is 0 to allow no downtime moving a placement from one cluster to another. Please set it to be greater than 0 to avoid rolling out stuck during in-place resource update. Defaults to 25%. | 25% | Pattern: ^((100|[0-9]\{1,2\})%|[0-9]+)$XIntOrString: {} | 
| maxSurgeIntOrString | The maximum number of clusters that can be scheduled above the desired number of clusters. The desired number equals to the NumberOfClustersfield when the placement type isPickN.The desired number equals to the number of clusters scheduler selected when the placement type is PickAll.Value can be an absolute number (ex: 5) or a percentage of desire (ex: 10%). Absolute number is calculated from percentage by rounding up. This does not apply to the case that we do in-place update of resources on the same cluster. This can not be 0 if MaxUnavailable is 0. Defaults to 25%. | 25% | Pattern: ^((100|[0-9]\{1,2\})%|[0-9]+)$XIntOrString: {} | 
| unavailablePeriodSecondsinteger | UnavailablePeriodSeconds is used to configure the waiting time between rollout phases when we cannot determine if the resources have rolled out successfully or not. We have a built-in resource state detector to determine the availability status of following well-known Kubernetes native resources: Deployment, StatefulSet, DaemonSet, Service, Namespace, ConfigMap, Secret, ClusterRole, ClusterRoleBinding, Role, RoleBinding. Please see Safe Rollout for more details. For other types of resources, we consider them as available after UnavailablePeriodSecondssecondshave passed since they were successfully applied to the target cluster. Default is 60. | 60 | 
RolloutStrategy
RolloutStrategy describes how to roll out a new change in selected resources to target clusters.
Appears in:
| Field | Description | Default | Validation | 
|---|---|---|---|
| typeRolloutStrategyType | Type of rollout. The only supported type is “RollingUpdate”. Default is “RollingUpdate”. | RollingUpdate | Enum: [RollingUpdate] | 
| rollingUpdateRollingUpdateConfig | Rolling update config params. Present only if RolloutStrategyType = RollingUpdate. | ||
| applyStrategyApplyStrategy | ApplyStrategy describes how to resolve the conflict if the resource to be placed already exists in the target cluster and is owned by other appliers. This field is a beta-level feature. | 
RolloutStrategyType
Underlying type: string
Appears in:
| Field | Description | 
|---|---|
| RollingUpdate | RollingUpdateRolloutStrategyType replaces the old placed resource using rolling update i.e. gradually create the new one while replace the old ones. | 
SchedulingPolicySnapshotSpec
SchedulingPolicySnapshotSpec defines the desired state of SchedulingPolicySnapshot.
Appears in:
| Field | Description | Default | Validation | 
|---|---|---|---|
| policyPlacementPolicy | Policy defines how to select member clusters to place the selected resources. If unspecified, all the joined member clusters are selected. | ||
| policyHashinteger array | PolicyHash is the sha-256 hash value of the Policy field. | 
SchedulingPolicySnapshotStatus
SchedulingPolicySnapshotStatus defines the observed state of SchedulingPolicySnapshot.
Appears in:
| Field | Description | Default | Validation | 
|---|---|---|---|
| observedCRPGenerationinteger | ObservedCRPGeneration is the generation of the CRP which the scheduler uses to perform the scheduling cycle and prepare the scheduling status. | ||
| conditionsCondition array | Conditions is an array of current observed conditions for SchedulingPolicySnapshot. | ||
| targetClustersClusterDecision array | 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. | MaxItems: 1000 | 
ServerSideApplyConfig
ServerSideApplyConfig defines the configuration for server side apply. Details: https://kubernetes.io/docs/reference/using-api/server-side-apply/#conflicts
Appears in:
| Field | Description | Default | Validation | 
|---|---|---|---|
| forceboolean | Force represents to force apply to succeed when resolving the conflicts For any conflicting fields, - If true, use the values from the resource to be applied to overwrite the values of the existing resource in the target cluster, as well as take over ownership of such fields. - If false, apply will fail with the reason ApplyConflictWithOtherApplier. For non-conflicting fields, values stay unchanged and ownership are shared between appliers. | 
Toleration
Toleration allows ClusterResourcePlacement to tolerate any taint that matches
the triple <key,value,effect> using the matching operator 
Appears in:
| Field | Description | Default | Validation | 
|---|---|---|---|
| keystring | 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. | ||
| operatorTolerationOperator | 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. | Equal | Enum: [Equal Exists] | 
| valuestring | Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string. | ||
| effectTaintEffect | Effect indicates the taint effect to match. Empty means match all taint effects. When specified, only allowed value is NoSchedule. | Enum: [NoSchedule] | 
TopologySpreadConstraint
TopologySpreadConstraint specifies how to spread resources among the given cluster topology.
Appears in:
| Field | Description | Default | Validation | 
|---|---|---|---|
| maxSkewinteger | MaxSkew describes the degree to which resources may be unevenly distributed. When whenUnsatisfiable=DoNotSchedule, it is the maximum permitted differencebetween 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 precedenceto topologies that satisfy it. It’s an optional field. Default value is 1 and 0 is not allowed. | 1 | Minimum: 1 | 
| topologyKeystring | 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 MaxSkewvalue.It’s a required field. | ||
| whenUnsatisfiableUnsatisfiableConstraintAction | 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. | 
UnsatisfiableConstraintAction
Underlying type: string
UnsatisfiableConstraintAction defines the type of actions that can be taken if a constraint is not satisfied.
Appears in:
| Field | Description | 
|---|---|
| DoNotSchedule | DoNotSchedule instructs the scheduler not to schedule the resource onto the cluster when constraints are not satisfied. | 
| ScheduleAnyway | ScheduleAnyway instructs the scheduler to schedule the resource even if constraints are not satisfied. | 
Work
Work is the Schema for the works API.
Appears in:
| Field | Description | Default | Validation | 
|---|---|---|---|
| apiVersionstring | placement.kubernetes-fleet.io/v1 | ||
| kindstring | Work | ||
| metadataObjectMeta | Refer to Kubernetes API documentation for fields of metadata. | ||
| specWorkSpec | spec defines the workload of a work. | ||
| statusWorkStatus | status defines the status of each applied manifest on the spoke cluster. | 
WorkList
WorkList contains a list of Work.
| Field | Description | Default | Validation | 
|---|---|---|---|
| apiVersionstring | placement.kubernetes-fleet.io/v1 | ||
| kindstring | WorkList | ||
| metadataListMeta | Refer to Kubernetes API documentation for fields of metadata. | ||
| itemsWork array | List of works. | 
WorkResourceIdentifier
WorkResourceIdentifier provides the identifiers needed to interact with any arbitrary object. Renamed original “ResourceIdentifier” so that it won’t conflict with ResourceIdentifier defined in the clusterresourceplacement_types.go.
Appears in:
| Field | Description | Default | Validation | 
|---|---|---|---|
| ordinalinteger | Ordinal represents an index in manifests list, so the condition can still be linked to a manifest even though manifest cannot be parsed successfully. | ||
| groupstring | Group is the group of the resource. | ||
| versionstring | Version is the version of the resource. | ||
| kindstring | Kind is the kind of the resource. | ||
| resourcestring | Resource is the resource type of the resource | ||
| namespacestring | Namespace is the namespace of the resource, the resource is cluster scoped if the value is empty | ||
| namestring | Name is the name of the resource | 
WorkSpec
WorkSpec defines the desired state of Work.
Appears in:
| Field | Description | Default | Validation | 
|---|---|---|---|
| workloadWorkloadTemplate | Workload represents the manifest workload to be deployed on spoke cluster | ||
| applyStrategyApplyStrategy | ApplyStrategy describes how to resolve the conflict if the resource to be placed already exists in the target cluster and is owned by other appliers. This field is a beta-level feature. | 
WorkStatus
WorkStatus defines the observed state of Work.
Appears in:
| Field | Description | Default | Validation | 
|---|---|---|---|
| conditionsCondition array | Conditions contains the different condition statuses for this work. Valid condition types are: 1. Applied represents workload in Work is applied successfully on the spoke cluster. 2. Progressing represents workload in Work in the transitioning from one state to another the on the spoke cluster. 3. Available represents workload in Work exists on the spoke cluster. 4. Degraded represents the current state of workload does not match the desired state for a certain period. | ||
| manifestConditionsManifestCondition array | ManifestConditions represents the conditions of each resource in work deployed on spoke cluster. | 
WorkloadTemplate
WorkloadTemplate represents the manifest workload to be deployed on spoke cluster
Appears in:
| Field | Description | Default | Validation | 
|---|---|---|---|
| manifestsManifest array | Manifests represents a list of kubernetes resources to be deployed on the spoke cluster. | 
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can further improve.
Sorry to hear that. Please tell us how we can fix the experience for you.