@@ -822,12 +822,10 @@ type ClusterResourcePlacementStatus struct {
822822 // Each snapshot has a different resource index.
823823 // One resource snapshot can contain multiple clusterResourceSnapshots CRs in order to store large amount of resources.
824824 // To get clusterResourceSnapshot of a given resource index, use the following command:
825- // `kubectl get ClusterResourceSnapshot --selector=kubernetes-fleet.io/resource-index=$ObservedResourceIndex `
826- // ObservedResourceIndex is the resource index that the conditions in the ClusterResourcePlacementStatus observe.
827- // For example, a condition of `ClusterResourcePlacementWorkSynchronized` type
828- // is observing the synchronization status of the resource snapshot with the resource index $ObservedResourceIndex.
825+ // `kubectl get ClusterResourceSnapshot --selector=kubernetes-fleet.io/resource-index=$ObservedResourceIndex`
829826 // If the rollout strategy type is `RollingUpdate`, `ObservedResourceIndex` is the default-latest resource snapshot index.
830- // If the rollout strategy type is `External`, rollout and version control are managed by an external controller, and this field remains empty.
827+ // If the rollout strategy type is `External`, rollout and version control are managed by an external controller,
828+ // and this field is not empty only if all targeted clusters observe the same resource index in `PlacementStatuses`.
831829 // +kubebuilder:validation:Optional
832830 ObservedResourceIndex string `json:"observedResourceIndex,omitempty"`
833831
@@ -846,6 +844,11 @@ type ClusterResourcePlacementStatus struct {
846844 // +listMapKey=type
847845
848846 // Conditions is an array of current observed conditions for ClusterResourcePlacement.
847+ // All conditions except `ClusterResourcePlacementScheduled` correspond to the resource snapshot at the index specified by `ObservedResourceIndex`.
848+ // For example, a condition of `ClusterResourcePlacementWorkSynchronized` type
849+ // is observing the synchronization status of the resource snapshot with index `ObservedResourceIndex`.
850+ // If the rollout strategy type is `External`, and `ObservedResourceIndex` is unset due to clusters reporting different resource indices,
851+ // conditions except `ClusterResourcePlacementScheduled` will be empty or set to Unknown.
849852 // +kubebuilder:validation:Optional
850853 Conditions []metav1.Condition `json:"conditions,omitempty"`
851854}
@@ -958,13 +961,13 @@ type ResourcePlacementStatus struct {
958961 DiffedPlacements []DiffedResourcePlacement `json:"diffedPlacements,omitempty"`
959962
960963 // ObservedResourceIndex is the index of the resource snapshot that is currently being rolled out to the given cluster.
961- // During rollout, depending on the rollout strategy, clusters may observe different resource snapshot indices.
962- // ObservedResourceIndex is the resource snapshot index observed by the conditions in the ResourcePlacementStatus.
963964 // This field is only meaningful if the `ClusterName` is not empty.
964965 // +kubebuilder:validation:Optional
965966 ObservedResourceIndex string `json:"observedResourceIndex,omitempty"`
966967
967- // Conditions is an array of current observed conditions for ResourcePlacementStatus.
968+ // Conditions is an array of current observed conditions on the cluster.
969+ // Each condition corresponds to the resource snapshot at the index specified by `ObservedResourceIndex`.
970+ // For example, the condition of type `RolloutStarted` is observing the rollout status of the resource snapshot with index `ObservedResourceIndex`.
968971 // +kubebuilder:validation:Optional
969972 Conditions []metav1.Condition `json:"conditions,omitempty"`
970973}
0 commit comments