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

interface: updated ResourceBinding API #400

Merged
merged 6 commits into from
Jun 29, 2023
Merged

Conversation

michaelawyu
Copy link
Contributor

Description of your changes

This PR updates the ResourceBinding API.

I have:

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

How has this code been tested

N/A

Special notes for your reviewer

apis/placement/v1beta1/binding_types.go Outdated Show resolved Hide resolved
apis/placement/v1beta1/binding_types.go Outdated Show resolved Hide resolved
apis/placement/v1beta1/binding_types.go Outdated Show resolved Hide resolved
ryanzhang-oss
ryanzhang-oss previously approved these changes Jun 28, 2023
@ryanzhang-oss ryanzhang-oss merged commit 30440a9 into Azure:main Jun 29, 2023

// PolicySnapshotName is the name of the policy snapshot that this resource snapshot is pointing to.
// +required
PolicySnapshotName string `json:"policySnapshotName"`
Copy link
Contributor

Choose a reason for hiding this comment

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

just wonder why we remove this field?

For example, CRP has two policySnapshots & two resourceSnapshots. policySnapshot A selects resources A and policy Snapshot B selects resource B. policySnapshot B and resourceSnapshot B are active.

Scheduler has not created the new bindings for policyA and marked the old bindings as deleted yet.
In this case, should rollout controller avoid updating the these old bindings by checking the policySnapshotName in the resourceSnapshot?

If we remove this field, we cannot distinguish whether the resourceSnapshot is created for policyA or policyB.

For the future rollback feature, should we also rollback the policy?

Copy link
Contributor

Choose a reason for hiding this comment

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

The main reason we removed this field is to completely decouple the schedulingPolicy from resource.

Scheduler has not created the new bindings for policyA and marked the old bindings as deleted yet.
In this case, should rollout controller avoid updating the these old bindings by checking the policySnapshotName in the resourceSnapshot?

I am not sure if I follow this case. The policyA is old so why is scheduler creating new bindings for it? What are the old bindings for?

If we remove this field, we cannot distinguish whether the resourceSnapshot is created for policyA or policyB.
Isn't the latest resourceSnapshot always point to the latest policy?

For the future rollback feature, should we also rollback the policy?
Given now that we have two revisions. It seems that the future rollback policy has to contain both of them?

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.

3 participants