Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add resource snapshot info in the crp status #589

Closed
wants to merge 1 commit into from

Conversation

zhiying-lin
Copy link
Contributor

@zhiying-lin zhiying-lin commented Nov 2, 2023

Description of your changes

Provide a way to show the resource content applied by CRP.
Note, the clusterResourceSnapshot objects will become a customer visible object and customer can check the resource content by looking at the CRP status.

Fixes #

I have:

  • Run make reviewable to ensure this PR is ready for review.

How has this code been tested

API change

Special notes for your reviewer

@zhiying-lin zhiying-lin changed the title feat: add resource snapshot info in the crp status api: add resource snapshot info in the crp status Nov 2, 2023
@zhiying-lin zhiying-lin changed the title api: add resource snapshot info in the crp status interface: add resource snapshot info in the crp status Nov 2, 2023
@zhiying-lin zhiying-lin changed the title interface: add resource snapshot info in the crp status feat: add resource snapshot info in the crp status Nov 2, 2023
@@ -340,6 +340,11 @@ type ClusterResourcePlacementStatus struct {
// +optional
SelectedResources []ResourceIdentifier `json:"selectedResources,omitempty"`

// ClusterResourceSnapshots is a list of clusterResourceSnapshot names.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this only contain the most recent resource snapshots or all existing resource snapshots for this placement?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this only contains the current resource snapshots.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If so, be explicit in the comment.

@@ -340,6 +340,11 @@ type ClusterResourcePlacementStatus struct {
// +optional
SelectedResources []ResourceIdentifier `json:"selectedResources,omitempty"`

// ClusterResourceSnapshots is a list of clusterResourceSnapshot names.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this only contains the current resource snapshots.

// ClusterResourceSnapshots is a list of clusterResourceSnapshot names.
// ClusterResourceSnapshot is used to store a snapshot of selected resources by a resource placement policy.
// A placement could produce multiple clusterResourceSnapshots to select large amount of resources.
ClusterResourceSnapshots []string `json:"clusterResourceSnapshots,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the PlacementStatuses reflect the status of the listed ClusterResourceSnapshots or they can correspond to a previous version of the snapshots?

Basically, will we produce 2?

  1. snapshot1, placementstatus for snapshot1
  2. snapshot2, placementstatus for snapshot1
  3. snapshot2, placementstatus for snapshot2

@zhiying-lin zhiying-lin closed this Nov 3, 2023
@zhiying-lin zhiying-lin deleted the resource-status branch November 3, 2023 07:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants