@@ -149,13 +149,13 @@ type PlacementSpec struct {
149149 // +kubebuilder:validation:Optional
150150 RevisionHistoryLimit * int32 `json:"revisionHistoryLimit,omitempty"`
151151
152- // EnableStatusProxy indicates whether a PlacementStatusProxy object should be created to mirror the placement status.
153- // When enabled, PlacementStatusProxy objects will be created in the same namespace selected by the ResourceSelectors.
152+ // CopyStatusToNamespace indicates whether a ClusterResourcePlacementStatus object should be created to mirror the placement status.
153+ // When enabled, a ClusterResourcePlacementStatus object will be created in the same namespace selected by the ResourceSelectors.
154154 // This allows namespace-scoped access to the cluster-scoped ClusterResourcePlacement status.
155155 // Defaults to false.
156156 // +kubebuilder:default=false
157157 // +kubebuilder:validation:Optional
158- EnableStatusProxy bool `json:"enableStatusProxy ,omitempty"`
158+ CopyStatusToNamespace bool `json:"copyStatusToNamespace ,omitempty"`
159159}
160160
161161// Tolerations returns tolerations for PlacementSpec to handle nil policy case.
@@ -1513,51 +1513,47 @@ func (rpl *ResourcePlacementList) GetPlacementObjs() []PlacementObj {
15131513// +kubebuilder:printcolumn:JSONPath=`.metadata.creationTimestamp`,name="Age",type=date
15141514// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
15151515
1516- // PlacementStatusProxy is a namespaced resource that mirrors the PlacementStatus of a corresponding
1516+ // ClusterResourcePlacementStatus is a namespaced resource that mirrors the PlacementStatus of a corresponding
15171517// ClusterResourcePlacement object. This allows namespace-scoped access to cluster-scoped placement status.
15181518//
15191519// This object will be created within the target namespace that contains resources being managed by the CRP.
1520- // When multiple ClusterResourcePlacements target the same namespace, each PlacementStatusProxy within that
1520+ // When multiple ClusterResourcePlacements target the same namespace, each ClusterResourcePlacementStatus within that
15211521// namespace is uniquely identified by its object name, which corresponds to the specific ClusterResourcePlacement
15221522// that created it.
15231523//
1524- // The name of this object should follow the template: <clusterResourcePlacementName>-status
1525- // where <clusterResourcePlacementName> is the name of the corresponding ClusterResourcePlacement.
1526- //
1527- // For example, if you have a ClusterResourcePlacement named "my-app-crp", the corresponding
1528- // PlacementStatusProxy should be named "my-app-crp-status".
1529- type PlacementStatusProxy struct {
1524+ // The name of this object should be the same as the name of the corresponding ClusterResourcePlacement.
1525+ type ClusterResourcePlacementStatus struct {
15301526 metav1.TypeMeta `json:",inline"`
15311527 metav1.ObjectMeta `json:"metadata,omitempty"`
15321528
1533- // The observed status of PlacementStatusProxy which mirrors the PlacementStatus of the corresponding ClusterResourcePlacement.
1529+ // The observed status of ClusterResourcePlacementStatus which mirrors the PlacementStatus of the corresponding ClusterResourcePlacement.
15341530 // This includes information about the namespace and resources within that namespace that are being managed by the placement.
15351531 // The status will show placement details for resources selected by the ClusterResourcePlacement's ResourceSelectors.
15361532 // +kubebuilder:validation:Optional
15371533 Status PlacementStatus `json:"status,omitempty"`
15381534}
15391535
1540- // PlacementStatusProxyList contains a list of PlacementStatusProxy .
1536+ // ClusterResourcePlacementStatusList contains a list of ClusterResourcePlacementStatus .
15411537// +kubebuilder:resource:scope="Namespaced"
15421538// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
1543- type PlacementStatusProxyList struct {
1539+ type ClusterResourcePlacementStatusList struct {
15441540 metav1.TypeMeta `json:",inline"`
15451541 metav1.ListMeta `json:"metadata,omitempty"`
1546- Items []PlacementStatusProxy `json:"items"`
1542+ Items []ClusterResourcePlacementStatus `json:"items"`
15471543}
15481544
1549- // SetConditions sets the conditions of the PlacementStatusProxy .
1550- func (m * PlacementStatusProxy ) SetConditions (conditions ... metav1.Condition ) {
1545+ // SetConditions sets the conditions of the ClusterResourcePlacementStatus .
1546+ func (m * ClusterResourcePlacementStatus ) SetConditions (conditions ... metav1.Condition ) {
15511547 for _ , c := range conditions {
15521548 meta .SetStatusCondition (& m .Status .Conditions , c )
15531549 }
15541550}
15551551
1556- // GetCondition returns the condition of the PlacementStatusProxy objects.
1557- func (m * PlacementStatusProxy ) GetCondition (conditionType string ) * metav1.Condition {
1552+ // GetCondition returns the condition of the ClusterResourcePlacementStatus objects.
1553+ func (m * ClusterResourcePlacementStatus ) GetCondition (conditionType string ) * metav1.Condition {
15581554 return meta .FindStatusCondition (m .Status .Conditions , conditionType )
15591555}
15601556
15611557func init () {
1562- SchemeBuilder .Register (& ClusterResourcePlacement {}, & ClusterResourcePlacementList {}, & ResourcePlacement {}, & ResourcePlacementList {}, & PlacementStatusProxy {}, & PlacementStatusProxyList {})
1558+ SchemeBuilder .Register (& ClusterResourcePlacement {}, & ClusterResourcePlacementList {}, & ResourcePlacement {}, & ResourcePlacementList {}, & ClusterResourcePlacementStatus {}, & ClusterResourcePlacementStatusList {})
15631559}
0 commit comments