Packages
- cluster.kubernetes-fleet.io/v1
- cluster.kubernetes-fleet.io/v1beta1
- placement.kubernetes-fleet.io/v1
- placement.kubernetes-fleet.io/v1alpha1
- placement.kubernetes-fleet.io/v1beta1
cluster.kubernetes-fleet.io/v1
Resource Types
AgentStatus
AgentStatus defines the observed status of the member agent of the given type.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
type AgentType | Type of the member agent. | ||
conditions Condition array | Conditions is an array of current observed conditions for the member agent. | ||
lastReceivedHeartbeat Time | Last time we received a heartbeat from the member agent. |
AgentType
Underlying type: string
AgentType defines a type of agent/binary running in a member cluster.
Appears in:
Field | Description |
---|---|
MemberAgent | MemberAgent (core) handles member cluster joining/leaving as well as k8s object placement from hub to member clusters. |
MultiClusterServiceAgent | MultiClusterServiceAgent (networking) is responsible for exposing multi-cluster services via L4 load balancer. |
ServiceExportImportAgent | ServiceExportImportAgent (networking) is responsible for export or import services across multi-clusters. |
ClusterState
Underlying type: string
Appears in:
Field | Description |
---|---|
Join | |
Leave |
InternalMemberCluster
InternalMemberCluster is used by hub agent to notify the member agents about the member cluster state changes, and is used by the member agents to report their status.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
apiVersion string | cluster.kubernetes-fleet.io/v1 | ||
kind string | InternalMemberCluster | ||
metadata ObjectMeta | Refer to Kubernetes API documentation for fields of metadata . | ||
spec InternalMemberClusterSpec | The desired state of InternalMemberCluster. | ||
status InternalMemberClusterStatus | The observed status of InternalMemberCluster. |
InternalMemberClusterList
InternalMemberClusterList contains a list of InternalMemberCluster.
Field | Description | Default | Validation |
---|---|---|---|
apiVersion string | cluster.kubernetes-fleet.io/v1 | ||
kind string | InternalMemberClusterList | ||
metadata ListMeta | Refer to Kubernetes API documentation for fields of metadata . | ||
items InternalMemberCluster array |
InternalMemberClusterSpec
InternalMemberClusterSpec defines the desired state of InternalMemberCluster. Set by the hub agent.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
state ClusterState | The desired state of the member cluster. Possible values: Join, Leave. | ||
heartbeatPeriodSeconds integer | How often (in seconds) for the member cluster to send a heartbeat to the hub cluster. Default: 60 seconds. Min: 1 second. Max: 10 minutes. | 60 | Maximum: 600 Minimum: 1 |
InternalMemberClusterStatus
InternalMemberClusterStatus defines the observed state of InternalMemberCluster.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
conditions Condition array | Conditions is an array of current observed conditions for the member cluster. | ||
properties object (keys:PropertyName, values:PropertyValue) | Properties is an array of properties observed for the member cluster. This field is beta-level; it is for the property-based scheduling feature and is only populated when a property provider is enabled in the deployment. | ||
resourceUsage ResourceUsage | The current observed resource usage of the member cluster. It is populated by the member agent. | ||
agentStatus AgentStatus array | AgentStatus is an array of current observed status, each corresponding to one member agent running in the member cluster. |
MemberCluster
MemberCluster is a resource created in the hub cluster to represent a member cluster within a fleet.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
apiVersion string | cluster.kubernetes-fleet.io/v1 | ||
kind string | MemberCluster | ||
metadata ObjectMeta | Refer to Kubernetes API documentation for fields of metadata . | ||
spec MemberClusterSpec | The desired state of MemberCluster. | ||
status MemberClusterStatus | The observed status of MemberCluster. |
MemberClusterList
MemberClusterList contains a list of MemberCluster.
Field | Description | Default | Validation |
---|---|---|---|
apiVersion string | cluster.kubernetes-fleet.io/v1 | ||
kind string | MemberClusterList | ||
metadata ListMeta | Refer to Kubernetes API documentation for fields of metadata . | ||
items MemberCluster array |
MemberClusterSpec
MemberClusterSpec defines the desired state of MemberCluster.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
identity Subject | The identity used by the member cluster to access the hub cluster. The hub agents deployed on the hub cluster will automatically grant the minimal required permissions to this identity for the member agents deployed on the member cluster to access the hub cluster. | ||
heartbeatPeriodSeconds integer | How often (in seconds) for the member cluster to send a heartbeat to the hub cluster. Default: 60 seconds. Min: 1 second. Max: 10 minutes. | 60 | Maximum: 600 Minimum: 1 |
taints Taint array | If specified, the MemberCluster’s taints. This field is beta-level and is for the taints and tolerations feature. | MaxItems: 100 |
MemberClusterStatus
MemberClusterStatus defines the observed status of MemberCluster.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
conditions Condition array | Conditions is an array of current observed conditions for the member cluster. | ||
properties object (keys:PropertyName, values:PropertyValue) | Properties is an array of properties observed for the member cluster. This field is beta-level; it is for the property-based scheduling feature and is only populated when a property provider is enabled in the deployment. | ||
resourceUsage ResourceUsage | The current observed resource usage of the member cluster. It is copied from the corresponding InternalMemberCluster object. | ||
agentStatus AgentStatus array | AgentStatus is an array of current observed status, each corresponding to one member agent running in the member cluster. |
PropertyName
Underlying type: string
PropertyName is the name of a cluster property; it should be a Kubernetes label name.
Appears in:
PropertyValue
PropertyValue is the value of a cluster property.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
value string | Value is the value of the cluster property. Currently, it should be a valid Kubernetes quantity. For more information, see https://pkg.go.dev/k8s.io/apimachinery/pkg/api/resource#Quantity. | ||
observationTime Time | ObservationTime is when the cluster property is observed. |
ResourceUsage
ResourceUsage contains the observed resource usage of a member cluster.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
capacity ResourceList | Capacity represents the total resource capacity of all the nodes on a member cluster. A node’s total capacity is the amount of resource installed on the node. | ||
allocatable ResourceList | Allocatable represents the total allocatable resources of all the nodes on a member cluster. A node’s allocatable capacity is the amount of resource that can actually be used for user workloads, i.e., allocatable capacity = total capacity - capacities reserved for the OS, kubelet, etc. For more information, see https://kubernetes.io/docs/tasks/administer-cluster/reserve-compute-resources/. | ||
available ResourceList | Available represents the total available resources of all the nodes on a member cluster. A node’s available capacity is the amount of resource that has not been used yet, i.e., available capacity = allocatable capacity - capacity that has been requested by workloads. This field is beta-level; it is for the property-based scheduling feature and is only populated when a property provider is enabled in the deployment. | ||
observationTime Time | When the resource usage is observed. |
Taint
Taint attached to MemberCluster has the “effect” on any ClusterResourcePlacement that does not tolerate the Taint.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
key string | The taint key to be applied to a MemberCluster. | ||
value string | The taint value corresponding to the taint key. | ||
effect TaintEffect | The effect of the taint on ClusterResourcePlacements that do not tolerate the taint. Only NoSchedule is supported. | Enum: [NoSchedule] |
cluster.kubernetes-fleet.io/v1beta1
Resource Types
AgentStatus
AgentStatus defines the observed status of the member agent of the given type.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
type AgentType | Type of the member agent. | ||
conditions Condition array | Conditions is an array of current observed conditions for the member agent. | ||
lastReceivedHeartbeat Time | Last time we received a heartbeat from the member agent. |
AgentType
Underlying type: string
AgentType defines a type of agent/binary running in a member cluster.
Appears in:
Field | Description |
---|---|
MemberAgent | MemberAgent (core) handles member cluster joining/leaving as well as k8s object placement from hub to member clusters. |
MultiClusterServiceAgent | MultiClusterServiceAgent (networking) is responsible for exposing multi-cluster services via L4 load balancer. |
ServiceExportImportAgent | ServiceExportImportAgent (networking) is responsible for export or import services across multi-clusters. |
ClusterState
Underlying type: string
Appears in:
Field | Description |
---|---|
Join | |
Leave |
InternalMemberCluster
InternalMemberCluster is used by hub agent to notify the member agents about the member cluster state changes, and is used by the member agents to report their status.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
apiVersion string | cluster.kubernetes-fleet.io/v1beta1 | ||
kind string | InternalMemberCluster | ||
metadata ObjectMeta | Refer to Kubernetes API documentation for fields of metadata . | ||
spec InternalMemberClusterSpec | The desired state of InternalMemberCluster. | ||
status InternalMemberClusterStatus | The observed status of InternalMemberCluster. |
InternalMemberClusterList
InternalMemberClusterList contains a list of InternalMemberCluster.
Field | Description | Default | Validation |
---|---|---|---|
apiVersion string | cluster.kubernetes-fleet.io/v1beta1 | ||
kind string | InternalMemberClusterList | ||
metadata ListMeta | Refer to Kubernetes API documentation for fields of metadata . | ||
items InternalMemberCluster array |
InternalMemberClusterSpec
InternalMemberClusterSpec defines the desired state of InternalMemberCluster. Set by the hub agent.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
state ClusterState | The desired state of the member cluster. Possible values: Join, Leave. | ||
heartbeatPeriodSeconds integer | How often (in seconds) for the member cluster to send a heartbeat to the hub cluster. Default: 60 seconds. Min: 1 second. Max: 10 minutes. | 60 | Maximum: 600 Minimum: 1 |
InternalMemberClusterStatus
InternalMemberClusterStatus defines the observed state of InternalMemberCluster.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
conditions Condition array | Conditions is an array of current observed conditions for the member cluster. | ||
properties object (keys:PropertyName, values:PropertyValue) | Properties is an array of properties observed for the member cluster. This field is beta-level; it is for the property-based scheduling feature and is only populated when a property provider is enabled in the deployment. | ||
resourceUsage ResourceUsage | The current observed resource usage of the member cluster. It is populated by the member agent. | ||
agentStatus AgentStatus array | AgentStatus is an array of current observed status, each corresponding to one member agent running in the member cluster. |
MemberCluster
MemberCluster is a resource created in the hub cluster to represent a member cluster within a fleet.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
apiVersion string | cluster.kubernetes-fleet.io/v1beta1 | ||
kind string | MemberCluster | ||
metadata ObjectMeta | Refer to Kubernetes API documentation for fields of metadata . | ||
spec MemberClusterSpec | The desired state of MemberCluster. | ||
status MemberClusterStatus | The observed status of MemberCluster. |
MemberClusterList
MemberClusterList contains a list of MemberCluster.
Field | Description | Default | Validation |
---|---|---|---|
apiVersion string | cluster.kubernetes-fleet.io/v1beta1 | ||
kind string | MemberClusterList | ||
metadata ListMeta | Refer to Kubernetes API documentation for fields of metadata . | ||
items MemberCluster array |
MemberClusterSpec
MemberClusterSpec defines the desired state of MemberCluster.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
identity Subject | The identity used by the member cluster to access the hub cluster. The hub agents deployed on the hub cluster will automatically grant the minimal required permissions to this identity for the member agents deployed on the member cluster to access the hub cluster. | ||
heartbeatPeriodSeconds integer | How often (in seconds) for the member cluster to send a heartbeat to the hub cluster. Default: 60 seconds. Min: 1 second. Max: 10 minutes. | 60 | Maximum: 600 Minimum: 1 |
taints Taint array | If specified, the MemberCluster’s taints. This field is beta-level and is for the taints and tolerations feature. | MaxItems: 100 |
MemberClusterStatus
MemberClusterStatus defines the observed status of MemberCluster.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
conditions Condition array | Conditions is an array of current observed conditions for the member cluster. | ||
properties object (keys:PropertyName, values:PropertyValue) | Properties is an array of properties observed for the member cluster. This field is beta-level; it is for the property-based scheduling feature and is only populated when a property provider is enabled in the deployment. | ||
resourceUsage ResourceUsage | The current observed resource usage of the member cluster. It is copied from the corresponding InternalMemberCluster object. | ||
agentStatus AgentStatus array | AgentStatus is an array of current observed status, each corresponding to one member agent running in the member cluster. |
PropertyName
Underlying type: string
PropertyName is the name of a cluster property; it should be a Kubernetes label name.
Appears in:
PropertyValue
PropertyValue is the value of a cluster property.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
value string | Value is the value of the cluster property. Currently, it should be a valid Kubernetes quantity. For more information, see https://pkg.go.dev/k8s.io/apimachinery/pkg/api/resource#Quantity. | ||
observationTime Time | ObservationTime is when the cluster property is observed. |
ResourceUsage
ResourceUsage contains the observed resource usage of a member cluster.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
capacity ResourceList | Capacity represents the total resource capacity of all the nodes on a member cluster. A node’s total capacity is the amount of resource installed on the node. | ||
allocatable ResourceList | Allocatable represents the total allocatable resources of all the nodes on a member cluster. A node’s allocatable capacity is the amount of resource that can actually be used for user workloads, i.e., allocatable capacity = total capacity - capacities reserved for the OS, kubelet, etc. For more information, see https://kubernetes.io/docs/tasks/administer-cluster/reserve-compute-resources/. | ||
available ResourceList | Available represents the total available resources of all the nodes on a member cluster. A node’s available capacity is the amount of resource that has not been used yet, i.e., available capacity = allocatable capacity - capacity that has been requested by workloads. This field is beta-level; it is for the property-based scheduling feature and is only populated when a property provider is enabled in the deployment. | ||
observationTime Time | When the resource usage is observed. |
Taint
Taint attached to MemberCluster has the “effect” on any ClusterResourcePlacement that does not tolerate the Taint.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
key string | The taint key to be applied to a MemberCluster. | ||
value string | The taint value corresponding to the taint key. | ||
effect TaintEffect | The effect of the taint on ClusterResourcePlacements that do not tolerate the taint. Only NoSchedule is supported. | Enum: [NoSchedule] |
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 |
---|---|---|---|
clusterAffinity ClusterAffinity | 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 |
---|---|---|---|
ordinal integer | Ordinal represents an index in manifests list, so the condition can still be linked to a manifest even though manifest cannot be parsed successfully. | ||
group string | Group is the group of the resource. | ||
version string | Version is the version of the resource. | ||
kind string | Kind is the kind of the resource. | ||
resource string | Resource is the resource type of the resource | ||
namespace string | Namespace is the namespace of the resource, the resource is cluster scoped if the value is empty | ||
name string | Name is the name of the resource | ||
uid UID | 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 |
---|---|---|---|
apiVersion string | placement.kubernetes-fleet.io/v1 | ||
kind string | AppliedWork | ||
metadata ObjectMeta | Refer to Kubernetes API documentation for fields of metadata . | ||
spec AppliedWorkSpec | Spec represents the desired configuration of AppliedWork. | Required: {} | |
status AppliedWorkStatus | Status represents the current status of AppliedWork. |
AppliedWorkList
AppliedWorkList contains a list of AppliedWork.
Field | Description | Default | Validation |
---|---|---|---|
apiVersion string | placement.kubernetes-fleet.io/v1 | ||
kind string | AppliedWorkList | ||
metadata ListMeta | Refer to Kubernetes API documentation for fields of metadata . | ||
items AppliedWork array | List of works. |
AppliedWorkSpec
AppliedWorkSpec represents the desired configuration of AppliedWork.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
workName string | WorkName represents the name of the related work on the hub. | Required: {} | |
workNamespace string | 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 |
---|---|---|---|
appliedResources AppliedResourceMeta 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 |
---|---|---|---|
type ApplyStrategyType | 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] |
allowCoOwnership boolean | 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. | ||
serverSideApplyConfig ServerSideApplyConfig | 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 apply does by storinglast applied state in the last-applied-configuration annotation.When the last-applied-configuration annotation 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 |
---|---|---|---|
requiredDuringSchedulingIgnoredDuringExecution ClusterSelector | 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. | ||
preferredDuringSchedulingIgnoredDuringExecution PreferredClusterSelector 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 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. |
ClusterDecision
ClusterDecision represents a decision from a placement An empty ClusterDecision indicates it is not scheduled yet.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
clusterName string | 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: {} | |
selected boolean | Selected indicates if this cluster is selected by the scheduler. | ||
clusterScore ClusterScore | ClusterScore represents the score of the cluster calculated by the scheduler. | ||
reason string | 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 |
---|---|---|---|
apiVersion string | placement.kubernetes-fleet.io/v1 | ||
kind string | ClusterResourceBinding | ||
metadata ObjectMeta | Refer to Kubernetes API documentation for fields of metadata . | ||
spec ResourceBindingSpec | The desired state of ClusterResourceBinding. | ||
status ResourceBindingStatus | 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 |
---|---|---|---|
apiVersion string | placement.kubernetes-fleet.io/v1 | ||
kind string | ClusterResourcePlacement | ||
metadata ObjectMeta | Refer to Kubernetes API documentation for fields of metadata . | ||
spec ClusterResourcePlacementSpec | The desired state of ClusterResourcePlacement. | ||
status ClusterResourcePlacementStatus | The observed status of ClusterResourcePlacement. |
ClusterResourcePlacementSpec
ClusterResourcePlacementSpec defines the desired state of ClusterResourcePlacement.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
resourceSelectors ClusterResourceSelector 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 | |
policy PlacementPolicy | Policy defines how to select member clusters to place the selected resources. If unspecified, all the joined member clusters are selected. | ||
strategy RolloutStrategy | The rollout strategy to use to replace existing placement with new ones. | ||
revisionHistoryLimit integer | 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 |
---|---|---|---|
selectedResources ResourceIdentifier array | SelectedResources contains a list of resources selected by ResourceSelectors. | ||
observedResourceIndex string | 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=$ObservedResourceIndex ObservedResourceIndex is the resource index that the conditions in the ClusterResourcePlacementStatus observe. For example, a condition of ClusterResourcePlacementWorkSynchronized typeis observing the synchronization status of the resource snapshot with the resource index $ObservedResourceIndex. | ||
placementStatuses ResourcePlacementStatus 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. | ||
conditions Condition 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 |
---|---|---|---|
group string | Group name of the cluster-scoped resource. Use an empty string to select resources under the core API group (e.g., namespaces). | ||
version string | Version of the cluster-scoped resource. | ||
kind string | Kind of the cluster-scoped resource. Note: When Kind is namespace , ALL the resources under the selected namespaces are selected. | ||
name string | Name of the cluster-scoped resource. | ||
labelSelector LabelSelector | 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:
CRPTrackingLabel
which points to its owner CRP.ResourceIndexLabel
which is the index of the snapshot group.IsLatestSnapshotLabel
which 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:
NumberOfResourceSnapshotsAnnotation
to store the total number of resource snapshots in the index group.ResourceGroupHashAnnotation
whose 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:
SubindexOfResourceSnapshotAnnotation
to store the subindex of resource snapshot in the group.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
apiVersion string | placement.kubernetes-fleet.io/v1 | ||
kind string | ClusterResourceSnapshot | ||
metadata ObjectMeta | Refer to Kubernetes API documentation for fields of metadata . | ||
spec ResourceSnapshotSpec | The desired state of ResourceSnapshot. | ||
status ResourceSnapshotStatus | 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:
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.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
apiVersion string | placement.kubernetes-fleet.io/v1 | ||
kind string | ClusterSchedulingPolicySnapshot | ||
metadata ObjectMeta | Refer to Kubernetes API documentation for fields of metadata . | ||
spec SchedulingPolicySnapshotSpec | The desired state of SchedulingPolicySnapshot. | ||
status SchedulingPolicySnapshotStatus | The observed status of SchedulingPolicySnapshot. |
ClusterScore
ClusterScore represents the score of the cluster calculated by the scheduler.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
affinityScore integer | 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. | ||
priorityScore integer | 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 |
---|---|---|---|
clusterSelectorTerms ClusterSelectorTerm 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 |
---|---|---|---|
name string | Name of the envelope object. | ||
namespace string | Namespace is the namespace of the envelope object. Empty if the envelope object is cluster scoped. | ||
type EnvelopeType | 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 |
---|---|---|---|
group string | Group is the group name of the selected resource. | ||
version string | Version is the version of the selected resource. | ||
kind string | Kind represents the Kind of the selected resources. | ||
name string | Name of the target resource. | ||
namespace string | Namespace is the namespace of the resource. Empty if the resource is cluster scoped. | ||
envelope EnvelopeIdentifier | Envelope identifies the envelope object that contains this resource. | ||
condition Condition | 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 |
---|---|---|---|
identifier WorkResourceIdentifier | resourceId represents a identity of a resource linking to manifests in spec. | ||
conditions Condition 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 |
---|---|---|---|
name string | Name is the name of the namespaced scope resource. | ||
namespace string | 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 |
---|---|---|---|
placementType PlacementType | Type of placement. Can be “PickAll”, “PickN” or “PickFixed”. Default is PickAll. | PickAll | Enum: [PickAll PickN PickFixed] |
clusterNames string array | ClusterNames contains a list of names of MemberCluster to place the selected resources. Only valid if the placement type is “PickFixed” | MaxItems: 100 | |
numberOfClusters integer | NumberOfClusters of placement. Only valid if the placement type is “PickN”. | Minimum: 0 | |
affinity Affinity | 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”. | ||
topologySpreadConstraints TopologySpreadConstraint 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”. | ||
tolerations Toleration 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 |
---|---|---|---|
weight integer | Weight associated with matching the corresponding clusterSelectorTerm, in the range [-100, 100]. | Maximum: 100 Minimum: -100 | |
preference ClusterSelectorTerm | 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 |
---|---|---|---|
name string | Name is the name of the property; it should be a Kubernetes label name. | ||
operator PropertySelectorOperator | Operator specifies the relationship between a cluster’s observed value of the specified property and the values given in the requirement. | ||
values string 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 |
---|---|---|---|
state BindingState | The desired state of the binding. Possible values: Scheduled, Bound, Unscheduled. | ||
resourceSnapshotName string | 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. | ||
resourceOverrideSnapshots NamespacedName array | ResourceOverrideSnapshots is a list of ResourceOverride snapshots associated with the selected resources. | ||
clusterResourceOverrideSnapshots string array | ClusterResourceOverrides contains a list of applicable ClusterResourceOverride snapshot names associated with the selected resources. | ||
schedulingPolicySnapshotName string | 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. | ||
targetCluster string | TargetCluster is the name of the cluster that the scheduler assigns the resources to. | ||
clusterDecision ClusterDecision | ClusterDecision explains why the scheduler selected this cluster. | ||
applyStrategy ApplyStrategy | 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 |
---|---|---|---|
failedPlacements FailedResourcePlacement 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 | |
conditions Condition 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 |
---|---|---|---|
group string | Group is the group name of the selected resource. | ||
version string | Version is the version of the selected resource. | ||
kind string | Kind represents the Kind of the selected resources. | ||
name string | Name of the target resource. | ||
namespace string | Namespace is the namespace of the resource. Empty if the resource is cluster scoped. | ||
envelope EnvelopeIdentifier | 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 |
---|---|---|---|
clusterName string | 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. | ||
applicableResourceOverrides NamespacedName 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. | ||
applicableClusterResourceOverrides string 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. | ||
failedPlacements FailedResourcePlacement 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 ClusterName is not empty. | MaxItems: 100 | |
conditions Condition 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 |
---|---|---|---|
selectedResources ResourceContent array | SelectedResources contains a list of resources selected by ResourceSelectors. |
ResourceSnapshotStatus
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
conditions Condition 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 |
---|---|---|---|
maxUnavailable IntOrString | 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 NumberOfClusters field when the placement type is PickN .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: {} |
maxSurge IntOrString | The maximum number of clusters that can be scheduled above the desired number of clusters. The desired number equals to the NumberOfClusters field when the placement type is PickN .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: {} |
unavailablePeriodSeconds integer | 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 SafeRollout for more details. For other types of resources, we consider them as available after UnavailablePeriodSeconds secondshave 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 |
---|---|---|---|
type RolloutStrategyType | Type of rollout. The only supported type is “RollingUpdate”. Default is “RollingUpdate”. | RollingUpdate | Enum: [RollingUpdate] |
rollingUpdate RollingUpdateConfig | Rolling update config params. Present only if RolloutStrategyType = RollingUpdate. | ||
applyStrategy ApplyStrategy | 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 |
---|---|---|---|
policy PlacementPolicy | Policy defines how to select member clusters to place the selected resources. If unspecified, all the joined member clusters are selected. | ||
policyHash integer 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 |
---|---|---|---|
observedCRPGeneration integer | ObservedCRPGeneration is the generation of the CRP which the scheduler uses to perform the scheduling cycle and prepare the scheduling status. | ||
conditions Condition array | Conditions is an array of current observed conditions for SchedulingPolicySnapshot. | ||
targetClusters ClusterDecision 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 |
---|---|---|---|
force boolean | 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 |
---|---|---|---|
key string | 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. | ||
operator TolerationOperator | 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] |
value string | Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string. | ||
effect TaintEffect | 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 |
---|---|---|---|
maxSkew integer | 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 |
topologyKey string | 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. | ||
whenUnsatisfiable UnsatisfiableConstraintAction | 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 |
---|---|---|---|
apiVersion string | placement.kubernetes-fleet.io/v1 | ||
kind string | Work | ||
metadata ObjectMeta | Refer to Kubernetes API documentation for fields of metadata . | ||
spec WorkSpec | spec defines the workload of a work. | ||
status WorkStatus | status defines the status of each applied manifest on the spoke cluster. |
WorkList
WorkList contains a list of Work.
Field | Description | Default | Validation |
---|---|---|---|
apiVersion string | placement.kubernetes-fleet.io/v1 | ||
kind string | WorkList | ||
metadata ListMeta | Refer to Kubernetes API documentation for fields of metadata . | ||
items Work 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 |
---|---|---|---|
ordinal integer | Ordinal represents an index in manifests list, so the condition can still be linked to a manifest even though manifest cannot be parsed successfully. | ||
group string | Group is the group of the resource. | ||
version string | Version is the version of the resource. | ||
kind string | Kind is the kind of the resource. | ||
resource string | Resource is the resource type of the resource | ||
namespace string | Namespace is the namespace of the resource, the resource is cluster scoped if the value is empty | ||
name string | Name is the name of the resource |
WorkSpec
WorkSpec defines the desired state of Work.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
workload WorkloadTemplate | Workload represents the manifest workload to be deployed on spoke cluster | ||
applyStrategy ApplyStrategy | 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 |
---|---|---|---|
conditions Condition 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. | ||
manifestConditions ManifestCondition 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 |
---|---|---|---|
manifests Manifest array | Manifests represents a list of kubernetes resources to be deployed on the spoke cluster. |
placement.kubernetes-fleet.io/v1alpha1
Resource Types
- ClusterApprovalRequest
- ClusterResourceOverride
- ClusterResourceOverrideSnapshot
- ClusterResourcePlacementDisruptionBudget
- ClusterResourcePlacementEviction
- ClusterStagedUpdateRun
- ClusterStagedUpdateStrategy
- ResourceOverride
- ResourceOverrideSnapshot
AfterStageTask
AfterStageTask is the collection of post-stage tasks that ALL need to be completed before moving to the next stage.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
type AfterStageTaskType | The type of the after-stage task. | Enum: [TimedWait Approval] Required: {} | |
waitTime Duration | The time to wait after all the clusters in the current stage complete the update before moving to the next stage. | Optional: {} Pattern: ^0|([0-9]+(\.[0-9]+)?(s|m|h))+$ Type: string |
AfterStageTaskStatus
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
type AfterStageTaskType | The type of the post-update task. | Enum: [TimedWait Approval] Required: {} | |
approvalRequestName string | The name of the approval request object that is created for this stage. Only valid if the AfterStageTaskType is Approval. | Optional: {} | |
conditions Condition array | Conditions is an array of current observed conditions for the specific type of post-update task. Known conditions are “ApprovalRequestCreated”, “WaitTimeElapsed”, and “ApprovalRequestApproved”. | Optional: {} |
AfterStageTaskType
Underlying type: string
AfterStageTaskType identifies a specific type of the AfterStageTask.
Appears in:
Field | Description |
---|---|
TimedWait | AfterStageTaskTypeTimedWait indicates the post-stage task is a timed wait. |
Approval | AfterStageTaskTypeApproval indicates the post-stage task is an approval. |
ApprovalRequestSpec
ApprovalRequestSpec defines the desired state of the update run approval request. The entire spec is immutable.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
parentStageRollout string | The name of the staged update run that this approval request is for. | Required: {} | |
targetStage string | The name of the update stage that this approval request is for. | Required: {} |
ApprovalRequestStatus
ApprovalRequestStatus defines the observed state of the ClusterApprovalRequest.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
conditions Condition array | Conditions is an array of current observed conditions for the specific type of post-update task. Known conditions are “Approved” and “ApprovalAccepted”. | Optional: {} |
ClusterApprovalRequest
ClusterApprovalRequest defines a request for user approval for cluster staged update run. The request object MUST have the following labels:
TargetUpdateRun
: Points to the cluster staged update run that this approval request is for.TargetStage
: The name of the stage that this approval request is for.IsLatestUpdateRunApproval
: Indicates whether this approval request is the latest one related to this update run.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
apiVersion string | placement.kubernetes-fleet.io/v1alpha1 | ||
kind string | ClusterApprovalRequest | ||
metadata ObjectMeta | Refer to Kubernetes API documentation for fields of metadata . | ||
spec ApprovalRequestSpec | The desired state of ClusterApprovalRequest. | Required: {} | |
status ApprovalRequestStatus | The observed state of ClusterApprovalRequest. | Optional: {} |
ClusterResourceOverride
ClusterResourceOverride defines a group of override policies about how to override the selected cluster scope resources to target clusters.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
apiVersion string | placement.kubernetes-fleet.io/v1alpha1 | ||
kind string | ClusterResourceOverride | ||
metadata ObjectMeta | Refer to Kubernetes API documentation for fields of metadata . | ||
spec ClusterResourceOverrideSpec | The desired state of ClusterResourceOverrideSpec. |
ClusterResourceOverrideSnapshot
ClusterResourceOverrideSnapshot is used to store a snapshot of ClusterResourceOverride. Its spec is immutable. We assign an ever-increasing index for snapshots. The naming convention of a ClusterResourceOverrideSnapshot is {ClusterResourceOverride}-{resourceIndex}. resourceIndex will begin with 0. Each snapshot MUST have the following labels:
OverrideTrackingLabel
which points to its owner ClusterResourceOverride.IsLatestSnapshotLabel
which indicates whether the snapshot is the latest one.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
apiVersion string | placement.kubernetes-fleet.io/v1alpha1 | ||
kind string | ClusterResourceOverrideSnapshot | ||
metadata ObjectMeta | Refer to Kubernetes API documentation for fields of metadata . | ||
spec ClusterResourceOverrideSnapshotSpec | The desired state of ClusterResourceOverrideSnapshotSpec. |
ClusterResourceOverrideSnapshotSpec
ClusterResourceOverrideSnapshotSpec defines the desired state of ClusterResourceOverride.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
overrideSpec ClusterResourceOverrideSpec | OverrideSpec stores the spec of ClusterResourceOverride. | ||
overrideHash integer array | OverrideHash is the sha-256 hash value of the OverrideSpec field. |
ClusterResourceOverrideSpec
ClusterResourceOverrideSpec defines the desired state of the Override. The ClusterResourceOverride create or update will fail when the resource has been selected by the existing ClusterResourceOverride. If the resource is selected by both ClusterResourceOverride and ResourceOverride, ResourceOverride will win when resolving conflicts.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
placement PlacementRef | Placement defines whether the override is applied to a specific placement or not. If set, the override will trigger the placement rollout immediately when the rollout strategy type is RollingUpdate. Otherwise, it will be applied to the next rollout. The recommended way is to set the placement so that the override can be rolled out immediately. | ||
clusterResourceSelectors ClusterResourceSelector array | ClusterResourceSelectors is an array of selectors used to select cluster scoped resources. The selectors are ORed .If a namespace is selected, ALL the resources under the namespace are selected automatically. LabelSelector is not supported. You can have 1-20 selectors. We only support Name selector for now. | MaxItems: 20 MinItems: 1 Required: {} | |
policy OverridePolicy | Policy defines how to override the selected resources on the target clusters. |
ClusterResourcePlacementDisruptionBudget
ClusterResourcePlacementDisruptionBudget is the policy applied to a ClusterResourcePlacement object that specifies its disruption budget, i.e., how many placements (clusters) can be down at the same time due to voluntary disruptions (e.g., evictions). Involuntary disruptions are not subject to this budget, but will still count against it.
To apply a ClusterResourcePlacementDisruptionBudget to a ClusterResourcePlacement, use the same name for the ClusterResourcePlacementDisruptionBudget object as the ClusterResourcePlacement object. This guarantees a 1:1 link between the two objects.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
apiVersion string | placement.kubernetes-fleet.io/v1alpha1 | ||
kind string | ClusterResourcePlacementDisruptionBudget | ||
metadata ObjectMeta | Refer to Kubernetes API documentation for fields of metadata . | ||
spec PlacementDisruptionBudgetSpec | Spec is the desired state of the ClusterResourcePlacementDisruptionBudget. |
ClusterResourcePlacementEviction
ClusterResourcePlacementEviction is an eviction attempt on a specific placement from a ClusterResourcePlacement object; one may use this API to force the removal of specific resources from a cluster.
An eviction is a voluntary disruption; its execution is subject to the disruption budget linked with the target ClusterResourcePlacement object (if present).
Beware that an eviction alone does not guarantee that a placement will not re-appear; i.e., after an eviction, the Fleet scheduler might still pick the previous target cluster for placement. To prevent this, considering adding proper taints to the target cluster before running an eviction that will exclude it from future placements; this is especially true in scenarios where one would like to perform a cluster replacement.
For safety reasons, Fleet will only execute an eviction once; the spec in this object is immutable, and once executed, the object will be ignored after. To trigger another eviction attempt on the same placement from the same ClusterResourcePlacement object, one must re-create (delete and create) the same Eviction object. Note also that an Eviction object will be ignored once it is deemed invalid (e.g., such an object might be targeting a CRP object or a placement that does not exist yet), even if it does become valid later (e.g., the CRP object or the placement appears later). To fix the situation, re-create the Eviction object.
Note: Eviction of resources from a cluster propagated by a PickFixed CRP is not allowed. If the user wants to remove resources from a cluster propagated by a PickFixed CRP simply remove the cluster name from cluster names field from the CRP spec.
Executed evictions might be kept around for a while for auditing purposes; the Fleet controllers might have a TTL set up for such objects and will garbage collect them automatically. For further information, see the Fleet documentation.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
apiVersion string | placement.kubernetes-fleet.io/v1alpha1 | ||
kind string | ClusterResourcePlacementEviction | ||
metadata ObjectMeta | Refer to Kubernetes API documentation for fields of metadata . | ||
spec PlacementEvictionSpec | Spec is the desired state of the ClusterResourcePlacementEviction. Note that all fields in the spec are immutable. | ||
status PlacementEvictionStatus | Status is the observed state of the ClusterResourcePlacementEviction. |
ClusterStagedUpdateRun
ClusterStagedUpdateRun represents a stage by stage update process that applies ClusterResourcePlacement selected resources to specified clusters. Resources from unselected clusters are removed after all stages in the update strategy are completed. Each ClusterStagedUpdateRun object corresponds to a single release of a specific resource version. The release is abandoned if the ClusterStagedUpdateRun object is deleted or the scheduling decision changes. The name of the ClusterStagedUpdateRun must conform to RFC 1123.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
apiVersion string | placement.kubernetes-fleet.io/v1alpha1 | ||
kind string | ClusterStagedUpdateRun | ||
metadata ObjectMeta | Refer to Kubernetes API documentation for fields of metadata . | ||
spec StagedUpdateRunSpec | The desired state of ClusterStagedUpdateRun. The spec is immutable. | Required: {} | |
status StagedUpdateRunStatus | The observed status of ClusterStagedUpdateRun. | Optional: {} |
ClusterStagedUpdateStrategy
ClusterStagedUpdateStrategy defines a reusable strategy that specifies the stages and the sequence in which the selected cluster resources will be updated on the member clusters.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
apiVersion string | placement.kubernetes-fleet.io/v1alpha1 | ||
kind string | ClusterStagedUpdateStrategy | ||
metadata ObjectMeta | Refer to Kubernetes API documentation for fields of metadata . | ||
spec StagedUpdateStrategySpec | The desired state of ClusterStagedUpdateStrategy. | Required: {} |
ClusterUpdatingStatus
ClusterUpdatingStatus defines the status of the update run on a cluster.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
clusterName string | The name of the cluster. | Required: {} | |
resourceOverrideSnapshots NamespacedName array | ResourceOverrideSnapshots is a list of ResourceOverride snapshots associated with the cluster. The list is computed at the beginning of the update run and not updated during the update run. The list is empty if there are no resource overrides associated with the cluster. | Optional: {} | |
clusterResourceOverrideSnapshots string array | ClusterResourceOverrides contains a list of applicable ClusterResourceOverride snapshot names associated with the cluster. The list is computed at the beginning of the update run and not updated during the update run. The list is empty if there are no cluster overrides associated with the cluster. | Optional: {} | |
conditions Condition array | Conditions is an array of current observed conditions for clusters. Empty if the cluster has not started updating. Known conditions are “Started”, “Succeeded”. | Optional: {} |
JSONPatchOverride
JSONPatchOverride applies a JSON patch on the selected resources following RFC 6902.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
op JSONPatchOverrideOperator | Operator defines the operation on the target field. | Enum: [add remove replace] | |
path string | Path defines the target location. Note: override will fail if the resource path does not exist. | ||
value JSON | Value defines the content to be applied on the target location. Value should be empty when operator is remove .We have reserved a few variables in this field that will be replaced by the actual values. Those variables all start with $ and are case sensitive.Here is the list of currently supported variables: $\{MEMBER-CLUSTER-NAME\} : this will be replaced by the name of the memberCluster CR that represents this cluster. |
JSONPatchOverrideOperator
Underlying type: string
JSONPatchOverrideOperator defines the supported JSON patch operator.
Appears in:
Field | Description |
---|---|
add | JSONPatchOverrideOpAdd adds the value to the target location. An example target JSON document: { “foo”: [ “bar”, “baz” ] } A JSON Patch override: [ { “op”: “add”, “path”: “/foo/1”, “value”: “qux” } ] The resulting JSON document: { “foo”: [ “bar”, “qux”, “baz” ] } |
remove | JSONPatchOverrideOpRemove removes the value from the target location. An example target JSON document: { “baz”: “qux”, “foo”: “bar” } A JSON Patch override: [ { “op”: “remove”, “path”: “/baz” } ] The resulting JSON document: { “foo”: “bar” } |
replace | JSONPatchOverrideOpReplace replaces the value at the target location with a new value. An example target JSON document: { “baz”: “qux”, “foo”: “bar” } A JSON Patch override: [ { “op”: “replace”, “path”: “/baz”, “value”: “boo” } ] The resulting JSON document: { “baz”: “boo”, “foo”: “bar” } |
OverridePolicy
OverridePolicy defines how to override the selected resources on the target clusters. More is to be added.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
overrideRules OverrideRule array | OverrideRules defines an array of override rules to be applied on the selected resources. The order of the rules determines the override order. When there are two rules selecting the same fields on the target cluster, the last one will win. You can have 1-20 rules. | MaxItems: 20 MinItems: 1 Required: {} |
OverrideRule
OverrideRule defines how to override the selected resources on the target clusters.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
clusterSelector ClusterSelector | ClusterSelectors selects the target clusters. The resources will be overridden before applying to the matching clusters. An empty clusterSelector selects ALL the member clusters. A nil clusterSelector selects NO member clusters. For now, only labelSelector is supported. | ||
overrideType OverrideType | OverrideType defines the type of the override rules. | JSONPatch | Enum: [JSONPatch Delete] |
jsonPatchOverrides JSONPatchOverride array | JSONPatchOverrides defines a list of JSON patch override rules. This field is only allowed when OverrideType is JSONPatch. | MaxItems: 20 MinItems: 1 |
OverrideType
Underlying type: string
OverrideType defines the type of Override
Appears in:
Field | Description |
---|---|
JSONPatch | JSONPatchOverrideType applies a JSON patch on the selected resources following RFC 6902. |
Delete | DeleteOverrideType deletes the selected resources on the target clusters. |
PlacementDisruptionBudgetSpec
PlacementDisruptionBudgetSpec is the desired state of the PlacementDisruptionBudget.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
maxUnavailable IntOrString | MaxUnavailable is the maximum number of placements (clusters) that can be down at the same time due to voluntary disruptions. For example, a setting of 1 would imply that a voluntary disruption (e.g., an eviction) can only happen if all placements (clusters) from the linked Placement object are applied and available. This can be either an absolute value (e.g., 1) or a percentage (e.g., 10%). If a percentage is specified, Fleet will calculate the corresponding absolute values as follows: * if the linked Placement object is of the PickFixed placement type, we don’t perform any calculation because eviction is not allowed for PickFixed CRP. * if the linked Placement object is of the PickAll placement type, MaxUnavailable cannot be specified since we cannot derive the total number of clusters selected. * if the linked Placement object is of the PickN placement type, the percentage is against the number of clusters specified in the placement (i.e., the value of the NumberOfClusters fields in the placement policy). The end result will be rounded up to the nearest integer if applicable. One may use a value of 0 for this field; in this case, no voluntary disruption would be allowed. This field is mutually exclusive with the MinAvailable field in the spec; exactly one of them can be set at a time. | XIntOrString: {} | |
minAvailable IntOrString | MinAvailable is the minimum number of placements (clusters) that must be available at any time despite voluntary disruptions. For example, a setting of 10 would imply that a voluntary disruption (e.g., an eviction) can only happen if there are at least 11 placements (clusters) from the linked Placement object are applied and available. This can be either an absolute value (e.g., 1) or a percentage (e.g., 10%). If a percentage is specified, Fleet will calculate the corresponding absolute values as follows: * if the linked Placement object is of the PickFixed placement type, we don’t perform any calculation because eviction is not allowed for PickFixed CRP. * if the linked Placement object is of the PickAll placement type, MinAvailable can be specified but only as an integer since we cannot derive the total number of clusters selected. * if the linked Placement object is of the PickN placement type, the percentage is against the number of clusters specified in the placement (i.e., the value of the NumberOfClusters fields in the placement policy). The end result will be rounded up to the nearest integer if applicable. One may use a value of 0 for this field; in this case, voluntary disruption would be allowed at any time. This field is mutually exclusive with the MaxUnavailable field in the spec; exactly one of them can be set at a time. | XIntOrString: {} |
PlacementEvictionSpec
PlacementEvictionSpec is the desired state of the parent PlacementEviction.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
placementName string | PlacementName is the name of the Placement object which the Eviction object targets. | MaxLength: 255 Required: {} | |
clusterName string | ClusterName is the name of the cluster that the Eviction object targets. | MaxLength: 255 Required: {} |
PlacementEvictionStatus
PlacementEvictionStatus is the observed state of the parent PlacementEviction.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
conditions Condition array | Conditions is the list of currently observed conditions for the PlacementEviction object. Available condition types include: * Valid: whether the Eviction object is valid, i.e., it targets at a valid placement. * Executed: whether the Eviction object has been executed. |
PlacementRef
PlacementRef is the reference to a placement. For now, we only support ClusterResourcePlacement.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
name string | Name is the reference to the name of placement. |
ResourceOverride
ResourceOverride defines a group of override policies about how to override the selected namespaced scope resources to target clusters.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
apiVersion string | placement.kubernetes-fleet.io/v1alpha1 | ||
kind string | ResourceOverride | ||
metadata ObjectMeta | Refer to Kubernetes API documentation for fields of metadata . | ||
spec ResourceOverrideSpec | The desired state of ResourceOverrideSpec. |
ResourceOverrideSnapshot
ResourceOverrideSnapshot is used to store a snapshot of ResourceOverride. Its spec is immutable. We assign an ever-increasing index for snapshots. The naming convention of a ResourceOverrideSnapshot is {ResourceOverride}-{resourceIndex}. resourceIndex will begin with 0. Each snapshot MUST have the following labels:
OverrideTrackingLabel
which points to its owner ResourceOverride.IsLatestSnapshotLabel
which indicates whether the snapshot is the latest one.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
apiVersion string | placement.kubernetes-fleet.io/v1alpha1 | ||
kind string | ResourceOverrideSnapshot | ||
metadata ObjectMeta | Refer to Kubernetes API documentation for fields of metadata . | ||
spec ResourceOverrideSnapshotSpec | The desired state of ResourceOverrideSnapshot. |
ResourceOverrideSnapshotSpec
ResourceOverrideSnapshotSpec defines the desired state of ResourceOverride.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
overrideSpec ResourceOverrideSpec | OverrideSpec stores the spec of ResourceOverride. | ||
overrideHash integer array | OverrideHash is the sha-256 hash value of the OverrideSpec field. |
ResourceOverrideSpec
ResourceOverrideSpec defines the desired state of the Override. The ResourceOverride create or update will fail when the resource has been selected by the existing ResourceOverride. If the resource is selected by both ClusterResourceOverride and ResourceOverride, ResourceOverride will win when resolving conflicts.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
placement PlacementRef | Placement defines whether the override is applied to a specific placement or not. If set, the override will trigger the placement rollout immediately when the rollout strategy type is RollingUpdate. Otherwise, it will be applied to the next rollout. The recommended way is to set the placement so that the override can be rolled out immediately. | ||
resourceSelectors ResourceSelector array | ResourceSelectors is an array of selectors used to select namespace scoped resources. The selectors are ORed .You can have 1-20 selectors. | MaxItems: 20 MinItems: 1 Required: {} | |
policy OverridePolicy | Policy defines how to override the selected resources on the target clusters. |
ResourceSelector
ResourceSelector is used to select namespace scoped resources as the target resources to be placed.
All the fields are ANDed
. In other words, a resource must match all the fields to be selected.
The resource namespace will inherit from the parent object scope.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
group string | Group name of the namespace-scoped resource. Use an empty string to select resources under the core API group (e.g., services). | ||
version string | Version of the namespace-scoped resource. | ||
kind string | Kind of the namespace-scoped resource. | ||
name string | Name of the namespace-scoped resource. |
StageConfig
StageConfig describes a single update stage. The clusters in each stage are updated sequentially. The update stops if any of the updates fail.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
name string | The name of the stage. This MUST be unique within the same StagedUpdateStrategy. | MaxLength: 63 Pattern: ^[a-z0-9]+$ Required: {} | |
labelSelector LabelSelector | LabelSelector is a label query over all the joined member clusters. Clusters matching the query are selected for this stage. There cannot be overlapping clusters between stages when the stagedUpdateRun is created. If the label selector is absent, the stage includes all the selected clusters. | Optional: {} | |
sortingLabelKey string | The label key used to sort the selected clusters. The clusters within the stage are updated sequentially following the rule below: - primary: Ascending order based on the value of the label key, interpreted as integers if present. - secondary: Ascending order based on the name of the cluster if the label key is absent or the label value is the same. | Optional: {} | |
afterStageTasks AfterStageTask array | The collection of tasks that each stage needs to complete successfully before moving to the next stage. Each task is executed in parallel and there cannot be more than one task of the same type. | MaxItems: 2 Optional: {} |
StageUpdatingStatus
StageUpdatingStatus defines the status of the update run in a stage.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
stageName string | The name of the stage. | Required: {} | |
clusters ClusterUpdatingStatus array | The list of each cluster’s updating status in this stage. | Required: {} | |
afterStageTaskStatus AfterStageTaskStatus array | The status of the post-update tasks associated with the current stage. Empty if the stage has not finished updating all the clusters. | MaxItems: 2 Optional: {} | |
startTime Time | The time when the update started on the stage. Empty if the stage has not started updating. | Format: date-time Optional: {} Type: string | |
endTime Time | The time when the update finished on the stage. Empty if the stage has not started updating. | Format: date-time Optional: {} Type: string | |
conditions Condition array | Conditions is an array of current observed updating conditions for the stage. Empty if the stage has not started updating. Known conditions are “Progressing”, “Succeeded”. | Optional: {} |
StagedUpdateRunSpec
StagedUpdateRunSpec defines the desired rollout strategy and the snapshot indices of the resources to be updated. It specifies a stage-by-stage update process across selected clusters for the given ResourcePlacement object.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
placementName string | PlacementName is the name of placement that this update run is applied to. There can be multiple active update runs for each placement, but it’s up to the DevOps team to ensure they don’t conflict with each other. | MaxLength: 255 Required: {} | |
resourceSnapshotIndex string | The resource snapshot index of the selected resources to be updated across clusters. The index represents a group of resource snapshots that includes all the resources a ResourcePlacement selected. | Required: {} | |
stagedRolloutStrategyName string | The name of the update strategy that specifies the stages and the sequence in which the selected resources will be updated on the member clusters. The stages are computed according to the referenced strategy when the update run starts and recorded in the status field. | Required: {} |
StagedUpdateRunStatus
StagedUpdateRunStatus defines the observed state of the ClusterStagedUpdateRun.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
policySnapshotIndexUsed string | PolicySnapShotIndexUsed records the policy snapshot index of the ClusterResourcePlacement (CRP) that the update run is based on. The index represents the latest policy snapshot at the start of the update run. If a newer policy snapshot is detected after the run starts, the staged update run is abandoned. The scheduler must identify all clusters that meet the current policy before the update run begins. All clusters involved in the update run are selected from the list of clusters scheduled by the CRP according to the current policy. | Optional: {} | |
policyObservedClusterCount integer | PolicyObservedClusterCount records the number of observed clusters in the policy snapshot. It is recorded at the beginning of the update run from the policy snapshot object. If the ObservedClusterCount value is updated during the update run, the update run is abandoned. | Optional: {} | |
appliedStrategy ApplyStrategy | ApplyStrategy is the apply strategy that the stagedUpdateRun is using. It is the same as the apply strategy in the CRP when the staged update run starts. The apply strategy is not updated during the update run even if it changes in the CRP. | Optional: {} | |
stagedUpdateStrategySnapshot StagedUpdateStrategySpec | StagedUpdateStrategySnapshot is the snapshot of the StagedUpdateStrategy used for the update run. The snapshot is immutable during the update run. The strategy is applied to the list of clusters scheduled by the CRP according to the current policy. The update run fails to initialize if the strategy fails to produce a valid list of stages where each selected cluster is included in exactly one stage. | Optional: {} | |
stagesStatus StageUpdatingStatus array | StagesStatus lists the current updating status of each stage. The list is empty if the update run is not started or failed to initialize. | Optional: {} | |
deletionStageStatus StageUpdatingStatus | DeletionStageStatus lists the current status of the deletion stage. The deletion stage removes all the resources from the clusters that are not selected by the current policy after all the update stages are completed. | Optional: {} | |
conditions Condition array | Conditions is an array of current observed conditions for StagedUpdateRun. Known conditions are “Initialized”, “Progressing”, “Succeeded”. | Optional: {} |
StagedUpdateStrategySpec
StagedUpdateStrategySpec defines the desired state of the StagedUpdateStrategy.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
stages StageConfig array | Stage specifies the configuration for each update stage. | MaxItems: 31 Required: {} |
placement.kubernetes-fleet.io/v1beta1
Resource Types
- AppliedWork
- AppliedWorkList
- ClusterApprovalRequest
- ClusterResourceBinding
- ClusterResourcePlacement
- ClusterResourcePlacementDisruptionBudget
- ClusterResourcePlacementEviction
- ClusterResourceSnapshot
- ClusterSchedulingPolicySnapshot
- ClusterStagedUpdateRun
- ClusterStagedUpdateStrategy
- Work
- WorkList
Affinity
Affinity is a group of cluster affinity scheduling rules. More to be added.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
clusterAffinity ClusterAffinity | ClusterAffinity contains cluster affinity scheduling rules for the selected resources. | Optional: {} |
AfterStageTask
AfterStageTask is the collection of post-stage tasks that ALL need to be completed before moving to the next stage.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
type AfterStageTaskType | The type of the after-stage task. | Enum: [TimedWait Approval] Required: {} | |
waitTime Duration | The time to wait after all the clusters in the current stage complete the update before moving to the next stage. | Optional: {} Pattern: ^0|([0-9]+(\.[0-9]+)?(s|m|h))+$ Type: string |
AfterStageTaskStatus
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
type AfterStageTaskType | The type of the post-update task. | Enum: [TimedWait Approval] Required: {} | |
approvalRequestName string | The name of the approval request object that is created for this stage. Only valid if the AfterStageTaskType is Approval. | Optional: {} | |
conditions Condition array | Conditions is an array of current observed conditions for the specific type of post-update task. Known conditions are “ApprovalRequestCreated”, “WaitTimeElapsed”, and “ApprovalRequestApproved”. | Optional: {} |
AfterStageTaskType
Underlying type: string
AfterStageTaskType identifies a specific type of the AfterStageTask.
Appears in:
Field | Description |
---|---|
TimedWait | AfterStageTaskTypeTimedWait indicates the post-stage task is a timed wait. |
Approval | AfterStageTaskTypeApproval indicates the post-stage task is an approval. |
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 |
---|---|---|---|
ordinal integer | Ordinal represents an index in manifests list, so the condition can still be linked to a manifest even though manifest cannot be parsed successfully. | ||
group string | Group is the group of the resource. | ||
version string | Version is the version of the resource. | ||
kind string | Kind is the kind of the resource. | ||
resource string | Resource is the resource type of the resource. | ||
namespace string | Namespace is the namespace of the resource, the resource is cluster scoped if the value is empty. | ||
name string | Name is the name of the resource. | ||
uid UID | 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 |
---|---|---|---|
apiVersion string | placement.kubernetes-fleet.io/v1beta1 | ||
kind string | AppliedWork | ||
metadata ObjectMeta | Refer to Kubernetes API documentation for fields of metadata . | ||
spec AppliedWorkSpec | Spec represents the desired configuration of AppliedWork. | Required: {} | |
status AppliedWorkStatus | Status represents the current status of AppliedWork. |
AppliedWorkList
AppliedWorkList contains a list of AppliedWork.
Field | Description | Default | Validation |
---|---|---|---|
apiVersion string | placement.kubernetes-fleet.io/v1beta1 | ||
kind string | AppliedWorkList | ||
metadata ListMeta | Refer to Kubernetes API documentation for fields of metadata . | ||
items AppliedWork array | List of works. |
AppliedWorkSpec
AppliedWorkSpec represents the desired configuration of AppliedWork.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
workName string | WorkName represents the name of the related work on the hub. | Required: {} | |
workNamespace string | 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 |
---|---|---|---|
appliedResources AppliedResourceMeta 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 when and how to apply the selected resource to the target cluster. 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 |
---|---|---|---|
comparisonOption ComparisonOptionType | ComparisonOption controls how Fleet compares the desired state of a resource, as kept in a hub cluster manifest, with the current state of the resource (if applicable) in the member cluster. Available options are: * PartialComparison: with this option, Fleet will compare only fields that are managed by Fleet, i.e., the fields that are specified explicitly in the hub cluster manifest. Unmanaged fields are ignored. This is the default option. * FullComparison: with this option, Fleet will compare all fields of the resource, even if the fields are absent from the hub cluster manifest. Consider using the PartialComparison option if you would like to: * use the default values for certain fields; or * let another agent, e.g., HPAs, VPAs, etc., on the member cluster side manage some fields; or * allow ad-hoc or cluster-specific settings on the member cluster side. To use the FullComparison option, it is recommended that you: * specify all fields as appropriate in the hub cluster, even if you are OK with using default values; * make sure that no fields are managed by agents other than Fleet on the member cluster side, such as HPAs, VPAs, or other controllers. See the Fleet documentation for further explanations and usage examples. | PartialComparison | Enum: [PartialComparison FullComparison] Optional: {} |
whenToApply WhenToApplyType | WhenToApply controls when Fleet would apply the manifests on the hub cluster to the member clusters. Available options are: * Always: with this option, Fleet will periodically apply hub cluster manifests on the member cluster side; this will effectively overwrite any change in the fields managed by Fleet (i.e., specified in the hub cluster manifest). This is the default option. Note that this option would revert any ad-hoc changes made on the member cluster side in the managed fields; if you would like to make temporary edits on the member cluster side in the managed fields, switch to IfNotDrifted option. Note that changes in unmanaged fields will be left alone; if you use the FullDiff compare option, such changes will be reported as drifts. * IfNotDrifted: with this option, Fleet will stop applying hub cluster manifests on clusters that have drifted from the desired state; apply ops would still continue on the rest of the clusters. Drifts are calculated using the ComparisonOption, as explained in the corresponding field. Use this option if you would like Fleet to detect drifts in your multi-cluster setup. A drift occurs when an agent makes an ad-hoc change on the member cluster side that makes affected resources deviate from its desired state as kept in the hub cluster; and this option grants you an opportunity to view the drift details and take actions accordingly. The drift details will be reported in the CRP status. To fix a drift, you may: * revert the changes manually on the member cluster side * update the hub cluster manifest; this will trigger Fleet to apply the latest revision of the manifests, which will overwrite the drifted fields (if they are managed by Fleet) * switch to the Always option; this will trigger Fleet to apply the current revision of the manifests, which will overwrite the drifted fields (if they are managed by Fleet). * if applicable and necessary, delete the drifted resources on the member cluster side; Fleet will attempt to re-create them using the hub cluster manifests | Always | Enum: [Always IfNotDrifted] Optional: {} |
type ApplyStrategyType | Type is the apply strategy to use; it determines how Fleet applies manifests from the hub cluster to a member cluster. Available options are: * ClientSideApply: Fleet uses three-way merge to apply manifests, similar to how kubectl performs a client-side apply. This is the default option. Note that this strategy requires that Fleet keep the last applied configuration in the annotation of an applied resource. If the object gets so large that apply ops can no longer be executed, Fleet will switch to server-side apply. Use ComparisonOption and WhenToApply settings to control when an apply op can be executed. * ServerSideApply: Fleet uses server-side apply to apply manifests; Fleet itself will become the field manager for specified fields in the manifests. Specify ServerSideApplyConfig as appropriate if you would like Fleet to take over field ownership upon conflicts. This is the recommended option for most scenarios; it might help reduce object size and safely resolve conflicts between field values. For more information, please refer to the Kubernetes documentation (https://kubernetes.io/docs/reference/using-api/server-side-apply/#comparison-with-client-side-apply). Use ComparisonOption and WhenToApply settings to control when an apply op can be executed. * ReportDiff: Fleet will compare the desired state of a resource as kept in the hub cluster with its current state (if applicable) on the member cluster side, and report any differences. No actual apply ops would be executed, and resources will be left alone as they are on the member clusters. If configuration differences are found on a resource, Fleet will consider this as an apply error, which might block rollout depending on the specified rollout strategy. Use ComparisonOption setting to control how the difference is calculated. ClientSideApply and ServerSideApply apply strategies only work when Fleet can assume ownership of a resource (e.g., the resource is created by Fleet, or Fleet has taken over the resource). See the comments on the WhenToTakeOver field for more information. ReportDiff apply strategy, however, will function regardless of Fleet’s ownership status. One may set up a CRP with the ReportDiff strategy and the Never takeover option, and this will turn Fleet into a detection tool that reports only configuration differences but do not touch any resources on the member cluster side. For a comparison between the different strategies and usage examples, refer to the Fleet documentation. | ClientSideApply | Enum: [ClientSideApply ServerSideApply ReportDiff] Optional: {} |
allowCoOwnership boolean | AllowCoOwnership controls whether co-ownership between Fleet and other agents are allowed on a Fleet-managed resource. If set to false, Fleet will refuse to apply manifests to a resource that has been owned by one or more non-Fleet agents. Note that Fleet does not support the case where one resource is being placed multiple times by different CRPs on the same member cluster. An apply error will be returned if Fleet finds that a resource has been owned by another placement attempt by Fleet, even with the AllowCoOwnership setting set to true. | ||
serverSideApplyConfig ServerSideApplyConfig | ServerSideApplyConfig defines the configuration for server side apply. It is honored only when type is ServerSideApply. | Optional: {} | |
whenToTakeOver WhenToTakeOverType | WhenToTakeOver determines the action to take when Fleet applies resources to a member cluster for the first time and finds out that the resource already exists in the cluster. This setting is most relevant in cases where you would like Fleet to manage pre-existing resources on a member cluster. Available options include: * Always: with this action, Fleet will apply the hub cluster manifests to the member clusters even if the affected resources already exist. This is the default action. Note that this might lead to fields being overwritten on the member clusters, if they are specified in the hub cluster manifests. * IfNoDiff: with this action, Fleet will apply the hub cluster manifests to the member clusters if (and only if) pre-existing resources look the same as the hub cluster manifests. This is a safer option as pre-existing resources that are inconsistent with the hub cluster manifests will not be overwritten; Fleet will ignore them until the inconsistencies are resolved properly: any change you make to the hub cluster manifests would not be applied, and if you delete the manifests or even the ClusterResourcePlacement itself from the hub cluster, these pre-existing resources would not be taken away. Fleet will check for inconsistencies in accordance with the ComparisonOption setting. See also the comments on the ComparisonOption field for more information. If a diff has been found in a field that is managed by Fleet (i.e., the field *is specified ** in the hub cluster manifest), consider one of the following actions: * set the field in the member cluster to be of the same value as that in the hub cluster manifest. * update the hub cluster manifest so that its field value matches with that in the member cluster. * switch to the Always action, which will allow Fleet to overwrite the field with the value in the hub cluster manifest. If a diff has been found in a field that is not managed by Fleet (i.e., the field is not specified in the hub cluster manifest), consider one of the following actions: * remove the field from the member cluster. * update the hub cluster manifest so that the field is included in the hub cluster manifest. If appropriate, you may also delete the object from the member cluster; Fleet will recreate it using the hub cluster manifest. Never: with this action, Fleet will not apply a hub cluster manifest to the member clusters if there is a corresponding pre-existing resource. However, if a manifest has never been applied yet; or it has a corresponding resource which Fleet has assumed ownership, apply op will still be executed. This is the safest option; one will have to remove the pre-existing resources (so that Fleet can re-create them) or switch to a different WhenToTakeOver option before Fleet starts processing the corresponding hub cluster manifests. If you prefer Fleet stop processing all manifests, use this option along with the ReportDiff apply strategy type. This setup would instruct Fleet to touch nothing on the member cluster side but still report configuration differences between the hub cluster and member clusters. Fleet will not give up ownership that it has already assumed though. | Always | Enum: [Always IfNoDiff Never] Optional: {} |
ApplyStrategyType
Underlying type: string
ApplyStrategyType describes the type of the strategy used to apply the resource to the target cluster.
Appears in:
Field | Description |
---|---|
ClientSideApply | ApplyStrategyTypeClientSideApply will use three-way merge patch similar to how kubectl apply does by storinglast applied state in the last-applied-configuration annotation.When the last-applied-configuration annotation 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 |
ReportDiff | ApplyStrategyTypeReportDiff will report differences between the desired state of a resource as kept in the hub cluster and its current state (if applicable) on the member cluster side. No actual apply ops would be executed. |
ApprovalRequestSpec
ApprovalRequestSpec defines the desired state of the update run approval request. The entire spec is immutable.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
parentStageRollout string | The name of the staged update run that this approval request is for. | Required: {} | |
targetStage string | The name of the update stage that this approval request is for. | Required: {} |
ApprovalRequestStatus
ApprovalRequestStatus defines the observed state of the ClusterApprovalRequest.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
conditions Condition array | Conditions is an array of current observed conditions for the specific type of post-update task. Known conditions are “Approved” and “ApprovalAccepted”. | Optional: {} |
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 |
---|---|---|---|
requiredDuringSchedulingIgnoredDuringExecution ClusterSelector | 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. | Optional: {} | |
preferredDuringSchedulingIgnoredDuringExecution PreferredClusterSelector 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 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. | Optional: {} |
ClusterApprovalRequest
ClusterApprovalRequest defines a request for user approval for cluster staged update run. The request object MUST have the following labels:
TargetUpdateRun
: Points to the cluster staged update run that this approval request is for.TargetStage
: The name of the stage that this approval request is for.IsLatestUpdateRunApproval
: Indicates whether this approval request is the latest one related to this update run.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
apiVersion string | placement.kubernetes-fleet.io/v1beta1 | ||
kind string | ClusterApprovalRequest | ||
metadata ObjectMeta | Refer to Kubernetes API documentation for fields of metadata . | ||
spec ApprovalRequestSpec | The desired state of ClusterApprovalRequest. | Required: {} | |
status ApprovalRequestStatus | The observed state of ClusterApprovalRequest. | Optional: {} |
ClusterDecision
ClusterDecision represents a decision from a placement An empty ClusterDecision indicates it is not scheduled yet.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
clusterName string | 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: {} | |
selected boolean | Selected indicates if this cluster is selected by the scheduler. | ||
clusterScore ClusterScore | ClusterScore represents the score of the cluster calculated by the scheduler. | ||
reason string | 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 |
---|---|---|---|
apiVersion string | placement.kubernetes-fleet.io/v1beta1 | ||
kind string | ClusterResourceBinding | ||
metadata ObjectMeta | Refer to Kubernetes API documentation for fields of metadata . | ||
spec ResourceBindingSpec | The desired state of ClusterResourceBinding. | ||
status ResourceBindingStatus | 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 |
---|---|---|---|
apiVersion string | placement.kubernetes-fleet.io/v1beta1 | ||
kind string | ClusterResourcePlacement | ||
metadata ObjectMeta | Refer to Kubernetes API documentation for fields of metadata . | ||
spec ClusterResourcePlacementSpec | The desired state of ClusterResourcePlacement. | Required: {} | |
status ClusterResourcePlacementStatus | The observed status of ClusterResourcePlacement. | Optional: {} |
ClusterResourcePlacementDisruptionBudget
ClusterResourcePlacementDisruptionBudget is the policy applied to a ClusterResourcePlacement object that specifies its disruption budget, i.e., how many placements (clusters) can be down at the same time due to voluntary disruptions (e.g., evictions). Involuntary disruptions are not subject to this budget, but will still count against it.
To apply a ClusterResourcePlacementDisruptionBudget to a ClusterResourcePlacement, use the same name for the ClusterResourcePlacementDisruptionBudget object as the ClusterResourcePlacement object. This guarantees a 1:1 link between the two objects.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
apiVersion string | placement.kubernetes-fleet.io/v1beta1 | ||
kind string | ClusterResourcePlacementDisruptionBudget | ||
metadata ObjectMeta | Refer to Kubernetes API documentation for fields of metadata . | ||
spec PlacementDisruptionBudgetSpec | Spec is the desired state of the ClusterResourcePlacementDisruptionBudget. |
ClusterResourcePlacementEviction
ClusterResourcePlacementEviction is an eviction attempt on a specific placement from a ClusterResourcePlacement object; one may use this API to force the removal of specific resources from a cluster.
An eviction is a voluntary disruption; its execution is subject to the disruption budget linked with the target ClusterResourcePlacement object (if present).
Beware that an eviction alone does not guarantee that a placement will not re-appear; i.e., after an eviction, the Fleet scheduler might still pick the previous target cluster for placement. To prevent this, considering adding proper taints to the target cluster before running an eviction that will exclude it from future placements; this is especially true in scenarios where one would like to perform a cluster replacement.
For safety reasons, Fleet will only execute an eviction once; the spec in this object is immutable, and once executed, the object will be ignored after. To trigger another eviction attempt on the same placement from the same ClusterResourcePlacement object, one must re-create (delete and create) the same Eviction object. Note also that an Eviction object will be ignored once it is deemed invalid (e.g., such an object might be targeting a CRP object or a placement that does not exist yet), even if it does become valid later (e.g., the CRP object or the placement appears later). To fix the situation, re-create the Eviction object.
Note: Eviction of resources from a cluster propagated by a PickFixed CRP is not allowed. If the user wants to remove resources from a cluster propagated by a PickFixed CRP simply remove the cluster name from cluster names field from the CRP spec.
Executed evictions might be kept around for a while for auditing purposes; the Fleet controllers might have a TTL set up for such objects and will garbage collect them automatically. For further information, see the Fleet documentation.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
apiVersion string | placement.kubernetes-fleet.io/v1beta1 | ||
kind string | ClusterResourcePlacementEviction | ||
metadata ObjectMeta | Refer to Kubernetes API documentation for fields of metadata . | ||
spec PlacementEvictionSpec | Spec is the desired state of the ClusterResourcePlacementEviction. Note that all fields in the spec are immutable. | ||
status PlacementEvictionStatus | Status is the observed state of the ClusterResourcePlacementEviction. |
ClusterResourcePlacementSpec
ClusterResourcePlacementSpec defines the desired state of ClusterResourcePlacement.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
resourceSelectors ClusterResourceSelector 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 Required: {} | |
policy PlacementPolicy | Policy defines how to select member clusters to place the selected resources. If unspecified, all the joined member clusters are selected. | Optional: {} | |
strategy RolloutStrategy | The rollout strategy to use to replace existing placement with new ones. | Optional: {} | |
revisionHistoryLimit integer | 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 Optional: {} |
ClusterResourcePlacementStatus
ClusterResourcePlacementStatus defines the observed state of the ClusterResourcePlacement object.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
selectedResources ResourceIdentifier array | SelectedResources contains a list of resources selected by ResourceSelectors. | Optional: {} | |
observedResourceIndex string | 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=$ObservedResourceIndex ObservedResourceIndex is the resource index that the conditions in the ClusterResourcePlacementStatus observe. For example, a condition of ClusterResourcePlacementWorkSynchronized typeis observing the synchronization status of the resource snapshot with the resource index $ObservedResourceIndex. | Optional: {} | |
placementStatuses ResourcePlacementStatus 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. | Optional: {} | |
conditions Condition array | Conditions is an array of current observed conditions for ClusterResourcePlacement. | Optional: {} |
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 |
---|---|---|---|
group string | Group name of the cluster-scoped resource. Use an empty string to select resources under the core API group (e.g., namespaces). | Required: {} | |
version string | Version of the cluster-scoped resource. | Required: {} | |
kind string | Kind of the cluster-scoped resource. Note: When Kind is namespace , ALL the resources under the selected namespaces are selected. | Required: {} | |
name string | Name of the cluster-scoped resource. | Optional: {} | |
labelSelector LabelSelector | 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. | Optional: {} |
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:
CRPTrackingLabel
which points to its owner CRP.ResourceIndexLabel
which is the index of the snapshot group.IsLatestSnapshotLabel
which 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:
NumberOfResourceSnapshotsAnnotation
to store the total number of resource snapshots in the index group.ResourceGroupHashAnnotation
whose 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:
SubindexOfResourceSnapshotAnnotation
to store the subindex of resource snapshot in the group.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
apiVersion string | placement.kubernetes-fleet.io/v1beta1 | ||
kind string | ClusterResourceSnapshot | ||
metadata ObjectMeta | Refer to Kubernetes API documentation for fields of metadata . | ||
spec ResourceSnapshotSpec | The desired state of ResourceSnapshot. | ||
status ResourceSnapshotStatus | 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:
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.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
apiVersion string | placement.kubernetes-fleet.io/v1beta1 | ||
kind string | ClusterSchedulingPolicySnapshot | ||
metadata ObjectMeta | Refer to Kubernetes API documentation for fields of metadata . | ||
spec SchedulingPolicySnapshotSpec | The desired state of SchedulingPolicySnapshot. | ||
status SchedulingPolicySnapshotStatus | The observed status of SchedulingPolicySnapshot. |
ClusterScore
ClusterScore represents the score of the cluster calculated by the scheduler.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
affinityScore integer | 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. | ||
priorityScore integer | 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 |
---|---|---|---|
clusterSelectorTerms ClusterSelectorTerm array | ClusterSelectorTerms is a list of cluster selector terms. The terms are ORed . | MaxItems: 10 Required: {} |
ClusterSelectorTerm
Appears in:
ClusterStagedUpdateRun
ClusterStagedUpdateRun represents a stage by stage update process that applies ClusterResourcePlacement selected resources to specified clusters. Resources from unselected clusters are removed after all stages in the update strategy are completed. Each ClusterStagedUpdateRun object corresponds to a single release of a specific resource version. The release is abandoned if the ClusterStagedUpdateRun object is deleted or the scheduling decision changes. The name of the ClusterStagedUpdateRun must conform to RFC 1123.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
apiVersion string | placement.kubernetes-fleet.io/v1beta1 | ||
kind string | ClusterStagedUpdateRun | ||
metadata ObjectMeta | Refer to Kubernetes API documentation for fields of metadata . | ||
spec StagedUpdateRunSpec | The desired state of ClusterStagedUpdateRun. The spec is immutable. | Required: {} | |
status StagedUpdateRunStatus | The observed status of ClusterStagedUpdateRun. | Optional: {} |
ClusterStagedUpdateStrategy
ClusterStagedUpdateStrategy defines a reusable strategy that specifies the stages and the sequence in which the selected cluster resources will be updated on the member clusters.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
apiVersion string | placement.kubernetes-fleet.io/v1beta1 | ||
kind string | ClusterStagedUpdateStrategy | ||
metadata ObjectMeta | Refer to Kubernetes API documentation for fields of metadata . | ||
spec StagedUpdateStrategySpec | The desired state of ClusterStagedUpdateStrategy. | Required: {} |
ClusterUpdatingStatus
ClusterUpdatingStatus defines the status of the update run on a cluster.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
clusterName string | The name of the cluster. | Required: {} | |
resourceOverrideSnapshots NamespacedName array | ResourceOverrideSnapshots is a list of ResourceOverride snapshots associated with the cluster. The list is computed at the beginning of the update run and not updated during the update run. The list is empty if there are no resource overrides associated with the cluster. | Optional: {} | |
clusterResourceOverrideSnapshots string array | ClusterResourceOverrides contains a list of applicable ClusterResourceOverride snapshot names associated with the cluster. The list is computed at the beginning of the update run and not updated during the update run. The list is empty if there are no cluster overrides associated with the cluster. | Optional: {} | |
conditions Condition array | Conditions is an array of current observed conditions for clusters. Empty if the cluster has not started updating. Known conditions are “Started”, “Succeeded”. | Optional: {} |
ComparisonOptionType
Underlying type: string
ComparisonOptionType describes the compare option that Fleet uses to detect drifts and/or calculate differences.
Appears in:
Field | Description |
---|---|
PartialComparison | ComparisonOptionTypePartialComparison will compare only fields that are managed by Fleet, i.e., fields that are specified explicitly in the hub cluster manifest. Unmanaged fields are ignored. |
FullComparison | ComparisonOptionTypeFullDiff will compare all fields of the resource, even if the fields are absent from the hub cluster manifest. |
DiffDetails
DiffDetails describes the observed configuration differences.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
observationTime Time | ObservationTime is the timestamp when the configuration difference was last detected. | Format: date-time Required: {} Type: string | |
observedInMemberClusterGeneration integer | ObservedInMemberClusterGeneration is the generation of the applied manifest on the member cluster side. This might be nil if the resource has not been created yet in the member cluster. | Optional: {} | |
firstDiffedObservedTime Time | FirsftDiffedObservedTime is the timestamp when the configuration difference was first detected. | Format: date-time Required: {} Type: string | |
observedDiffs PatchDetail array | ObservedDiffs describes each field with configuration difference as found from the member cluster side. Fleet might truncate the details as appropriate to control object size. Each entry specifies how the live state (the state on the member cluster side) compares against the desired state (the state kept in the hub cluster manifest). | Optional: {} |
DiffedResourcePlacement
DiffedResourcePlacement contains the details of a resource with configuration differences.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
group string | Group is the group name of the selected resource. | Optional: {} | |
version string | Version is the version of the selected resource. | Required: {} | |
kind string | Kind represents the Kind of the selected resources. | Required: {} | |
name string | Name of the target resource. | Required: {} | |
namespace string | Namespace is the namespace of the resource. Empty if the resource is cluster scoped. | Optional: {} | |
envelope EnvelopeIdentifier | Envelope identifies the envelope object that contains this resource. | Optional: {} | |
observationTime Time | ObservationTime is the time when we observe the configuration differences for the resource. | Format: date-time Required: {} Type: string | |
targetClusterObservedGeneration integer | TargetClusterObservedGeneration is the generation of the resource on the target cluster that contains the configuration differences. This might be nil if the resource has not been created yet on the target cluster. | Optional: {} | |
firstDiffedObservedTime Time | FirstDiffedObservedTime is the first time the resource on the target cluster is observed to have configuration differences. | Format: date-time Required: {} Type: string | |
observedDiffs PatchDetail array | ObservedDiffs are the details about the found configuration differences. Note that Fleet might truncate the details as appropriate to control the object size. Each detail entry specifies how the live state (the state on the member cluster side) compares against the desired state (the state kept in the hub cluster manifest). An event about the details will be emitted as well. | Optional: {} |
DriftDetails
DriftDetails describes the observed configuration drifts.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
observationTime Time | ObservationTime is the timestamp when the drift was last detected. | Format: date-time Required: {} Type: string | |
observedInMemberClusterGeneration integer | ObservedInMemberClusterGeneration is the generation of the applied manifest on the member cluster side. | Required: {} | |
firstDriftedObservedTime Time | FirsftDriftedObservedTime is the timestamp when the drift was first detected. | Format: date-time Required: {} Type: string | |
observedDrifts PatchDetail array | ObservedDrifts describes each drifted field found from the applied manifest. Fleet might truncate the details as appropriate to control object size. Each entry specifies how the live state (the state on the member cluster side) compares against the desired state (the state kept in the hub cluster manifest). | Optional: {} |
DriftedResourcePlacement
DriftedResourcePlacement contains the details of a resource with configuration drifts.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
group string | Group is the group name of the selected resource. | Optional: {} | |
version string | Version is the version of the selected resource. | Required: {} | |
kind string | Kind represents the Kind of the selected resources. | Required: {} | |
name string | Name of the target resource. | Required: {} | |
namespace string | Namespace is the namespace of the resource. Empty if the resource is cluster scoped. | Optional: {} | |
envelope EnvelopeIdentifier | Envelope identifies the envelope object that contains this resource. | Optional: {} | |
observationTime Time | ObservationTime is the time when we observe the configuration drifts for the resource. | Format: date-time Required: {} Type: string | |
targetClusterObservedGeneration integer | TargetClusterObservedGeneration is the generation of the resource on the target cluster that contains the configuration drifts. | Required: {} | |
firstDriftedObservedTime Time | FirstDriftedObservedTime is the first time the resource on the target cluster is observed to have configuration drifts. | Format: date-time Required: {} Type: string | |
observedDrifts PatchDetail array | ObservedDrifts are the details about the found configuration drifts. Note that Fleet might truncate the details as appropriate to control the object size. Each detail entry specifies how the live state (the state on the member cluster side) compares against the desired state (the state kept in the hub cluster manifest). An event about the details will be emitted as well. | Optional: {} |
EnvelopeIdentifier
EnvelopeIdentifier identifies the envelope object that contains the selected resource.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
name string | Name of the envelope object. | Required: {} | |
namespace string | Namespace is the namespace of the envelope object. Empty if the envelope object is cluster scoped. | Optional: {} | |
type EnvelopeType | Type of the envelope object. | ConfigMap | Enum: [ConfigMap] Optional: {} |
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 |
---|---|---|---|
group string | Group is the group name of the selected resource. | Optional: {} | |
version string | Version is the version of the selected resource. | Required: {} | |
kind string | Kind represents the Kind of the selected resources. | Required: {} | |
name string | Name of the target resource. | Required: {} | |
namespace string | Namespace is the namespace of the resource. Empty if the resource is cluster scoped. | Optional: {} | |
envelope EnvelopeIdentifier | Envelope identifies the envelope object that contains this resource. | Optional: {} | |
condition Condition | The failed condition status. | Required: {} |
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 |
---|---|---|---|
identifier WorkResourceIdentifier | resourceId represents a identity of a resource linking to manifests in spec. | ||
conditions Condition array | Conditions represents the conditions of this resource on spoke cluster | ||
driftDetails DriftDetails | DriftDetails explains about the observed configuration drifts. Fleet might truncate the details as appropriate to control object size. Note that configuration drifts can only occur on a resource if it is currently owned by Fleet and its corresponding placement is set to use the ClientSideApply or ServerSideApply apply strategy. In other words, DriftDetails and DiffDetails will not be populated at the same time. | Optional: {} | |
diffDetails DiffDetails | DiffDetails explains the details about the observed configuration differences. Fleet might truncate the details as appropriate to control object size. Note that configuration differences can only occur on a resource if it is not currently owned by Fleet (i.e., it is a pre-existing resource that needs to be taken over), or if its corresponding placement is set to use the ReportDiff apply strategy. In other words, DiffDetails and DriftDetails will not be populated at the same time. | Optional: {} |
NamespacedName
NamespacedName comprises a resource name, with a mandatory namespace.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
name string | Name is the name of the namespaced scope resource. | Required: {} | |
namespace string | Namespace is namespace of the namespaced scope resource. | Required: {} |
PatchDetail
PatchDetail describes a patch that explains an observed configuration drift or difference.
A patch detail can be transcribed as a JSON patch operation, as specified in RFC 6902.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
path string | The JSON path that points to a field that has drifted or has configuration differences. | Required: {} | |
valueInMember string | The value at the JSON path from the member cluster side. This field can be empty if the JSON path does not exist on the member cluster side; i.e., applying the manifest from the hub cluster side would add a new field. | Optional: {} | |
valueInHub string | The value at the JSON path from the hub cluster side. This field can be empty if the JSON path does not exist on the hub cluster side; i.e., applying the manifest from the hub cluster side would remove the field. | Optional: {} |
PlacementDisruptionBudgetSpec
PlacementDisruptionBudgetSpec is the desired state of the PlacementDisruptionBudget.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
maxUnavailable IntOrString | MaxUnavailable is the maximum number of placements (clusters) that can be down at the same time due to voluntary disruptions. For example, a setting of 1 would imply that a voluntary disruption (e.g., an eviction) can only happen if all placements (clusters) from the linked Placement object are applied and available. This can be either an absolute value (e.g., 1) or a percentage (e.g., 10%). If a percentage is specified, Fleet will calculate the corresponding absolute values as follows: * if the linked Placement object is of the PickFixed placement type, we don’t perform any calculation because eviction is not allowed for PickFixed CRP. * if the linked Placement object is of the PickAll placement type, MaxUnavailable cannot be specified since we cannot derive the total number of clusters selected. * if the linked Placement object is of the PickN placement type, the percentage is against the number of clusters specified in the placement (i.e., the value of the NumberOfClusters fields in the placement policy). The end result will be rounded up to the nearest integer if applicable. One may use a value of 0 for this field; in this case, no voluntary disruption would be allowed. This field is mutually exclusive with the MinAvailable field in the spec; exactly one of them can be set at a time. | XIntOrString: {} | |
minAvailable IntOrString | MinAvailable is the minimum number of placements (clusters) that must be available at any time despite voluntary disruptions. For example, a setting of 10 would imply that a voluntary disruption (e.g., an eviction) can only happen if there are at least 11 placements (clusters) from the linked Placement object are applied and available. This can be either an absolute value (e.g., 1) or a percentage (e.g., 10%). If a percentage is specified, Fleet will calculate the corresponding absolute values as follows: * if the linked Placement object is of the PickFixed placement type, we don’t perform any calculation because eviction is not allowed for PickFixed CRP. * if the linked Placement object is of the PickAll placement type, MinAvailable can be specified but only as an integer since we cannot derive the total number of clusters selected. * if the linked Placement object is of the PickN placement type, the percentage is against the number of clusters specified in the placement (i.e., the value of the NumberOfClusters fields in the placement policy). The end result will be rounded up to the nearest integer if applicable. One may use a value of 0 for this field; in this case, voluntary disruption would be allowed at any time. This field is mutually exclusive with the MaxUnavailable field in the spec; exactly one of them can be set at a time. | XIntOrString: {} |
PlacementEvictionSpec
PlacementEvictionSpec is the desired state of the parent PlacementEviction.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
placementName string | PlacementName is the name of the Placement object which the Eviction object targets. | MaxLength: 255 Required: {} | |
clusterName string | ClusterName is the name of the cluster that the Eviction object targets. | MaxLength: 255 Required: {} |
PlacementEvictionStatus
PlacementEvictionStatus is the observed state of the parent PlacementEviction.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
conditions Condition array | Conditions is the list of currently observed conditions for the PlacementEviction object. Available condition types include: * Valid: whether the Eviction object is valid, i.e., it targets at a valid placement. * Executed: whether the Eviction object has been executed. |
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 |
---|---|---|---|
placementType PlacementType | Type of placement. Can be “PickAll”, “PickN” or “PickFixed”. Default is PickAll. | PickAll | Enum: [PickAll PickN PickFixed] Optional: {} |
clusterNames string array | ClusterNames contains a list of names of MemberCluster to place the selected resources. Only valid if the placement type is “PickFixed” | MaxItems: 100 Optional: {} | |
numberOfClusters integer | NumberOfClusters of placement. Only valid if the placement type is “PickN”. | Minimum: 0 Optional: {} | |
affinity Affinity | 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”. | Optional: {} | |
topologySpreadConstraints TopologySpreadConstraint 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”. | Optional: {} | |
tolerations Toleration 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 Optional: {} |
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 |
---|---|---|---|
weight integer | Weight associated with matching the corresponding clusterSelectorTerm, in the range [-100, 100]. | Maximum: 100 Minimum: -100 Required: {} | |
preference ClusterSelectorTerm | A cluster selector term, associated with the corresponding weight. | Required: {} |
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 |
---|---|---|---|
name string | Name is the name of the property; it should be a Kubernetes label name. | Required: {} | |
operator PropertySelectorOperator | Operator specifies the relationship between a cluster’s observed value of the specified property and the values given in the requirement. | Required: {} | |
values string 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 Required: {} |
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 |
---|---|---|---|
state BindingState | The desired state of the binding. Possible values: Scheduled, Bound, Unscheduled. | ||
resourceSnapshotName string | 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. | ||
resourceOverrideSnapshots NamespacedName array | ResourceOverrideSnapshots is a list of ResourceOverride snapshots associated with the selected resources. | ||
clusterResourceOverrideSnapshots string array | ClusterResourceOverrides contains a list of applicable ClusterResourceOverride snapshot names associated with the selected resources. | ||
schedulingPolicySnapshotName string | 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. | ||
targetCluster string | TargetCluster is the name of the cluster that the scheduler assigns the resources to. | ||
clusterDecision ClusterDecision | ClusterDecision explains why the scheduler selected this cluster. | ||
applyStrategy ApplyStrategy | 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. |
ResourceBindingStatus
ResourceBindingStatus represents the current status of a ClusterResourceBinding.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
failedPlacements FailedResourcePlacement 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 | |
driftedPlacements DriftedResourcePlacement array | DriftedPlacements is a list of resources that have drifted from their desired states kept in the hub cluster, as found by Fleet using the drift detection mechanism. To control the object size, only the first 100 drifted resources will be included. This field is only meaningful if the ClusterName is not empty. | MaxItems: 100 Optional: {} | |
diffedPlacements DiffedResourcePlacement array | DiffedPlacements is a list of resources that have configuration differences from their corresponding hub cluster manifests. Fleet will report such differences when: * The CRP uses the ReportDiff apply strategy, which instructs Fleet to compare the hub cluster manifests against the live resources without actually performing any apply op; or * Fleet finds a pre-existing resource on the member cluster side that does not match its hub cluster counterpart, and the CRP has been configured to only take over a resource if no configuration differences are found. To control the object size, only the first 100 diffed resources will be included. This field is only meaningful if the ClusterName is not empty. | MaxItems: 100 Optional: {} | |
conditions Condition 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:
- ClusterResourcePlacementStatus
- DiffedResourcePlacement
- DriftedResourcePlacement
- FailedResourcePlacement
Field | Description | Default | Validation |
---|---|---|---|
group string | Group is the group name of the selected resource. | Optional: {} | |
version string | Version is the version of the selected resource. | Required: {} | |
kind string | Kind represents the Kind of the selected resources. | Required: {} | |
name string | Name of the target resource. | Required: {} | |
namespace string | Namespace is the namespace of the resource. Empty if the resource is cluster scoped. | Optional: {} | |
envelope EnvelopeIdentifier | Envelope identifies the envelope object that contains this resource. | Optional: {} |
ResourcePlacementStatus
ResourcePlacementStatus represents the placement status of selected resources for one target cluster.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
clusterName string | 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. | Optional: {} | |
applicableResourceOverrides NamespacedName 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. | Optional: {} | |
applicableClusterResourceOverrides string 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. | Optional: {} | |
failedPlacements FailedResourcePlacement 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 ClusterName is not empty. | MaxItems: 100 Optional: {} | |
driftedPlacements DriftedResourcePlacement array | DriftedPlacements is a list of resources that have drifted from their desired states kept in the hub cluster, as found by Fleet using the drift detection mechanism. To control the object size, only the first 100 drifted resources will be included. This field is only meaningful if the ClusterName is not empty. | MaxItems: 100 Optional: {} | |
diffedPlacements DiffedResourcePlacement array | DiffedPlacements is a list of resources that have configuration differences from their corresponding hub cluster manifests. Fleet will report such differences when: * The CRP uses the ReportDiff apply strategy, which instructs Fleet to compare the hub cluster manifests against the live resources without actually performing any apply op; or * Fleet finds a pre-existing resource on the member cluster side that does not match its hub cluster counterpart, and the CRP has been configured to only take over a resource if no configuration differences are found. To control the object size, only the first 100 diffed resources will be included. This field is only meaningful if the ClusterName is not empty. | MaxItems: 100 Optional: {} | |
conditions Condition array | Conditions is an array of current observed conditions for ResourcePlacementStatus. | Optional: {} |
ResourceSnapshotSpec
ResourceSnapshotSpec defines the desired state of ResourceSnapshot.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
selectedResources ResourceContent array | SelectedResources contains a list of resources selected by ResourceSelectors. |
ResourceSnapshotStatus
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
conditions Condition 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 |
---|---|---|---|
maxUnavailable IntOrString | 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 NumberOfClusters field when the placement type is PickN .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% | Optional: {} Pattern: ^((100|[0-9]\{1,2\})%|[0-9]+)$ XIntOrString: {} |
maxSurge IntOrString | The maximum number of clusters that can be scheduled above the desired number of clusters. The desired number equals to the NumberOfClusters field when the placement type is PickN .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% | Optional: {} Pattern: ^((100|[0-9]\{1,2\})%|[0-9]+)$ XIntOrString: {} |
unavailablePeriodSeconds integer | 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 SafeRollout for more details. For other types of resources, we consider them as available after UnavailablePeriodSeconds secondshave passed since they were successfully applied to the target cluster. Default is 60. | 60 | Optional: {} |
RolloutStrategy
RolloutStrategy describes how to roll out a new change in selected resources to target clusters.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
type RolloutStrategyType | Type of rollout. The only supported types are “RollingUpdate” and “External”. Default is “RollingUpdate”. | RollingUpdate | Enum: [RollingUpdate External] Optional: {} |
rollingUpdate RollingUpdateConfig | Rolling update config params. Present only if RolloutStrategyType = RollingUpdate. | Optional: {} | |
applyStrategy ApplyStrategy | ApplyStrategy describes when and how to apply the selected resources to the target cluster. | Optional: {} |
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. |
External | ExternalRolloutStrategyType means there is an external rollout controller that will handle the rollout of the resources. |
SchedulingPolicySnapshotSpec
SchedulingPolicySnapshotSpec defines the desired state of SchedulingPolicySnapshot.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
policy PlacementPolicy | Policy defines how to select member clusters to place the selected resources. If unspecified, all the joined member clusters are selected. | ||
policyHash integer 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 |
---|---|---|---|
observedCRPGeneration integer | ObservedCRPGeneration is the generation of the CRP which the scheduler uses to perform the scheduling cycle and prepare the scheduling status. | ||
conditions Condition array | Conditions is an array of current observed conditions for SchedulingPolicySnapshot. | ||
targetClusters ClusterDecision 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 |
---|---|---|---|
force boolean | 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. | Optional: {} |
StageConfig
StageConfig describes a single update stage. The clusters in each stage are updated sequentially. The update stops if any of the updates fail.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
name string | The name of the stage. This MUST be unique within the same StagedUpdateStrategy. | MaxLength: 63 Pattern: ^[a-z0-9]+$ Required: {} | |
labelSelector LabelSelector | LabelSelector is a label query over all the joined member clusters. Clusters matching the query are selected for this stage. There cannot be overlapping clusters between stages when the stagedUpdateRun is created. If the label selector is absent, the stage includes all the selected clusters. | Optional: {} | |
sortingLabelKey string | The label key used to sort the selected clusters. The clusters within the stage are updated sequentially following the rule below: - primary: Ascending order based on the value of the label key, interpreted as integers if present. - secondary: Ascending order based on the name of the cluster if the label key is absent or the label value is the same. | Optional: {} | |
afterStageTasks AfterStageTask array | The collection of tasks that each stage needs to complete successfully before moving to the next stage. Each task is executed in parallel and there cannot be more than one task of the same type. | MaxItems: 2 Optional: {} |
StageUpdatingStatus
StageUpdatingStatus defines the status of the update run in a stage.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
stageName string | The name of the stage. | Required: {} | |
clusters ClusterUpdatingStatus array | The list of each cluster’s updating status in this stage. | Required: {} | |
afterStageTaskStatus AfterStageTaskStatus array | The status of the post-update tasks associated with the current stage. Empty if the stage has not finished updating all the clusters. | MaxItems: 2 Optional: {} | |
startTime Time | The time when the update started on the stage. Empty if the stage has not started updating. | Format: date-time Optional: {} Type: string | |
endTime Time | The time when the update finished on the stage. Empty if the stage has not started updating. | Format: date-time Optional: {} Type: string | |
conditions Condition array | Conditions is an array of current observed updating conditions for the stage. Empty if the stage has not started updating. Known conditions are “Progressing”, “Succeeded”. | Optional: {} |
StagedUpdateRunSpec
StagedUpdateRunSpec defines the desired rollout strategy and the snapshot indices of the resources to be updated. It specifies a stage-by-stage update process across selected clusters for the given ResourcePlacement object.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
placementName string | PlacementName is the name of placement that this update run is applied to. There can be multiple active update runs for each placement, but it’s up to the DevOps team to ensure they don’t conflict with each other. | MaxLength: 255 Required: {} | |
resourceSnapshotIndex string | The resource snapshot index of the selected resources to be updated across clusters. The index represents a group of resource snapshots that includes all the resources a ResourcePlacement selected. | Required: {} | |
stagedRolloutStrategyName string | The name of the update strategy that specifies the stages and the sequence in which the selected resources will be updated on the member clusters. The stages are computed according to the referenced strategy when the update run starts and recorded in the status field. | Required: {} |
StagedUpdateRunStatus
StagedUpdateRunStatus defines the observed state of the ClusterStagedUpdateRun.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
policySnapshotIndexUsed string | PolicySnapShotIndexUsed records the policy snapshot index of the ClusterResourcePlacement (CRP) that the update run is based on. The index represents the latest policy snapshot at the start of the update run. If a newer policy snapshot is detected after the run starts, the staged update run is abandoned. The scheduler must identify all clusters that meet the current policy before the update run begins. All clusters involved in the update run are selected from the list of clusters scheduled by the CRP according to the current policy. | Optional: {} | |
policyObservedClusterCount integer | PolicyObservedClusterCount records the number of observed clusters in the policy snapshot. It is recorded at the beginning of the update run from the policy snapshot object. If the ObservedClusterCount value is updated during the update run, the update run is abandoned. | Optional: {} | |
appliedStrategy ApplyStrategy | ApplyStrategy is the apply strategy that the stagedUpdateRun is using. It is the same as the apply strategy in the CRP when the staged update run starts. The apply strategy is not updated during the update run even if it changes in the CRP. | Optional: {} | |
stagedUpdateStrategySnapshot StagedUpdateStrategySpec | StagedUpdateStrategySnapshot is the snapshot of the StagedUpdateStrategy used for the update run. The snapshot is immutable during the update run. The strategy is applied to the list of clusters scheduled by the CRP according to the current policy. The update run fails to initialize if the strategy fails to produce a valid list of stages where each selected cluster is included in exactly one stage. | Optional: {} | |
stagesStatus StageUpdatingStatus array | StagesStatus lists the current updating status of each stage. The list is empty if the update run is not started or failed to initialize. | Optional: {} | |
deletionStageStatus StageUpdatingStatus | DeletionStageStatus lists the current status of the deletion stage. The deletion stage removes all the resources from the clusters that are not selected by the current policy after all the update stages are completed. | Optional: {} | |
conditions Condition array | Conditions is an array of current observed conditions for StagedUpdateRun. Known conditions are “Initialized”, “Progressing”, “Succeeded”. | Optional: {} |
StagedUpdateStrategySpec
StagedUpdateStrategySpec defines the desired state of the StagedUpdateStrategy.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
stages StageConfig array | Stage specifies the configuration for each update stage. | MaxItems: 31 Required: {} |
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 |
---|---|---|---|
key string | 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. | Optional: {} | |
operator TolerationOperator | 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] Optional: {} |
value string | Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string. | Optional: {} | |
effect TaintEffect | Effect indicates the taint effect to match. Empty means match all taint effects. When specified, only allowed value is NoSchedule. | Enum: [NoSchedule] Optional: {} |
TopologySpreadConstraint
TopologySpreadConstraint specifies how to spread resources among the given cluster topology.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
maxSkew integer | 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 Optional: {} |
topologyKey string | 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. | Required: {} | |
whenUnsatisfiable UnsatisfiableConstraintAction | 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. | Optional: {} |
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. |
WhenToApplyType
Underlying type: string
WhenToApplyType describes when Fleet would apply the manifests on the hub cluster to the member clusters.
Appears in:
Field | Description |
---|---|
Always | WhenToApplyTypeAlways instructs Fleet to periodically apply hub cluster manifests on the member cluster side; this will effectively overwrite any change in the fields managed by Fleet (i.e., specified in the hub cluster manifest). |
IfNotDrifted | WhenToApplyTypeIfNotDrifted instructs Fleet to stop applying hub cluster manifests on clusters that have drifted from the desired state; apply ops would still continue on the rest of the clusters. |
WhenToTakeOverType
Underlying type: string
WhenToTakeOverType describes the type of the action to take when we first apply the resources to the member cluster.
Appears in:
Field | Description |
---|---|
IfNoDiff | WhenToTakeOverTypeIfNoDiff instructs Fleet to apply a manifest with a corresponding pre-existing resource on a member cluster if and only if the pre-existing resource looks the same as the manifest. Should there be any inconsistency, Fleet will skip the apply op; no change will be made on the resource and Fleet will not claim ownership on it. Note that this will not stop Fleet from processing other manifests in the same placement that do not concern the takeover process (e.g., the manifests that have not been created yet, or that are already under the management of Fleet). |
Always | WhenToTakeOverTypeAlways instructs Fleet to always apply manifests to a member cluster, even if there are some corresponding pre-existing resources. Some fields on these resources might be overwritten, and Fleet will claim ownership on them. |
Never | WhenToTakeOverTypeNever instructs Fleet to never apply a manifest to a member cluster if there is a corresponding pre-existing resource. Note that this will not stop Fleet from processing other manifests in the same placement that do not concern the takeover process (e.g., the manifests that have not been created yet, or that are already under the management of Fleet). If you would like Fleet to stop processing manifests all together and do not assume ownership on any pre-existing resources, use this option along with the ReportDiff apply strategy type. This setup would instruct Fleet to touch nothing on the member cluster side but still report configuration differences between the hub cluster and member clusters. Fleet will not give up ownership that it has already assumed, though. |
Work
Work is the Schema for the works API.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
apiVersion string | placement.kubernetes-fleet.io/v1beta1 | ||
kind string | Work | ||
metadata ObjectMeta | Refer to Kubernetes API documentation for fields of metadata . | ||
spec WorkSpec | spec defines the workload of a work. | ||
status WorkStatus | status defines the status of each applied manifest on the spoke cluster. |
WorkList
WorkList contains a list of Work.
Field | Description | Default | Validation |
---|---|---|---|
apiVersion string | placement.kubernetes-fleet.io/v1beta1 | ||
kind string | WorkList | ||
metadata ListMeta | Refer to Kubernetes API documentation for fields of metadata . | ||
items Work 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 |
---|---|---|---|
ordinal integer | Ordinal represents an index in manifests list, so the condition can still be linked to a manifest even though manifest cannot be parsed successfully. | ||
group string | Group is the group of the resource. | ||
version string | Version is the version of the resource. | ||
kind string | Kind is the kind of the resource. | ||
resource string | Resource is the resource type of the resource. | ||
namespace string | Namespace is the namespace of the resource, the resource is cluster scoped if the value is empty. | ||
name string | Name is the name of the resource. |
WorkSpec
WorkSpec defines the desired state of Work.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
workload WorkloadTemplate | Workload represents the manifest workload to be deployed on spoke cluster | ||
applyStrategy ApplyStrategy | 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. |
WorkStatus
WorkStatus defines the observed state of Work.
Appears in:
Field | Description | Default | Validation |
---|---|---|---|
conditions Condition 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. | ||
manifestConditions ManifestCondition 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 |
---|---|---|---|
manifests Manifest array | Manifests represents a list of kubernetes resources to be deployed on the spoke cluster. |