Skip to content

Commit 7a85d9f

Browse files
committed
interface: CRP API change to support multiple resourceSnapshot versions across clusters
Signed-off-by: Wantong Jiang <wantjian@microsoft.com>
1 parent 9c67ff9 commit 7a85d9f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

apis/placement/v1beta1/clusterresourceplacement_types.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -822,6 +822,9 @@ type ClusterResourcePlacementStatus struct {
822822
// One resource snapshot can contain multiple clusterResourceSnapshots CRs in order to store large amount of resources.
823823
// To get clusterResourceSnapshot of a given resource index, use the following command:
824824
// `kubectl get ClusterResourceSnapshot --selector=kubernetes-fleet.io/resource-index=$ObservedResourceIndex `
825+
// During rollout, clusters may run different versions of the resource snapshot concurrently.
826+
// In this case, ObservedResourceIndex represents the index of the latest resource snapshot installed across all clusters.
827+
// Note that this may differ from the index of the latest resource snapshot available in the hub cluster depending on the rollout strategy.
825828
// ObservedResourceIndex is the resource index that the conditions in the ClusterResourcePlacementStatus observe.
826829
// For example, a condition of `ClusterResourcePlacementWorkSynchronized` type
827830
// is observing the synchronization status of the resource snapshot with the resource index $ObservedResourceIndex.
@@ -954,6 +957,13 @@ type ResourcePlacementStatus struct {
954957
// +kubebuilder:validation:MaxItems=100
955958
DiffedPlacements []DiffedResourcePlacement `json:"diffedPlacements,omitempty"`
956959

960+
// ObservedResourceIndex is the index of the resource snapshot that is currently rolled out on the given cluster.
961+
// During rollout, depending on the rollout strategy, clusters may observe different resource indices.
962+
// ObservedResourceIndex is the resource snapshot index observed by the conditions in the ResourcePlacementStatus.
963+
// This field is only meaningful if the `ClusterName` is not empty.
964+
// +kubebuilder:validation:Optional
965+
ObservedResourceIndex string `json:"observedResourceIndex,omitempty"`
966+
957967
// Conditions is an array of current observed conditions for ResourcePlacementStatus.
958968
// +kubebuilder:validation:Optional
959969
Conditions []metav1.Condition `json:"conditions,omitempty"`

0 commit comments

Comments
 (0)