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: improve API based on feedbacks #394

Merged
merged 9 commits into from
Jun 28, 2023

Conversation

ryanzhang-oss
Copy link
Contributor

Description of your changes

Update the API based on the design feedbacks.

Fixes #

I have:

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

How has this code been tested

Special notes for your reviewer

@michaelawyu
Copy link
Contributor

Hi Ryan! I think we might need to re-generate the manifests here as well.

apis/placement/v1beta1/clusterresourceplacement_types.go Outdated Show resolved Hide resolved
apis/placement/v1beta1/clusterresourceplacement_types.go Outdated Show resolved Hide resolved
apis/placement/v1beta1/clusterresourceplacement_types.go Outdated Show resolved Hide resolved
apis/placement/v1beta1/clusterresourceplacement_types.go Outdated Show resolved Hide resolved
apis/placement/v1beta1/clusterresourceplacement_types.go Outdated Show resolved Hide resolved
apis/placement/v1beta1/clusterresourceplacement_types.go Outdated Show resolved Hide resolved
apis/placement/v1beta1/clusterresourceplacement_types.go Outdated Show resolved Hide resolved
apis/placement/v1beta1/clusterresourceplacement_types.go Outdated Show resolved Hide resolved
type RollingUpdateConfig struct {
// The maximum number of clusters that can be unavailable during the rolling update
// comparing to the desired number of clusters.
// The desired number equal to the `NumberOfClusters` field when the placement type is `PickN`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// The desired number equal to the `NumberOfClusters` field when the placement type is `PickN`.
// The desired number equals to the `NumberOfClusters` field when the placement type is `PickN`.

// The maximum number of clusters that can be unavailable during the rolling update
// comparing to the desired number of clusters.
// The desired number equal to the `NumberOfClusters` field when the placement type is `PickN`.
// The desired number equal to the number of clusters scheduler selected when the placement type is `PickAll`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// The desired number equal to the number of clusters scheduler selected when the placement type is `PickAll`.
// The desired number equals to the number of clusters scheduler selected when the placement type is `PickAll`.

Comment on lines 54 to 60
BindingStateScheduled BindingState = "Scheduled"

// BindingStateBound means the binding is bound to the target cluster.
BindingStateBound BindingState = "Bound"

// BindingStateUnScheduled means the binding is not scheduled on to the target cluster anymore.
BindingStateUnScheduled BindingState = "UnScheduled"
Copy link
Contributor

Choose a reason for hiding this comment

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

hi ryan, could you clarify that, scheduled = creating, bound = active, unscheduled = deleting?

is my understanding correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes

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
MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"`

// The maximum number of clusters that can be scheduled above the desired number of clusters.
// The desired number equal to the `NumberOfClusters` field when the placement type is `PickN`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// The desired number equal to the `NumberOfClusters` field when the placement type is `PickN`.
// The desired number equals to the `NumberOfClusters` field when the placement type is `PickN`.


// The maximum number of clusters that can be scheduled above the desired number of clusters.
// The desired number equal to the `NumberOfClusters` field when the placement type is `PickN`.
// The desired number equal to the number of clusters scheduler selected when the placement type is `PickAll`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// The desired number equal to the number of clusters scheduler selected when the placement type is `PickAll`.
// The desired number equals to the number of clusters scheduler selected when the placement type is `PickAll`.

// has passed after the resources are applied to the target cluster successfully.
// Default is 60.
// +optional
UnavailablePeriodSeconds *int `json:"waitBetweenRollingPeriodSeconds,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
UnavailablePeriodSeconds *int `json:"waitBetweenRollingPeriodSeconds,omitempty"`
UnavailablePeriodSeconds *int `json:"unavailablePeriodSeconds,omitempty"`

circy9
circy9 previously approved these changes Jun 28, 2023
Copy link
Contributor

@circy9 circy9 left a comment

Choose a reason for hiding this comment

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

Accepted minor changes from Zhiying on UnScheduled -> Unscheduled and comments.

Copy link
Contributor

@michaelawyu michaelawyu left a comment

Choose a reason for hiding this comment

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

LGTM ;) Merge to unblock progress.

@michaelawyu michaelawyu merged commit 87bbb8f into Azure:main Jun 28, 2023
@ryanzhang-oss ryanzhang-oss deleted the api-design branch February 12, 2024 19:04
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.

5 participants